Search Unity

Question Rotating shadow with directional light in URP Shader Graph

Discussion in 'Shader Graph' started by Peter-Bailey, Feb 11, 2023.

  1. Peter-Bailey

    Peter-Bailey

    Joined:
    Oct 12, 2012
    Posts:
    36
    Posted this in the URP forum, but realized maybe I should have posted here.

    In my MainLight custom function for Shader Graph, I can modify the rotation of the directional light with mainLight.direction. However it does not update the rotation of the shadow attenuation, so the shadow doesn't rotate with the light. How can I modify the rotation of the shadow in HLSL? I get that I can just rotate the light in the scene, but how could I do it in a custom function?