1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

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.
This commit is contained in:
jfons
2021-04-20 18:40:24 +02:00
parent 34b3e8f9e2
commit 4d9d99bb82
50 changed files with 3138 additions and 47 deletions

View File

@@ -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)