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

Question How to prevent directional lights from following orthographic camera in reflections?

Discussion in 'General Graphics' started by Radivarig, Apr 17, 2023.

  1. Radivarig

    Radivarig

    Joined:
    May 15, 2013
    Posts:
    120
    I'm using orthographic camera but the light reflections on smooth surfaces are incorrect because they change with the camera position which is intended for perspective projection but in orthographic the camera is supposed to behave as if it was infinitely distant and infinitely zoomed back in.

    One problem is that directional lights follow the camera in space so when the camera is closer to the surface it acts as a too intense point light and when it's far it never covers the whole scene uniformly and I've not found a way to completely disable them.

    Another problem is that other types of light while not following the camera still do move a bit like in small angled perspective projection which decreases with camera distance but not completely.

    I think it would be ideal if these were somehow achievable:
    1. disable directional lights from showing up in reflections
    2. make directional lights stop following the camera
    3. make other lights not behave like in perspective

    I'm aware that moving the camera away and then adjusting the clipping planes can reduce these but it adds other distance problems like with shadows or LODs and does not solve the root cause.

    And in my case that's not enough because I'm zooming in the pixels which then flicker with camera movement as their smoothness illumination changes with a gradient around the camera.

    Any suggestions?