- Home /
_LightMatrix0 and Directional Light
I am trying to access the _LightMatrix0 in a forward base pass to calculate some light point of view coordinate but it seems that the _LightMatrix0 is empty with directional light.
Any idea how can I solve this and how could I access to the _LightMatrix0 with directional light (without cookies) ?
I am trying to do this kind of thing.
float4 position = mul(_LightMatrix0, worldPos);
Comment
Answer by fguinier · Jan 05, 2016 at 02:02 PM
At first glance it should be there! did you try "unity_WorldToLight" instead?
The variable _Light$$anonymous$$atrix0
can be accessed but it seems to be empty.
Concerning unity_WorldToLight
I think that this value is deprecated on 5.0.3 as there is no reference of it in the built-in shaders.