Glsl MAT different depth calculation for light depth pass

Am I right assuming that a glslMAT assigned to a geometry is also used for the shadow depth calculation of a light? If so, I want to be able to calculate depth differently based on whether the shader is calculated for the actual camera pass or for a light’s pass (for a custom mat I want to be able to use the back side of an object for shadow depth values to prevent shadow acne). Is there already some #define that lets me check what pass I’m in? If not, please add!

Thanks for the suggestion. In builds 2025.31905+ TD_SHADOW_MAP_RENDER will be defined when the shadow mapping pass in the Light COMP is occuring.

1 Like