summaryrefslogtreecommitdiff
path: root/servers/rendering/rendering_server_default.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 /servers/rendering/rendering_server_default.h
parent34b3e8f9e2ae076990ecf3b2827eff759ba2abf9 (diff)
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 'servers/rendering/rendering_server_default.h')
-rw-r--r--servers/rendering/rendering_server_default.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h
index 683a22fd9a..324c002d6f 100644
--- a/servers/rendering/rendering_server_default.h
+++ b/servers/rendering/rendering_server_default.h
@@ -540,6 +540,10 @@ public:
FUNC2(camera_set_camera_effects, RID, RID)
FUNC2(camera_set_use_vertical_aspect, RID, bool)
+ /* OCCLUDER */
+ FUNCRIDSPLIT(occluder)
+ FUNC3(occluder_set_mesh, RID, const PackedVector3Array &, const PackedInt32Array &);
+
#undef server_name
#undef ServerName
//from now on, calls forwarded to this singleton
@@ -590,6 +594,9 @@ public:
FUNC2(viewport_set_msaa, RID, ViewportMSAA)
FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
FUNC2(viewport_set_use_debanding, RID, bool)
+ FUNC2(viewport_set_use_occlusion_culling, RID, bool)
+ FUNC1(viewport_set_occlusion_rays_per_thread, int)
+ FUNC1(viewport_set_occlusion_culling_build_quality, ViewportOcclusionCullingBuildQuality)
FUNC2(viewport_set_lod_threshold, RID, float)
FUNC2R(int, viewport_get_render_info, RID, ViewportRenderInfo)