summaryrefslogtreecommitdiff
path: root/editor/plugins/node_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2020-12-17 15:56:59 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-12-18 15:48:03 +0100
commitd2302f53d6ad80943e7f4245ac572003f1681d00 (patch)
treef1d46d8194f01e56cd3a4d042b9b33ba728c6f62 /editor/plugins/node_3d_editor_plugin.cpp
parent36b4e035dc7c410c29cda4446f8daa2e00a31da0 (diff)
Implement automatic LOD (Level of Detail)
-Happens on import by default for all models -Just works (tm) -Biasing can be later adjusted per node or per viewport (as well as globally) -Disabled AABB.get_support test because its broken
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index ff3b50303f..f0d512e4b2 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3017,7 +3017,8 @@ void Node3DEditorViewport::_menu_option(int p_option) {
case VIEW_DISPLAY_DEBUG_DECAL_ATLAS:
case VIEW_DISPLAY_DEBUG_SDFGI:
case VIEW_DISPLAY_DEBUG_SDFGI_PROBES:
- case VIEW_DISPLAY_DEBUG_GI_BUFFER: {
+ case VIEW_DISPLAY_DEBUG_GI_BUFFER:
+ case VIEW_DISPLAY_DEBUG_DISABLE_LOD: {
static const int display_options[] = {
VIEW_DISPLAY_NORMAL,
VIEW_DISPLAY_WIREFRAME,
@@ -3034,6 +3035,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE,
VIEW_DISPLAY_DEBUG_SSAO,
VIEW_DISPLAY_DEBUG_GI_BUFFER,
+ VIEW_DISPLAY_DEBUG_DISABLE_LOD,
VIEW_DISPLAY_DEBUG_PSSM_SPLITS,
VIEW_DISPLAY_DEBUG_DECAL_ATLAS,
VIEW_DISPLAY_DEBUG_SDFGI,
@@ -3056,6 +3058,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
Viewport::DEBUG_DRAW_SCENE_LUMINANCE,
Viewport::DEBUG_DRAW_SSAO,
Viewport::DEBUG_DRAW_GI_BUFFER,
+ Viewport::DEBUG_DRAW_DISABLE_LOD,
Viewport::DEBUG_DRAW_PSSM_SPLITS,
Viewport::DEBUG_DRAW_DECAL_ATLAS,
Viewport::DEBUG_DRAW_SDFGI,
@@ -3959,6 +3962,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
display_submenu->add_radio_check_item(TTR("SSAO"), VIEW_DISPLAY_DEBUG_SSAO);
display_submenu->add_separator();
display_submenu->add_radio_check_item(TTR("GI Buffer"), VIEW_DISPLAY_DEBUG_GI_BUFFER);
+ display_submenu->add_separator();
+ display_submenu->add_radio_check_item(TTR("Disable LOD"), VIEW_DISPLAY_DEBUG_DISABLE_LOD);
display_submenu->set_name("display_advanced");
view_menu->get_popup()->add_submenu_item(TTR("Display Advanced..."), "display_advanced", VIEW_DISPLAY_ADVANCED);
view_menu->get_popup()->add_separator();