Voxel based Global Illumination in Unity


  • Customized the Unity lighting engine by writing a custom GI solution for it.
  • Obtain a render texture after using Unity’s direct lighting model.
  • Voxelize the scene and store it in 6 different Voxel Grids of different resolutions by running a compute shader to read render textures of direct lighting from 6 different cameras and enter a 4 byte integer packing position and occupied flag into a structured buffer for each voxel-grid level.
  • Perform cone tracing through the voxel grid by traversing through levels of decreasing resolutions for computing indirect illumination, using a cone for indirect specular illumination and 19 cones for indirect diffuse illumination.
  • Additively blend together the textures obtained after indirect diffuse and specular illumination with the original direct lighting texture to obtain the final output.


June, 2016