I have a custom shader which is using _WorldSpaceLightPos0, however, the value of _WorldSpaceLightPos0 is not updated properly, after changing the corresponding light object rotation, _WorldSpaceLightPos0 value doesn’t change until I switch to the scene view(from game view), as soon as I view the shader render result in the scene view, _WorldSpaceLightPos0 value is changed, reflecting the previous rotation changes on the light object.
Otherwise if continue playing the game for a while, the _WorldSpaceLightPos0 will be updated from (0, 0, 0, 0) to correct value at some points, until restart unity editor.
Any idea what’s going on? Thanks in advance…
the only light source in the scene, it’s a directional light.