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
- Overhaul of buffer use in voxel engine7 days ago
- Tetahexacontree 4x4x4 Occupancy Bitmasks Lookup Table19 days ago
- Voxel-level ambient occlusion optimization bits generation via compute shader60 days ago
- Image rotation via shearing65 days ago
- Rotation without rotating66 days ago
- Dynamic global illumination methods79 days ago
- More ambient occlusions optimizationsAug 30, 2024
- Procedurally generated grooved, cracked brick blocksAug 27, 2024
- Procedurally generated cobblestone blocks with surface indentationsAug 27, 2024
Comments
Log in with itch.io to leave a comment.
Wow.