1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Fully enable HDR2D when the setting is changed. This allows toggling HDR2D without restarting.

This commit is contained in:
clayjohn
2025-01-29 23:39:14 -08:00
parent ee4acfbfbf
commit d774f697d3
2 changed files with 2 additions and 1 deletions

View File

@@ -467,6 +467,7 @@ void EditorNode::_update_from_settings() {
bool use_hdr_2d = GLOBAL_GET("rendering/viewport/hdr_2d"); bool use_hdr_2d = GLOBAL_GET("rendering/viewport/hdr_2d");
scene_root->set_use_hdr_2d(use_hdr_2d); scene_root->set_use_hdr_2d(use_hdr_2d);
get_viewport()->set_use_hdr_2d(use_hdr_2d);
float mesh_lod_threshold = GLOBAL_GET("rendering/mesh_lod/lod_change/threshold_pixels"); float mesh_lod_threshold = GLOBAL_GET("rendering/mesh_lod/lod_change/threshold_pixels");
scene_root->set_mesh_lod_threshold(mesh_lod_threshold); scene_root->set_mesh_lod_threshold(mesh_lod_threshold);

View File

@@ -1892,7 +1892,7 @@ SceneTree::SceneTree() {
const bool transparent_background = GLOBAL_DEF("rendering/viewport/transparent_background", false); const bool transparent_background = GLOBAL_DEF("rendering/viewport/transparent_background", false);
root->set_transparent_background(transparent_background); root->set_transparent_background(transparent_background);
const bool use_hdr_2d = GLOBAL_DEF_RST_BASIC("rendering/viewport/hdr_2d", false); const bool use_hdr_2d = GLOBAL_DEF_BASIC("rendering/viewport/hdr_2d", false);
root->set_use_hdr_2d(use_hdr_2d); root->set_use_hdr_2d(use_hdr_2d);
const int ssaa_mode = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"), 0); const int ssaa_mode = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"), 0);