Mesh with node material does not recieve shadows

I have platforms with custom node material and a I can’t cast shadows on them.
maybe it depends on material?

1 Like

IDK how to use NME but toying with Lights_lerp, Light_information_lerp, and ShadowMap_lerp makes it show up.

Hello :slight_smile:

Sure, problem is not on the “shadow” side, but on the “lighting” side.
In fact a light never casts shadows, it sends lights, excepted where an object is hidding it, creating a shadow. It means that if the material is not affected by the light, there is no reason why a shadow should appear. It would mean that the light would actually add some dark, which is non sense.

In your PG, disabling the light you are using for shadows has no effect on your custom shader, which means it’s not affected anyway by this light. In order to cast shadows, you would need to have some diffuse shading on the material, not only emissive :slight_smile:

You can use the “shadow” output of “Lights” to modulate the color you calculate:

“shadow” is equal to 1 if the pixel is fully lit and 0 if it is fully in shadow, and to any intermediate value if it is partially in shadow.

5 Likes