davids91 / shocovox

Sparse Voxel Octree implementation in WGSL ( hence: shady ) with handling and utilities in Rust.
Other
9 stars 1 forks source link

Reduced jumping between depths during raymarching iteration #22

Closed davids91 closed 5 months ago

davids91 commented 5 months ago

To reduce global RAM reads in GPU, and to prepare for bitmasks optimization, ray iteration advance part is updated to check for the sibling targets being empty, before pushing the iteration into it.

Introduced a loop checking if the target node is empty and advancing the iteration forward until either

As a result iteration is smarter by checking forward to see if the next target child is a valid candidate for iteration.

By combining this modification with #21 there is potential for increased raytracing performance.

Original algorithm was based on: https://research.nvidia.com/sites/default/files/pubs/2010-02_Efficient-Sparse-Voxel/laine2010tr1_paper.pdf