summaryrefslogtreecommitdiff
path: root/tools/editor/plugins/spatial_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-01 22:16:52 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-01 22:16:52 -0300
commitc2a217c3501b8006a3d2cdf2c678e33def15f275 (patch)
tree9f0b2d128ef5c97d4632e387041079e59c193fd7 /tools/editor/plugins/spatial_editor_plugin.cpp
parenta62c99c4e4325ca0c015d731f2bcb9b07410bb65 (diff)
WIP particle system
Ability to enable and change MSAA settings Ability to change VCT quality Ability to enable/disable HDR rendering
Diffstat (limited to 'tools/editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index e5e8668df6..282a2748da 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -1823,6 +1823,7 @@ void SpatialEditorViewport::_notification(int p_what) {
surface->update();
}
+ //update shadow atlas if changed
int shadowmap_size = Globals::get_singleton()->get("rendering/shadow_atlas/size");
int atlas_q0 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_0_subdiv");
@@ -1830,12 +1831,22 @@ void SpatialEditorViewport::_notification(int p_what) {
int atlas_q2 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_2_subdiv");
int atlas_q3 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_3_subdiv");
+
viewport->set_shadow_atlas_size(shadowmap_size);
viewport->set_shadow_atlas_quadrant_subdiv(0,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
viewport->set_shadow_atlas_quadrant_subdiv(1,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
viewport->set_shadow_atlas_quadrant_subdiv(2,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
viewport->set_shadow_atlas_quadrant_subdiv(3,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
+ //update msaa if changed
+
+ int msaa_mode = Globals::get_singleton()->get("rendering/antialias/msaa");
+ viewport->set_msaa(Viewport::MSAA(msaa_mode));
+
+ bool hdr = Globals::get_singleton()->get("rendering/dynamic_range/hdr");
+ viewport->set_hdr(hdr);
+
+
}
if (p_what==NOTIFICATION_ENTER_TREE) {