diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-01-26 20:09:40 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 12:16:01 +0100 |
commit | 2049dec79e0293f98d4c3f972f3a660ea5758983 (patch) | |
tree | 4562c4f50b5ca46ed4848d2915370d7cb7cb821b /editor/plugins/spatial_editor_plugin.cpp | |
parent | bed8980ca50cb6a197f37e3decaff963d5cedce1 (diff) |
Added normalmap guided roughness mipmap generator, and a global roughness limiter.
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 815b3be698..88376f6ce6 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2764,13 +2764,15 @@ void SpatialEditorViewport::_menu_option(int p_option) { case VIEW_DISPLAY_OVERDRAW: case VIEW_DISPLAY_SHADELESS: case VIEW_DISPLAY_LIGHTING: + case VIEW_DISPLAY_NORMAL_BUFFER: case VIEW_DISPLAY_DEBUG_SHADOW_ATLAS: case VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS: 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_SSAO: { + case VIEW_DISPLAY_DEBUG_SSAO: + case VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER: { static const int display_options[] = { VIEW_DISPLAY_NORMAL, @@ -2778,6 +2780,7 @@ void SpatialEditorViewport::_menu_option(int p_option) { VIEW_DISPLAY_OVERDRAW, VIEW_DISPLAY_SHADELESS, VIEW_DISPLAY_LIGHTING, + VIEW_DISPLAY_NORMAL_BUFFER, VIEW_DISPLAY_WIREFRAME, VIEW_DISPLAY_DEBUG_SHADOW_ATLAS, VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS, @@ -2786,6 +2789,7 @@ void SpatialEditorViewport::_menu_option(int p_option) { VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION, VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE, VIEW_DISPLAY_DEBUG_SSAO, + VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER, VIEW_MAX }; static const Viewport::DebugDraw debug_draw_modes[] = { @@ -2794,6 +2798,7 @@ void SpatialEditorViewport::_menu_option(int p_option) { Viewport::DEBUG_DRAW_OVERDRAW, Viewport::DEBUG_DRAW_UNSHADED, Viewport::DEBUG_DRAW_LIGHTING, + Viewport::DEBUG_DRAW_NORMAL_BUFFER, Viewport::DEBUG_DRAW_WIREFRAME, Viewport::DEBUG_DRAW_SHADOW_ATLAS, Viewport::DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS, @@ -2801,7 +2806,8 @@ void SpatialEditorViewport::_menu_option(int p_option) { Viewport::DEBUG_DRAW_GI_PROBE_LIGHTING, Viewport::DEBUG_DRAW_GI_PROBE_EMISSION, Viewport::DEBUG_DRAW_SCENE_LUMINANCE, - Viewport::DEBUG_DRAW_SSAO + Viewport::DEBUG_DRAW_SSAO, + Viewport::DEBUG_DRAW_ROUGHNESS_LIMITER, }; int idx = 0; @@ -3639,6 +3645,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed view_menu->get_popup()->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/view_display_lighting", TTR("Display Lighting")), VIEW_DISPLAY_LIGHTING); view_menu->get_popup()->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/view_display_unshaded", TTR("Display Unshaded")), VIEW_DISPLAY_SHADELESS); view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_DISPLAY_NORMAL), true); + display_submenu->add_radio_check_item(TTR("Normal Buffer"), VIEW_DISPLAY_NORMAL_BUFFER); + display_submenu->add_separator(); display_submenu->add_radio_check_item(TTR("Shadow Atlas"), VIEW_DISPLAY_DEBUG_SHADOW_ATLAS); display_submenu->add_radio_check_item(TTR("Directional Shadow"), VIEW_DISPLAY_DEBUG_DIRECTIONAL_SHADOW_ATLAS); display_submenu->add_separator(); @@ -3649,6 +3657,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed 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->add_separator(); + display_submenu->add_radio_check_item(TTR("Roughness Limiter"), VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER); display_submenu->set_name("display_advanced"); view_menu->get_popup()->add_submenu_item(TTR("Display Advanced..."), "display_advanced"); view_menu->get_popup()->add_separator(); |