vange-rs icon indicating copy to clipboard operation
vange-rs copied to clipboard

[meta] Voxel ray tracing plan

Open kvark opened this issue 2 years ago • 2 comments

  • [x] land the implementation - #218
  • [ ] create tools to measure GPU time, to start optimization
  • [ ] use Morton codes for the terrain buffer. This will improve data locality access patterns. Possibly, use a 2x2 texel tile as the basis (instead of the 2x1 that we have today). Probably need to update it in a compute shader.
    • [ ] alternatively, switch the terrain buffer to an R32Uint texture (storing 2 texels)
  • [x] store voxel data into a buffer as well. Use Morton codes for addressing. Pack bits into 32bit words.
  • [x] optimize voxel construction. It takes too long to load a level.
  • [x] address the portability issues, e.g. #222
  • [ ] environment map for the sky
  • [x] describe the rendering approach in the blog.
  • [x] voxelized shadow rendering

kvark avatar Oct 31 '22 13:10 kvark

Baseline on my Mac - the default camera of the Level binary on Fostral. Window size 2280x1524. 40ms for RT. Texture units are busy 98.7% of the time.

kvark avatar Nov 01 '22 02:11 kvark

WIth #223 I'm seeing the time for RT raising to 48ms (about 20% hike). Still worth it given the reduced VRAM, and now we are mostly ALU bound, which scales better with GPUs.

kvark avatar Nov 04 '22 06:11 kvark