Gamedev Hub

Voxel Global Illumination (Voxel GI)

Global Illumination (GI) is notoriously expensive because light bounces infinitely. Ray tracing (Path Tracing) is the “correct” way but is slow. Voxel GI (often called VXGI) approximates the scene as a 3D grid of lighting volumes, allowing for real-time indirect lighting and glossy reflections.

1. The Core Idea: Cone Tracing

Instead of tracing millions of rays, we trace Cones through a mip-mapped 3D texture.

2. The Pipeline

Step 1: Voxelization

We render the scene geometry into a 3D Texture (e.g., 256x256x256).

Step 2: Light Injection

We inject direct lighting (shadow maps, point lights) into the voxel grid. If a voxel contains geometry, it receives light.

Step 3: Mip-Mapping (Filtering)

We generate mip-maps for the 3D texture. Each lower mip level contains the average of its 8 children. This is crucial for performance—tracing a wide cone means sampling from a lower-resolution mip level.

Step 4: Cone Tracing

In the final deferred shading pass:

3. Why Voxels?

4. Challenges