Rendering / CUDA / OpenCL
Doom 3 Path Tracing
A GPU path tracer inside a game engine that was never designed for one.
- Context
- Personal rendering experiment
- My work
- Engine integration, GPU backends, and renderer investigations
- Built on
- dhewm3 / idTech 4
Two ways to draw the same scene.
Two captures from the same viewpoint. Lighting, material handling, and HUD output differ: this is a visual example, not an exposure-matched comparison or a performance benchmark.
The project
I wanted to keep Doom 3’s world, lights, and gameplay, but replace the way it draws a frame. Built on the dhewm3 source port, this personal project takes the geometry and lights submitted by the engine and feeds them into a GPU path tracer instead of the stock rasterizer.
What I built
- Engine-side scene extraction and conversion of Doom 3 materials.
- GPU BVH construction and ray traversal, starting with a CUDA backend.
- Direct and indirect lighting, soft shadows, and volumetric rendering.
- A shared renderer interface and an OpenCL backend.
- Denoising investigations and fixed-sample demo captures for comparing results.
What came out of it
The work grew from a first playable renderer into a study of material fidelity, backend portability, and renderer correctness. The articles cover both the implementation and the mistakes that shaped it, including the limits of individual benchmark and image-quality comparisons.
The writeups also describe the AI-assisted parts of development, particularly the backend refactor and material-rendering work.
The demo-capture experiments also led to d3ptmark, using recorded Doom 3 views with a controlled sample budget.
Code and demos
Behind the project