Object Occlusion Culling

This commit is contained in:
2026-10-15 02:41:03 -07:00
parent 3273054766
commit 612a3d0a09
33 changed files with 3629 additions and 84 deletions

23
lib/radix/README.md Normal file
View File

@ -0,0 +1,23 @@
# Radix
Haxe port: in-place MSD radix sort (American flag sort) with an insertion sort fallback for small sub-ranges implemented in the Leenkx SDK by Riccardo Mazzucco
Original reference source Malte Skarupke's [ska_sort](https://github.com/skarupke/ska_sort) - https://github.com/skarupke/ska_sort
## Usage
```haxe
import radix.Radix;
// Stable sort: counting-sort scatter between `a` and `buffer`.
// Equal keys keep input order - matches haxe Array.sort semantics.
Radix.sortCopyKeyed(meshes, keys, meshesBuf, keysBuf);
// In-place MSD sort on the same (element, keys) arrays.
// No scratch buffer needed, but NOT stable - equal keys may reorder.
Radix.sortKeyed(meshes, keys);
// Or let the sorter build keys from an extractor
Radix.sort(meshes, function(m) {
return (m.depthRead ? 0x80000000 : 0) | (FPHelper.floatToI32(m.cameraDistance) >>> 1);
});
```