Pixeleted shadows in Godot3

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TobiLa

Hey,
I’m just starting to look into 3d scenes after only working with 2d scenes for a while. I followed the tutorials and wanted to make a test for what i will need in my next project. But somehow the shadows in my scene look very pixelated. I use a direction light and a Sprite3D.

This tutorial says that shadows near to the camera are pixelated when using the mode “Orthogonal”. But my direction light already uses the mode PSSM4.
I also played with the other values described on the page, but I can’t manage to get a clear shadow.

One other strange thing I noticed is, that the shadow gets clearer if I narrow my Viewport.
This is a high res gif, sorry for google drive, but all other services ended of compressing the resolution, which is bad in this case.

I will probably use mp4 next time.
Here are the shadows compared directly:
wide viewport
narrowed viewport
Is it possible to get the shadow as sharp as the 2d texture I used for the Sprite3D?

And here is the source code of my test project so far:

Hope anybody can help, thanks in advance! :slight_smile:

:bust_in_silhouette: Reply From: Swarnim Arun

Try looking into quality settings in Project Settings.

I changed the directional shadow size in the quality settings.
This has no difference in the editor, but in the rendered game the shadows get clearer, thank you very much!
This seems to be pretty performance intensive though, the fps even on my laptop drop pretty quickly, and I want to target my game for mobile.

Can you think of other ways that may don’t affect the performance so much?

TobiLa | 2018-02-19 09:45

I’m having the same performance issue, I think I’m going to bother in github.
Worse case I’ll code some fake shadows as it will fit in my lowpoly (maybe) isometric game.

Toshio Araki | 2019-05-10 22:40