

Regarding soft shadows, I think you just get these for free. I think you end up with only one or two voxels exported per rasterized pixel, depending on how many slices along the major axis the triangle is crossing.

I think either the original VCT paper or a related paper on fast voxelization talks about this – it’s pretty straightforward aside from how intrusive conservative rasterization can be. You’d need to add a geometry shader stage to expand the triangles plus some extra clipping code in the fragment shader to get efficient conservative rasterization, and then you’d also pick the major axis in the geometry shader to rasterize against and have the fragment shader output to all touched voxels. I’m rendering the scene 6 times just for simplicity. On my GTX 680 with R310.70, the demo runs at around 30 FPS:Ĭonservative rasterization would likely be faster. The demo requires the OpenGL 4.3 support. The zip file includes the binaries files as well as the source code (Visual Studio 2010 project). You can download the demo from this link. There may be ways to work around this deficiency: sparse textures (GL_AMD_sparse_texture), compression, or hybrid schemes that mix tree structures with 3D textures. The clear downside is the space requirement: 3D textures can’t scale to larger scenes or smaller, more detailed voxels. Compared to SVO in the context of voxel cone tracing (as opposed to ray casting, where SVO is a clear winner), 3D textures allow for easier filtering, direct lookups without evaluating the octree structure, and potentially better cache and memory bandwidth utilization (depending on cone size and scene density). Sparse voxel octrees were not implemented due to time constraints, but would have been nice to have as a baseline reference. This demo served both as a means to familiarize myself with voxel cone tracing and as a testbed for performance experiments with the voxel storage: plain 3D textures, real-time compressed 3D textures, and 3D textures aligned with the diffuse sample rays were tested. in Interactive Indirect Illumination Using Voxel Cone-Tracing, with the Crytek Sponza model used for content. Here is an implementation of global illumination (GI) using voxel cone tracing, as described by Cyril Crassin et al.
