-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window width affects directional shadow resolution (fixed in master
)
#23603
Comments
This is already mentioned in #12148 (comment) and #13575 (comment), but since there doesn't appear to be a dedicated issue for this bug, I'll leave this one open. |
Any chance this one can be added to the 3.1 milestone? |
Bumping as this issue still persists. |
I'm not sure if this can be resolved completely (any ideas?). Still, we could make it so the shadow quality becomes worse when the viewport becomes taller, instead of wider. This would play better with ultrawide displays which are becoming more common. |
I tested how shadow quality changes when the camera is set to use Keep Width (Vert-) aspect instead of Keep Height (Hor+, the default). The shadow quality still decreases as the viewport becomes wider (even though the horizontal FOV doesn't increase, causing the image to look "zoomed in"), but it doesn't decrease as the viewport becomes taller. This may hint at a configuration issue somewhere in the rendering code or shader. |
This makes sense. If your shadow map is fixed in width, in the video, as he changes the width (aspect ratio) the width of the box relative to the viewport width decreases as the viewport width goes up, even though the apparent size stays the same. Thus there are less texels in the shadow map for the box in widescreen, and the observed pixellation increases. If you changed the width and height at the same time, the box decreases / increases in size and thus the observed pixellation stays the same. The apparent size of objects is based on the height, rather than width, such that changing the aspect ratio just widens the view. |
Reopening as this isn't fixed in 3.x yet. See #43582 for a workaround (use a rotated Viewport). It's likely possible to backport shadow pancaking to 3.2.x, both in the GLES3 and GLES2 renderers. I don't know how to do it though. So far, I've only managed to backport the directional shadow width fix: #43207 |
master
)
Yes, merge #43207 locally against 3.5.2 then build custom export templates using it 🙂 If you don't want to build custom export templates, you could double the directional shadow size from the default value when the viewport's aspect ratio is wider than a certain threshold: #54165 |
Godot version:
Affects both 3.0.6 and Official 3.1 Alpha 2
OS/device including version:
Linux Mint 19 - 64bit
Nvidia GeForce GTX 1060 on driver version: 396.54
Issue description:
For some reason the directional shadow resolution decreases as the window width increases, and increases as the width decreases.
Happens in the editor window and also in a running game.
Video
I'm assuming this isn't intended behaviour?
OmniLight and SpotLight do not seem affected.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: