extended_morton_coder

Crates.ioextended_morton_coder
lib.rsextended_morton_coder
version0.1.0
sourcesrc
created_at2023-05-23 19:21:47.142138
updated_at2023-05-23 19:21:47.142138
descriptionCompute extended morton codes
homepage
repositoryhttps://github.com/Andrewp2/extended_morton_coder
max_upload_size
id872267
size31,895
Andrew Peterson (Andrewp2)

documentation

README

Extended Morton Coder

A rust library that computes extended morton codes (see the abstract). Instead of just using the XYZ coordinates of the centroid, it additionally uses the length of the diagonal to split off primitives with different sizes. It also has adaptive axis order, to use more bits in a skewed dimension.

Reason to use size bits - if you can split off large primitives from the smaller ones, you can keep them together in a BVH, away from the other primitives. This means the large AABB of the large primitives will not "infect" the smaller ones, allowing you to ignore a large number of small primitives with fewer AABB tests.

Reason to use adapative axis order - if your scene is skewed, say it's 4x longer in the X and Y dimensions than in the Z dimension, you can allocate more bits for the X and Y part of the code, enabling better tracing performance.

Notes

Still a WIP. See issues for various bugs. This crate is in a more-or-less finished state (although PRs are still welcome to fix those issues!)

Commit count: 3

cargo fmt