summaryrefslogtreecommitdiff
path: root/modules/raycast/raycast_occlusion_cull.cpp
AgeCommit message (Collapse)Author
2022-02-07Improvements and fixes to occludersjfons
Improvements: * Occluder3D is now an abstract type inherited by: ArrayOccluder3D, QuadOccluder3D, BoxOccluder3D, SphereOccluder3D and PolygonOccluder3D. ArrayOccluder3D serves the same purpose as the old Occluder3D (triangle mesh occluder) while the rest are primitives that can be used to manually place simple occluders. * Occluder baking can now apply simplification. The "bake_simplification_distance" property can be used to set a world-space distance as the desired maximum error, set to 0.1 by default. * Occluders can now be generated on import. Using the "occ" and "occonly" keywords (similar to "col" and "colonly" for colliders) or by enabling on MeshInstance3Ds in the scene's import window. Fixes: * Fixed saving of occluder files after bake. * Fixed a small error where occluders didn't correctly update in the rendering server. Bonus content: * Generalized "CollisionPolygon3DEditor" so it can also be used to edit Resources. Renamed it to "Polygon3DEditor" since it was already being used by other things, not just colliders. * Fixed a small bug in "EditorPropertyArray" where a call to "remove" was left after the "remove_at" rename.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-09-30Merge pull request #53245 from JFonS/occ_fixes2Rémi Verschelde
Occlusion culling fixes
2021-09-30Occlusion culling fixesjfons
Fixes some issues found by UBSAN and other misc things: * Fixed memory leak on exit. * Properly align ray packet buffer to 64 bytes. * Added some compiler flags from Embree's build system. * Fixed ray masks.
2021-09-29Rename RID's `getornull()` to `get_or_null()`Hugo Locurcio
2021-09-10Occlusion culling fixesjfons
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-04-28Raycast: Fix use of removed copymem after #48239Rémi Verschelde
2021-04-23Implement occlusion cullingjfons
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.