summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_inspector.cpp34
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp5
-rw-r--r--editor/plugins/node_3d_editor_plugin.h1
4 files changed, 39 insertions, 3 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index c92d1d009d..a0f8b59117 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1478,6 +1478,8 @@ void EditorInspector::update_tree() {
String filter = search_box ? search_box->get_text() : "";
String group;
String group_base;
+ String subgroup;
+ String subgroup_base;
VBoxContainer *category_vbox = nullptr;
List<PropertyInfo>
@@ -1503,10 +1505,19 @@ void EditorInspector::update_tree() {
//make sure the property can be edited
- if (p.usage & PROPERTY_USAGE_GROUP) {
+ if (p.usage & PROPERTY_USAGE_SUBGROUP) {
+
+ subgroup = p.name;
+ subgroup_base = p.hint_string;
+
+ continue;
+
+ } else if (p.usage & PROPERTY_USAGE_GROUP) {
group = p.name;
group_base = p.hint_string;
+ subgroup = "";
+ subgroup_base = "";
continue;
@@ -1514,6 +1525,8 @@ void EditorInspector::update_tree() {
group = "";
group_base = "";
+ subgroup = "";
+ subgroup_base = "";
if (!show_categories)
continue;
@@ -1577,18 +1590,33 @@ void EditorInspector::update_tree() {
}
String basename = p.name;
+
+ if (subgroup != "") {
+ if (subgroup_base != "") {
+ if (basename.begins_with(subgroup_base)) {
+ basename = basename.replace_first(subgroup_base, "");
+ } else if (subgroup_base.begins_with(basename)) {
+ //keep it, this is used pretty often
+ } else {
+ subgroup = ""; //no longer using subgroup base, clear
+ }
+ }
+ }
if (group != "") {
- if (group_base != "") {
+ if (group_base != "" && subgroup == "") {
if (basename.begins_with(group_base)) {
basename = basename.replace_first(group_base, "");
} else if (group_base.begins_with(basename)) {
//keep it, this is used pretty often
} else {
group = ""; //no longer using group base, clear
+ subgroup = "";
}
}
}
-
+ if (subgroup != "") {
+ basename = subgroup + "/" + basename;
+ }
if (group != "") {
basename = group + "/" + basename;
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index e7c1eaf777..d8f0a2764a 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -374,6 +374,8 @@ void EditorNode::_notification(int p_what) {
float sss_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_scale");
float sss_depth_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale");
RS::get_singleton()->sub_surface_scattering_set_scale(sss_scale, sss_depth_scale);
+ RS::ShadowFilter shadow_filter = RS::ShadowFilter(int(GLOBAL_GET("rendering/quality/shadows/filter_mode")));
+ RS::get_singleton()->shadow_filter_set(shadow_filter);
}
ResourceImporterTexture::get_singleton()->update_imports();
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 1ebcd3abfd..1c16ed6b58 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3000,6 +3000,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
case VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION:
case VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE:
case VIEW_DISPLAY_DEBUG_SSAO:
+ case VIEW_DISPLAY_DEBUG_PSSM_SPLITS:
case VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER: {
static const int display_options[] = {
@@ -3018,6 +3019,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE,
VIEW_DISPLAY_DEBUG_SSAO,
VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER,
+ VIEW_DISPLAY_DEBUG_PSSM_SPLITS,
VIEW_MAX
};
static const Viewport::DebugDraw debug_draw_modes[] = {
@@ -3036,6 +3038,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
Viewport::DEBUG_DRAW_SCENE_LUMINANCE,
Viewport::DEBUG_DRAW_SSAO,
Viewport::DEBUG_DRAW_ROUGHNESS_LIMITER,
+ Viewport::DEBUG_DRAW_PSSM_SPLITS,
};
int idx = 0;
@@ -3887,6 +3890,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
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("Directional Shadow Splits"), VIEW_DISPLAY_DEBUG_PSSM_SPLITS);
+ display_submenu->add_separator();
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);
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 552afb99e0..bb83e7f626 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -218,6 +218,7 @@ class Node3DEditorViewport : public Control {
VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE,
VIEW_DISPLAY_DEBUG_SSAO,
VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER,
+ VIEW_DISPLAY_DEBUG_PSSM_SPLITS,
VIEW_LOCK_ROTATION,
VIEW_CINEMATIC_PREVIEW,
VIEW_AUTO_ORTHOGONAL,