Shadows are pixelated and offset

So I’ve googled this question/phrase to death, and I cannot find a single not outdated answer.

Basically here’s my problem:
3142546--238492--upload_2017-7-13_1-3-4.png

I know that by lowering the bias of the directional light, I can fix the offset, but that creates a lot of artifacts.
The second part of the problem is that the shadows aren’t diagonal, but act like a bitmap image.

I played around with the project’s quality settings, and moving the cascades around seems to alter this, but I can’t get it to always be sharp.

Any ideas what to do?

P.S. I’m using version 5.6.1f1.

Because shadows are a bitmap image. Shadows in Unity (and most real time graphics) are done using shadow maps. These are images created by rendering a view from the light of the scene and saving a depth map. What you’re seeing is the pixels of that depth map, and some additional artifacts from the limits of the depth accuracy. Search the internet for shadow maps, there are plenty of videos and tutorial pages that explain the concept.

Apart from cascades, the two settings that will improve the quality the most is increasing the shadow resolution (there are settings on both the light and in the quality settings), and reducing the shadow range.

1 Like

In the same place you were playing with the cascades:

Shadow Resolution and Shadow Distance.


And then on the light, the Resolution setting.

2 Likes

Thanks. After looking over those settings, I realized that the main issue was the shadow distance. It’s at 150 by default, which completely messes them (the shadows) up. This was also apparent when increasing the “Far” clipping plane on my camera.

Changing the resolution of the shadows to Very High also helped.

Thanks a lot. :smile:

And seems my first reply has disappeared… Weird.

1 Like