Avokadoen / zig_vulkan

Toying with vulkan and zig
45 stars 2 forks source link

Rewrite DDA transitions between bricks and grid #103

Open Avokadoen opened 2 years ago

Avokadoen commented 2 years ago

Currently what blocking issue #96 is performance issues when initializing new DDA traversal for each new possible grid hit in the higher order grid. This same mechanism of re-initializing DDA is currently being used for possible brick hits and probably is a big bottleneck. Using a unique DDA traversal for possible brick and grid hits cause a lot of warp divergence since DDA initialization requires if statements (and also creating new data). It would be better if DDA was defined as one initialization and a traversal only defines step size.

To summarize, grid traversal should technically be 8x brick traversal. Traversing a brick should be in grid space, not in brick space and should be reusing the same DDA data as the grid. This should be a boon for performance and allow for easier integration with higher grid traversal without causing substantial performance issues on smaller grids ...

Avokadoen commented 2 years ago

Related #92