diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-04-14 00:05:21 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-04-14 11:13:34 -0300 |
commit | 5944eb6e7f4fc6f2a2b3a88032e3195467a12915 (patch) | |
tree | 80e38590d93bdb7d7a1c98310c5cc8baa99d64ad /editor/plugins | |
parent | 451d5bd49217e4b55221032e67a7e682e20dad67 (diff) |
Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 5c38a57cca..960431e655 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -3034,6 +3034,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { case VIEW_DISPLAY_DEBUG_SCENE_LUMINANCE: case VIEW_DISPLAY_DEBUG_SSAO: case VIEW_DISPLAY_DEBUG_PSSM_SPLITS: + case VIEW_DISPLAY_DEBUG_DECAL_ATLAS: case VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER: { static const int display_options[] = { @@ -3053,6 +3054,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { VIEW_DISPLAY_DEBUG_SSAO, VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER, VIEW_DISPLAY_DEBUG_PSSM_SPLITS, + VIEW_DISPLAY_DEBUG_DECAL_ATLAS, VIEW_MAX }; static const Viewport::DebugDraw debug_draw_modes[] = { @@ -3072,6 +3074,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { Viewport::DEBUG_DRAW_SSAO, Viewport::DEBUG_DRAW_ROUGHNESS_LIMITER, Viewport::DEBUG_DRAW_PSSM_SPLITS, + Viewport::DEBUG_DRAW_DECAL_ATLAS, }; int idx = 0; @@ -3933,6 +3936,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito 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(); + display_submenu->add_radio_check_item(TTR("Decal Atlas"), VIEW_DISPLAY_DEBUG_DECAL_ATLAS); + display_submenu->add_separator(); display_submenu->add_radio_check_item(TTR("GIProbe Lighting"), VIEW_DISPLAY_DEBUG_GIPROBE_LIGHTING); display_submenu->add_radio_check_item(TTR("GIProbe Albedo"), VIEW_DISPLAY_DEBUG_GIPROBE_ALBEDO); display_submenu->add_radio_check_item(TTR("GIProbe Emission"), VIEW_DISPLAY_DEBUG_GIPROBE_EMISSION); @@ -5963,6 +5968,7 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref<GPUParticles3DGizmoPlugin>(memnew(GPUParticles3DGizmoPlugin))); add_gizmo_plugin(Ref<CPUParticles3DGizmoPlugin>(memnew(CPUParticles3DGizmoPlugin))); add_gizmo_plugin(Ref<ReflectionProbeGizmoPlugin>(memnew(ReflectionProbeGizmoPlugin))); + add_gizmo_plugin(Ref<DecalGizmoPlugin>(memnew(DecalGizmoPlugin))); add_gizmo_plugin(Ref<GIProbeGizmoPlugin>(memnew(GIProbeGizmoPlugin))); // add_gizmo_plugin(Ref<BakedIndirectLightGizmoPlugin>(memnew(BakedIndirectLightGizmoPlugin))); add_gizmo_plugin(Ref<CollisionShape3DGizmoPlugin>(memnew(CollisionShape3DGizmoPlugin))); diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 5f0ba1921b..2c3b15cfc8 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -219,6 +219,7 @@ class Node3DEditorViewport : public Control { VIEW_DISPLAY_DEBUG_SSAO, VIEW_DISPLAY_DEBUG_ROUGHNESS_LIMITER, VIEW_DISPLAY_DEBUG_PSSM_SPLITS, + VIEW_DISPLAY_DEBUG_DECAL_ATLAS, VIEW_LOCK_ROTATION, VIEW_CINEMATIC_PREVIEW, VIEW_AUTO_ORTHOGONAL, |