You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Decrease the default soft shadow quality to improve performance
Soft shadows are relatively expensive to filter. However, with the default blur factors, it's not needed to use too many samples (unless PCSS-like shadows are used with a large size). Textures and screen-space antialiasing can also be used to mask the noise pattern effectively. On a GeForce GTX 1080, going from Medium to Low for both shadow types saves 0.2-0.4 ms of GPU time per frame in 2560×1440 resolution. This can translate to significantly higher savings on lower-end GPUs. Given how the shader works, this improves rendering performance even if lights with shadows are never used.
This commit is contained in:
@@ -2794,12 +2794,12 @@ RenderingServer::RenderingServer() {
|
||||
GLOBAL_DEF("rendering/shadows/directional_shadow/size", 4096);
|
||||
GLOBAL_DEF("rendering/shadows/directional_shadow/size.mobile", 2048);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"));
|
||||
GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality", 3);
|
||||
GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality", 2);
|
||||
GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality.mobile", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
||||
GLOBAL_DEF("rendering/shadows/directional_shadow/16_bits", true);
|
||||
|
||||
GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality", 3);
|
||||
GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality", 2);
|
||||
GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality.mobile", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadows/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/shadows/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user