Deferred gbuffer rendering via compute shader ray marching output
I've got deferred gbuffer rendering working following compute shader ray marching output pass. (This is a prerequisite to implementing global illumination and dynamic lighting.)
GPU buffer usage went from 4.4GiB down to 2.2GiB for the large scene "Church_Of_St_Sophia.vox" which is a significant GPU RAM usage improvement.
Unfortunately, the frame rate is about half as fast. As best I can guess is that when ray marching was being done in a fragment shader, there were less cache misses because the color data went right into the frame buffer. With a compute shader pass and the rendering of the gbuffer in a fragment shader into the frame buffer, there are more cache misses both due to using the gbuffer and the additional data (voxel world space location, voxel (for its property bits [alpha, specular, emissive, portal], and scene depth) I'm storing in the gbuffer.
I also managed to break (no longer working at all) the mipmaps and voxel level ambient occlusion optimization bits. The code changes to fix this should be small, but tracking down what is wrong with the code has been a challenge.
Vorxel
Status | In development |
Author | Teknologicus |
Genre | Adventure |
Tags | Exploration, Open World, Voxel |
More posts
- Improved dynamic direct sunlight3 days ago
- Dynamic direct sunlight4 days ago
- Previous folly and finally success11 days ago
- Rasterized triangles are evil!20 days ago
- Procedurally Generated Blocks (Video)23 days ago
- Fog is working again26 days ago
- Improved fragment/compute shading rates28 days ago
- Debugging variable compute shader rates33 days ago
- Deferred gbuffer rendering update34 days ago
Comments
Log in with itch.io to leave a comment.
P.S. Decreasing ray march compute shader
workgroup sizelocal_size_x has improved frame rates.