diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-01-25 07:18:55 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 12:15:46 +0100 |
commit | bed8980ca50cb6a197f37e3decaff963d5cedce1 (patch) | |
tree | ebbc9630b6b6bca7d12efb2d8b777b9928ba2be5 /editor | |
parent | ee1e89f8c0dc4659a2ed4b5afd5e7c1c596f7af1 (diff) |
Re-implemented screen space ambient occlusion
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 9 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2fb417ad49..a3d9b180f0 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -360,6 +360,7 @@ void EditorNode::_notification(int p_what) { VS::DOFBlurQuality dof_quality = VS::DOFBlurQuality(int(GLOBAL_GET("rendering/quality/filters/depth_of_field_bokeh_quality"))); bool dof_jitter = GLOBAL_GET("rendering/quality/filters/depth_of_field_use_jitter"); VS::get_singleton()->camera_effects_set_dof_blur_quality(dof_quality, dof_jitter); + VS::get_singleton()->environment_set_ssao_quality(VS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/quality/ssao/quality"))), GLOBAL_GET("rendering/quality/ssao/half_size")); } ResourceImporterTexture::get_singleton()->update_imports(); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 7711231be8..815b3be698 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2769,7 +2769,8 @@ void SpatialEditorViewport::_menu_option(int p_option) { case VIEW_DISPLAY_DEBUG_GIPROBE_ALBEDO: case VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING: case VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION: - case VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE: { + case VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE: + case VIEW_DISPLAY_DEBUG_SSAO: { static const int display_options[] = { VIEW_DISPLAY_NORMAL, @@ -2784,6 +2785,7 @@ void SpatialEditorViewport::_menu_option(int p_option) { VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING, VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION, VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE, + VIEW_DISPLAY_DEBUG_SSAO, VIEW_MAX }; static const Viewport::DebugDraw debug_draw_modes[] = { @@ -2798,7 +2800,8 @@ void SpatialEditorViewport::_menu_option(int p_option) { Viewport::DEBUG_DRAW_GI_PROBE_ALBEDO, Viewport::DEBUG_DRAW_GI_PROBE_LIGHTING, Viewport::DEBUG_DRAW_GI_PROBE_EMISSION, - Viewport::DEBUG_DRAW_SCENE_LUMINANCE + Viewport::DEBUG_DRAW_SCENE_LUMINANCE, + Viewport::DEBUG_DRAW_SSAO }; int idx = 0; @@ -3644,6 +3647,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed display_submenu->add_radio_check_item(TTR("GIProbe Emission"), VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION); display_submenu->add_separator(); display_submenu->add_radio_check_item(TTR("Scene Luminance"), VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE); + display_submenu->add_separator(); + display_submenu->add_radio_check_item(TTR("SSAO"), VIEW_DISPLAY_DEBUG_SSAO); display_submenu->set_name("display_advanced"); view_menu->get_popup()->add_submenu_item(TTR("Display Advanced..."), "display_advanced"); view_menu->get_popup()->add_separator(); diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 0eb56989e0..065a0396a8 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -174,6 +174,7 @@ class SpatialEditorViewport : public Control { VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING, VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION, VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE, + VIEW_DISPLAY_DEBUG_SSAO, VIEW_LOCK_ROTATION, VIEW_CINEMATIC_PREVIEW, VIEW_MAX |