0

Is there a way to retrieve the deph from directional lights ? I can access the _ShadowMapTexture but this is not the depth.

I found how to access the shadow map of, I think, every light type by using the defines such as SHADOW_ATTENUATION(a) or directly the _ShadowMapTexture, everything is located in the built-in shaders.

But I am wondering how could I access the depth of those lighting type. I found a way to access it for the spot light this way : _ShadowCoord.z which gives the depth scaled with _ShadowCoord.w, which could be considered to the far plane, but am I right ?

How could I do the same for the other light types such as directional or point lights ? For the moment I am stuck with directional lights, any clues ?

Because if I try to access the depth for a directional light by using _ShadowCoord.z it seems that it's more related to the depth view and not the light. Here I am, totally stuck with this directional lights.

MaT
  • 1,556
  • 3
  • 28
  • 64

0 Answers0