Search Unity

Directional Light popping / jumping on treadmill terrain

Discussion in 'General Graphics' started by Captaingerbear, Mar 6, 2019.

  1. Captaingerbear

    Captaingerbear

    Joined:
    Mar 6, 2013
    Posts:
    57
    I've got a terrain chunk that treadmills under the character whenever he goes more than 100 units away from the origin, but whenever this shift occurs, the directional sun light appears to suddenly change position. The relative angles here are not changing, so I'm not sure what's going on, the only change is that the water plane is translating 100 units along the X-axis. If I keep walking 100 units in the same direction, the light will gradually move downward, until crossing the next threshold causes it to pop once more.

    Any suggestions?

    The issue in action.
    https://imgur.com/a/kyHgrW9
     
    Last edited: Mar 6, 2019
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    That looks like the lighting on the water is what is having issues, not the terrain. The specular highlight shape is scrolling from what I assume is a normal map on the water surface.

    If that’s true, then I assume you’re water shader is implementing its lighting improperly.