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

Changing directional shadow map size or blur filter quality at runtime does nothing #71681

Closed
lostminds opened this issue Jan 19, 2023 · 2 comments

Comments

@lostminds
Copy link

Godot version

4.0b13

System information

macOS 13.0.1

Issue description

I'm experimenting with a graphics quality settings in a project and try to change shadow quality settings during runtime from code. More specifically the settings rendering/lights_and_shadows/directional_shadow/size and rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality. If I understand this pull request #54165 correctly this should be possible and changes should be applied instantly when the setting is changed (at least the size, but I assume the same should go for the filter quality).

While the pull request is for 3.5 it is mentioned that this will be possible in 4.0 as well (or?). However, when trying to change these settings at runtime they seem to do nothing at all, so I'm opening this issue in case this is a bug or oversight.

ShadowMapSizeSet.mov

This is the same on both Mobile and Forward+ renderer

Steps to reproduce

  • Set up a scene with a directional light with shadows turned on some meshes and a camera
  • Observe your shadow quality
  • Change the shadow map size using ProjectSettings.set("rendering/lights_and_shadows/directional_shadow/size",shadowMapSize)
  • Observe your shadow quality

Minimal reproduction project

shadow_quality_test.zip

@mrjustaguy
Copy link
Contributor

mrjustaguy commented Jan 19, 2023

This is expected, this is only read at startup.
Use RenderingServer.directional_shadow_atlas_set_size(resolution,16bit)

@lostminds
Copy link
Author

This is expected, this is only read at startup.
Use RenderingServer.directional_shadow_atlas_set_size(resolution,16bit)

Ah, thank you! I guess I was tricked by finding the PR above and thinking this new 3.5 feature would be the same in 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants