Ray Traced Reflections Using Progressive Voxelization
- Progressively generating a voxel grid using a single depth buffer.
- First shader pass creates a position texture using the depth buffer.
- After that, one compute shader cleans up the invalid voxels by ray marching through the grid from camera to pixel position and the second compute shader enters voxel data into the grid using the color buffer and the position texture of the current frame.
- Lastly, reflections are computed using ray tracing through the voxel grid followed by blending with the original source texture.
- Usage : Can be used along with cubemap for interior environments. Use reflections from cubemap where hit using ray tracing couldn’t be found to substitute reflections where originally scene information is not present. With time, cubemap reflections will get replaced by ray traced ones as the voxel grid keeps on getting populated while the player explores the environment.
- Takes 1.6 ms at 720p on an Nvidia GTX 960M while tracing at half resolution.