Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to avoid the movement of the shadowmap renderer of directional light

Discussion in 'General Graphics' started by Rein_Iwakura, Jul 4, 2023.

  1. Rein_Iwakura

    Rein_Iwakura

    Joined:
    Jul 4, 2023
    Posts:
    10
    I am using the built-in pipeline. I noticed that the rendering of shadowmap of the directional light changes when I move the main camera. Since I am dealing with an inner scene, the only shadow casted by the sun will be within a small area around the window. Therefore, I set the shadow distance relatively low and turn off the cascade.

    However, due to the low shadow distance shadows are fading out when camera moves away from window.

    How can I make the renderer of shadowmap fixed at one point in space? In this case the renderer should be near the window.
     
    Last edited: Jul 4, 2023
  2. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    547
  3. Rein_Iwakura

    Rein_Iwakura

    Joined:
    Jul 4, 2023
    Posts:
    10
    Yes. I have set shadow projection to stable fit. The problem I'm facing isn't wobbling. I noticed that the shadowmap renderer essentially follows my main camera so when the camera moves away from the window, the shadowmap also moves away so that it won't include the window.