Skip to content

Commit

Permalink
Merge pull request #42694 from Calinou/reflection-atlas-hdr-require-r…
Browse files Browse the repository at this point in the history
…estart

Recommend restarting after changing the reflection atlas size or HDR
  • Loading branch information
akien-mga authored Oct 10, 2020
2 parents 0cea273 + ad4e80f commit a392aa4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scene/main/scene_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2071,15 +2071,15 @@ SceneTree::SceneTree() {
root->set_as_audio_listener_2d(true);
current_scene = NULL;

int ref_atlas_size = GLOBAL_DEF("rendering/quality/reflections/atlas_size", 2048);
int ref_atlas_size = GLOBAL_DEF_RST("rendering/quality/reflections/atlas_size", 2048);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/reflections/atlas_size", PropertyInfo(Variant::INT, "rendering/quality/reflections/atlas_size", PROPERTY_HINT_RANGE, "0,8192,or_greater")); //next_power_of_2 will return a 0 as min value
int ref_atlas_subdiv = GLOBAL_DEF("rendering/quality/reflections/atlas_subdiv", 8);
int ref_atlas_subdiv = GLOBAL_DEF_RST("rendering/quality/reflections/atlas_subdiv", 8);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/reflections/atlas_subdiv", PropertyInfo(Variant::INT, "rendering/quality/reflections/atlas_subdiv", PROPERTY_HINT_RANGE, "0,32,or_greater")); //next_power_of_2 will return a 0 as min value
int msaa_mode = GLOBAL_DEF("rendering/quality/filters/msaa", 0);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/msaa", PropertyInfo(Variant::INT, "rendering/quality/filters/msaa", PROPERTY_HINT_ENUM, "Disabled,2x,4x,8x,16x,AndroidVR 2x,AndroidVR 4x"));
root->set_msaa(Viewport::MSAA(msaa_mode));

GLOBAL_DEF("rendering/quality/depth/hdr", true);
GLOBAL_DEF_RST("rendering/quality/depth/hdr", true);
GLOBAL_DEF("rendering/quality/depth/hdr.mobile", false);

bool hdr = GLOBAL_GET("rendering/quality/depth/hdr");
Expand Down

0 comments on commit a392aa4

Please sign in to comment.