Skip to content
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

Size shadow map based on camera view direction #194

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

hasenbanck
Copy link
Collaborator

@hasenbanck hasenbanck commented Dec 14, 2024

This tries to compensate for the top to bottom degree at 55°, where the front facing part needs the most space inside the shadow map. We lerp now the shadow map bounds, so that we can properly draw shadows in the distance. This works for standard sun directions very well. We should re-work the enhanced sun direction, so that extreme low angles when the sun is sinking aren't possible. In reality this is also not the case, since the scattered light that come from the sun behind the horizon isn't throwing extremely large shadows either. We should also aim to also do that, or apply a dynamic scaling based on the sun's height angle in the sky. I also adjusted the FOV/default zoom to be closer to the original client. The maximum zoom also was shrunk a bit, so that we don't need to waste precious shadow map resources.

We also now set a default windows size of logical 720p.

@hasenbanck hasenbanck force-pushed the dynamic-shadow-map-bounds branch 3 times, most recently from 7b5c008 to 8475328 Compare December 15, 2024 10:18
This tries to compensate for the top to bottom degree at 55°, where the front facing part needs the most space inside the shadow map. We lerp now the shadow map bounds, so that we can properly draw shadows in the distance. This works for standard sun directions very well. We should re-work the enhanced sun direction, so that extreme low angles when the sun is sinking aren't possible. In reality this is also not the case, since the scattered light that come from the sun behind the horizon isn't throwing extremely large shadows either. We should also aim to also do that, or apply a dynamic scaling based on the sun's height angle in the sky. I also adjusted the FOV/default zoom to be closer to the original client. The maximum zoom also was shrunk a bit, so that we don't need to waste precious shadow map resources.

We also now set a default windows size of logical 720p.
@hasenbanck hasenbanck force-pushed the dynamic-shadow-map-bounds branch from 8475328 to 56709f7 Compare December 15, 2024 12:48
@hasenbanck hasenbanck merged commit b7432ca into vE5li:main Dec 15, 2024
3 checks passed
@hasenbanck hasenbanck deleted the dynamic-shadow-map-bounds branch December 15, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant