summaryrefslogtreecommitdiffstats
path: root/scene/3d/visual_instance_3d.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 /scene/3d/visual_instance_3d.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 'scene/3d/visual_instance_3d.h')
-rw-r--r--scene/3d/visual_instance_3d.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/3d/visual_instance_3d.h b/scene/3d/visual_instance_3d.h
index 7fed8095ef..68d29ef81e 100644
--- a/scene/3d/visual_instance_3d.h
+++ b/scene/3d/visual_instance_3d.h
@@ -120,6 +120,7 @@ private:
float extra_cull_margin = 0.0;
LightmapScale lightmap_scale = LIGHTMAP_SCALE_1X;
GIMode gi_mode = GI_MODE_DISABLED;
+ bool ignore_occlusion_culling = false;
const StringName *_instance_uniform_get_remap(const StringName p_name) const;
@@ -167,6 +168,9 @@ public:
void set_custom_aabb(AABB aabb);
+ void set_ignore_occlusion_culling(bool p_enabled);
+ bool is_ignoring_occlusion_culling();
+
GeometryInstance3D();
};