Allow changing directional shadow size at run-time

Factoring out the directional shadow creation code allows calling it
at any time. This works in both GLES3 and GLES2.
This commit is contained in:
Hugo Locurcio
2021-10-23 22:04:59 +02:00
parent 62f56af694
commit 31ad99072f
6 changed files with 114 additions and 72 deletions

View File

@ -2599,7 +2599,7 @@ VisualServer::VisualServer() {
GLOBAL_DEF("rendering/limits/time/time_rollover_secs", 3600);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/time/time_rollover_secs", PropertyInfo(Variant::REAL, "rendering/limits/time/time_rollover_secs", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"));
GLOBAL_DEF_RST("rendering/quality/directional_shadow/size", 4096);
GLOBAL_DEF("rendering/quality/directional_shadow/size", 4096);
GLOBAL_DEF("rendering/quality/directional_shadow/size.mobile", 2048);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/quality/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"));
GLOBAL_DEF_RST("rendering/quality/shadow_atlas/size", 4096);