How to use the shadow value provided by the light node in NME?

You don’t need to use the shadow output of the lights block: it is already factored into the diffuse and specular outputs. The shadow output can be used for special effects when you need to know the shadow value itself.

You made a mistake in your shader: you need to wire the world position to the worldPosition input of the Lights block, not the projected world position:

https://nme.babylonjs.com/#57K0R9#3
https://playground.babylonjs.com/#8KWW79#1

1 Like