C++, DirectX 12 (DXR), HLSL, MiniEngine
Solo Project
Researcher & Graphics Programmer
Github
Project Overview
Modern engines like Frostbite (used in Skate 3 and EA College Football) rely on advanced global illumination (GI) to simulate how light bounces between surfaces in real time. One of Frostbite’s more recent approaches is surfel-based global illumination (SBGI), as introduced in Global Illumination Based on Surfels (GIBS). This technique discretizes irradiance directly on surfaces, but it suffers from overspawning surfels in regions with high normal variation (such as foliage), which leads to wasted performance.
This project re-creates an SBGI pipeline and augments it with a screen-space approximation to address that inefficiency. I introduce the Near-Far Surfel Sphere (NFSS), a hybrid structure that:
-
Uses a sphere to approximate near-field lighting via horizon-based indirect lighting (HBIL).
-
Uses a surfel to estimate far-field lighting through horizon-angle sampling.
By spawning these hybrid surfels only in regions with high ambient occlusion, the method allows controllable tradeoff between surfel redundancy and lighting accuracy.
The system was implemented in DirectX 12 (DXR) on MiniEngine, with custom HLSL shaders.
Surfel-Based GI (Baseline)

HBIL Integration
To address overspawning and missing near-field detail, I integrated Horizon-Based Indirect Lighting (HBIL) into the surfel GI pipeline.
- Near-field contribution: HBIL reuses horizon sampling to approximate diffuse indirect light in regions where surfels are inefficient (dense foliage, fine detail).
- Far-field estimation: The algorithm also generates bent normals and bent cones, which serve as predictors of incoming far-field radiance.
- Engine integration: The implementation was adapted to MiniEngine’s deferred rendering pipeline, requiring adjustments for right-handed coordinates and on-the-fly G-buffer linearization.
- Noise reduction: Sampling ranges were constrained, and HBIL results were blended with surfel irradiance to improve stability.
(Left) HBIL near-field irradiacne (Right) Far-field radiance estimation via bent cones
Near-Far Surfel Sphere (NFSS)
Building on HBIL’s bent-cone output, I designed a novel structure: the Near-Far Surfel Sphere (NFSS).
- Hybrid structure: Each NFSS stores a spherical region for near-field contributions (computed via HBIL) and a phantom far-field surfel (FSS) reconstructed from the bent cone to account for global illumination contributions.
- Selective spawning: NFSS instances are placed in regions of high occlusion, guided by a combination of SSAO values and bent-cone aperture.
- Impact: This approach reduced overspawning in dense or concave areas while preserving perceptual lighting quality.
(Left) general case of surfel coverage (Right) the “perfect” case coverage with the NSFF structure
(Left) debug view of the NFSS structure in-engine (Right) interactive debug view on mouse cursor
Blending and Confidence Heuristics
To prevent double counting of irradiance:
- Implemented confidence blending between surfel and HBIL outputs.
- Adjusted blending weights based on SSAO and surfel density.
- Ensured HBIL acted as an augmenting term, not a competing one.
Future Work
- Interleaved/denoised HBIL to reduce GPU cost.
- More adaptive spawning/recycling heuristics (SSAO + bent-cone + surfel density).
- Quantitative validation against ray-traced ground truth.