Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Can you adjust the shadowmap position / near plane?

Discussion in 'General Graphics' started by adamgryu, May 4, 2020.

  1. adamgryu

    adamgryu

    Joined:
    Mar 1, 2014
    Posts:
    186
    This is easier to explain with a diagram so I drew a rough one below...

    upload_2020-5-4_16-8-2.png
    Is there any way I can control the shadow map camera so that the near-plane starts halfway towards subjects?
    I'd like to avoid rendering shadows for things far away, for both aesthetic and performance reasons.

    I have tried adjusting Shadow Near Plane, Shadow Near Plane Offset, and Shadow Distance - and they don't seem to accomplish what I'm looking for. Am I misunderstanding something here? Shadow Distance doesn't accomplish what I want since it is with respect to the camera view - not the light view. This is for a directional light by the way.

    This might be possible with custom shadow maps or scriptable render pipeline stuff - but I think it's too late to switch to either of those.
     

    Attached Files: