GridVids
Sign in with YouTube

Reflections with Spherical Normals on Voxels

Jed037 Apr 26, 2026 20:22
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

Got iterative reflections to work using the acceleration structure. As the AS is recursive/hierarchical, the world is not modifiable at the moment. I need to implement a way to either incrementally update the AS (should be easy), or to use a paging system that will intermediately store Texture3Ds whenever a voxel needs modification (i.e it will just "delay" updating the AS at the cost of extra memory, but should allow for much faster insertions/deletions, since texture look-ups would be O(1) relatively. Might be over-thinking it though) The traversal code is horrible. It is very slow, occupancy is at an all time low, registers spilled to scratch memory (even slower!). And this is with only 5 depth levels, where each level traverses a 4x4x4 cubic volume using simple DDA. It might be worth trying to increase the AS-tree branching factor from 64 to something like 512 to reduce this but that will not help much. Ideally, we wouldn't need a recursive traversal implementation, especially not on the GPU, but for now this is what works and it is definitely faster than raw DDA for the same volume size (1024x1024x1024). Will need to implement proper cone tracing to get glossy reflections going without having to trace many rays but that is just an idea.
Science & Technology