You will get the same shader code in the end, so it’s up to you to choose one method over the other (it’s sligthly easier to use the disableLighting property if you have multiple lights in your scene, as you won’t need to exclude your objects from all the lights, or if you have numerous objects you want to exclude from lighting that share the same material).
Don’t you mean like this? but I can’t get the ground to be the same color as the scene.
I was suggested with another solution using ShadowOnlyMaterial and it seems like an easy and a perfect solution except that it is not working on my react project for some reason
I keep getting this message Attempted import error: 'ShadowOnlyMaterial' is not exported from '@babylonjs/core'.