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.
Hantverk'n
Status | In development |
Author | Teknologicus |
Genre | Adventure |
Tags | Exploration, Open World, Voxel |
More posts
- Voxel-level ambient occlusion optimization bits generation via compute shader22 days ago
- Image rotation via shearing27 days ago
- Rotation without rotating28 days ago
- Dynamic global illumination methods41 days ago
- More ambient occlusions optimizations68 days ago
- Procedurally generated grooved, cracked brick blocks71 days ago
- Procedurally generated cobblestone blocks with surface indentations71 days ago
- Procedurally generated mortar grooved brick blocks72 days ago
- Testing other colors of procedurally generated mushrooms76 days ago
Comments
Log in with itch.io to leave a comment.
Wow.