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

Directional Shadow Atlas Size Cannot be Modified at Runtime #18621

Closed
cwook opened this issue May 5, 2018 · 6 comments · Fixed by #50040
Closed

Directional Shadow Atlas Size Cannot be Modified at Runtime #18621

cwook opened this issue May 5, 2018 · 6 comments · Fixed by #50040

Comments

@cwook
Copy link

cwook commented May 5, 2018

version 3.0.2 stable

There is currently no way (AFAIK) to change the resolution of the directional shadow atlas from GDScript, which makes changing graphics settings during runtime difficult, since the directional shadow is used in most large 3D scenes.

Additionally, changing the size of the directional shadow atlas in the Project Settings does not actually affect the size of the atlas until Godot is restarted (when it re-reads the godot.project file and properly sets up the directional shadow atlas). I've tried deleting the node and re-adding it, closing and opening the scene, and even creating a new scene, but the shadow atlas size stays the same as when Godot was launched.

@cwook cwook changed the title Modifying Directional Shadow Atlas Size From Code Direction Shadow Atlas Size Cannot be Modified at Runtime May 5, 2018
@KeyboardDanni
Copy link
Contributor

+1, tried to make a graphics settings menu and was wondering why my changes weren't taking effect.

@YeldhamDev
Copy link
Member

Does this dosn't work?
get_tree().root.shadow_atlas_size = [value you want here]

@Calinou
Copy link
Member

Calinou commented Jul 17, 2019

It's possible to override project settings before the project is initialized, see #30087 (comment). However, this still requires the user to restart the project to be able to see changes to the directional shadow size.

@YeldhamDev The shadow atlas size is only used by OmniLights and SpotLights, not DirectionalLights.

@EzraT
Copy link

EzraT commented Nov 14, 2019

+1, Would love to have this accessible in Viewport directly.

Is there a specific reason why the Directional Shadow Atlas can not be resized on the fly? or is it just simply not implemented yet?

@clayjohn
Copy link
Member

@EzraT it has to do with the current design of the renderer. It just wasn't built to handle that sort of thing. So it's not a matter of just allowing directional atlas to be resized, we would have to significantly restructure parts of the rendering backend.

AFAIK 4.0 will allow you to change most graphics settings on the fly due to the restructuring that already took place for Vulkan. :)

@clayjohn clayjohn added this to the 4.0 milestone Nov 14, 2019
@EzraT
Copy link

EzraT commented Nov 14, 2019

@clayjohn Gotya, thanks for the clarification!
Good to know rendering will be more flexible in 4.0.

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