Voxel volume mipmaps generation via compute shader
I've got voxel volume mipmaps generation via a compute shader working. It was a struggle because I knew little about implementing compute shaders from both the Vulkan and the GLSL side before tackling this, but I've learned a lot and am happy with the results.
- Test scene: sponza-scale-0.3.vox (1152x512x768 or 78,887,176 non-air voxels)
- Times from/to (on scene load) to generate voxel volume mipmaps:
- CPU (only using one execution thread @ 3.20GHz) : 17 seconds
- GPU via compute shader: 0.4 seconds
- Times from/to (on scene load) to generate voxel volume mipmaps:
Keep in mind this compute shader mipmap generation is done in parallel on a per voxel volume basis, so if only one or two volumes are changed at a time while playing or editing in creative mode, the performance gain isn't mind blowing compared to what it used to be.
Next I will tackle voxel ambient occlusion optimization bits generation being done via a compute shader because that is computationally expensive when done only on the CPU.
After that, I will work on dynamic lighting (voxel cone tracing).
On the subject of voxel ambient occlusion optimization bits, I had gone from 6 to 20-bits per voxel for that, but that required going from 32 to 64-bit voxels. I decided the performance gain wasn't worth doubling the RAM (video card and conventional) usage for voxel data, so I've reverted back to the less aggressive voxel ambient occlusion optimizations and 32-bit voxels, which still gives excellent frame rates.
Vorxel
Status | In development |
Author | Teknologicus |
Genre | Adventure |
Tags | Exploration, Open World, Voxel |
More posts
- Fixed bug with dynamic direct sunlight and level of detail18 days ago
- Voxel Cone Tracing Experiment18 days ago
- Dynamic direct sunlight working with level of detail21 days ago
- Improved dynamic direct sunlight26 days ago
- Dynamic direct sunlight27 days ago
- Previous folly and finally success34 days ago
- Rasterized triangles are evil!43 days ago
- Procedurally Generated Blocks (Video)46 days ago
- Fog is working again49 days ago
- Improved fragment/compute shading rates51 days ago
Comments
Log in with itch.io to leave a comment.
Wow.