summaryrefslogtreecommitdiffstats
path: root/editor/node_3d_editor_gizmos.h
diff options
context:
space:
mode:
authorjfons <joan.fonssanchez@gmail.com>2021-04-20 18:40:24 +0200
committerjfons <joan.fonssanchez@gmail.com>2021-04-23 21:45:23 +0200
commit4d9d99bb827967e2bb931eeb8c3f0e079b39ae1a (patch)
treedcd5ff54562db253500aa835a27f3b2548e42eb9 /editor/node_3d_editor_gizmos.h
parent34b3e8f9e2ae076990ecf3b2827eff759ba2abf9 (diff)
downloadredot-engine-4d9d99bb827967e2bb931eeb8c3f0e079b39ae1a.tar.gz
Implement occlusion culling
Added an occlusion culling system with support for static occluder meshes. It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`. Occluders are defined via the new `Occluder3D` resource and instanced using the new `OccluderInstance3D` node. The occluders can also be automatically baked from a scene using the built-in editor plugin.
Diffstat (limited to 'editor/node_3d_editor_gizmos.h')
-rw-r--r--editor/node_3d_editor_gizmos.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/node_3d_editor_gizmos.h b/editor/node_3d_editor_gizmos.h
index 6f98d3a08c..95344176ad 100644
--- a/editor/node_3d_editor_gizmos.h
+++ b/editor/node_3d_editor_gizmos.h
@@ -100,6 +100,18 @@ public:
MeshInstance3DGizmoPlugin();
};
+class OccluderInstance3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+ GDCLASS(OccluderInstance3DGizmoPlugin, EditorNode3DGizmoPlugin);
+
+public:
+ bool has_gizmo(Node3D *p_spatial) override;
+ String get_gizmo_name() const override;
+ int get_priority() const override;
+ void redraw(EditorNode3DGizmo *p_gizmo) override;
+
+ OccluderInstance3DGizmoPlugin();
+};
+
class Sprite3DGizmoPlugin : public EditorNode3DGizmoPlugin {
GDCLASS(Sprite3DGizmoPlugin, EditorNode3DGizmoPlugin);