[SOLVED]Shadows on large terrain!?

I have a terrain that is 20000 x 20000 and I use a directional light as sun. As it rotates it it shadows the terrain but still lights up the opposite side.

Look at image below:

Changing Shadow Distance to 20000 helps but then I get black artifacts on the terrain and changing the Lights Bias, Normal Bias and Shadow nera plane does not work no matter what I set those to…

Do anyone have any idea on how to shadow large terrains?

Anyone? Or am I the only one having this problem!?

I made the intensity of the light go to 0.0f and that fixes it… With Math.lerp, it should be a nice transition. Still if anyone has a better idea, feel free to share it :slight_smile:

1 Like

I also lerp the intensity towards 0 at sundown and mix it with single color ambient light so it does not completely go pitch black dark. After the “sun” is down, I reuse the same directional light with a different color & less intensity as moonlight.

If you lerp the colors of the directional & ambient light as well, you can make nice transitions between night and day.

2 Likes