CUDA Path Tracer

CUDA · C++ · glTF · BVH · PBR
Final scene

GPU Rendering

CUDA
Path Tracer

A GPU-first renderer for glTF scenes, physically based materials, accelerated ray traversal, cinematic camera effects and a configurable post stack.

CUDABVHglTFPBRDepth of FieldPost FX
Bloodborne Scene Recreation

Lady Maria
of the Astral
Clocktower

Final scene rendered in the CUDA path tracer.

Lady Maria scene with neutral clay materials Lady Maria scene with final PBR materials PBR OnPBR Off
Lady Maria of the Astral Clocktower
Physically Based Shading

PBR Materials

Metallic-roughness glTF materials, texture sampling, emissive response, dielectric transport and reflective surfaces share the same path-traced lighting model.

Sci-fi helmet rendered with imported glTF PBR materials
Imported glTFMetallic / Roughness
Cornell box material comparison
Material studyDiffuse / Mirror / Glass / Metal
Rendering Architecture

Rendering Pipeline

A wavefront CUDA pipeline traces and shades only active paths, one bounce at a time.

01

Scene Upload

Upload glTF geometry, materials and textures to GPU memory.

02

Ray Generation

Generate jittered camera rays with anti-aliasing and depth of field.

03

BVH Traversal

Intersect active rays against scene and triangle hierarchies.

04

Shade & Compact

Evaluate PBR materials, spawn the next bounce and compact paths.

05

Accumulate & Post

Accumulate samples, then apply tone mapping and post effects.

Measured Performance

Optimization Evidence

Controlled A/B tests show where GPU work was actually removed—and where an optimization cost more than it saved.

01
Two-Level BVH

A scene hierarchy rejects objects; a per-mesh hierarchy resolves triangles with iterative GPU traversal.

02
Stream Compaction

Prefix-scan and scatter remove dead paths between bounces so later kernels process only active work.

03
Russian Roulette

Low-throughput paths terminate probabilistically after a configurable minimum depth with unbiased compensation.

04
Material Sorting

Measured as a negative optimization: Thrust sort and gather overhead exceeded the coherence benefit.

Original project benchmark · RTX 3060 Laptop GPU Ray survival test · 640,000 primary rays · depth 8
BVH · Bunny Open
80×
0.4 → 32 fps

69,451 triangles. Hierarchical traversal turns a linear triangle scan into interactive rendering.

Stream Compaction · Open
+269%
13 → 48 fps

Escaped rays disappear from subsequent intersection and shading kernels instead of occupying lanes.

Russian Roulette · Closed
+16%
32 → 37 fps

Closed scenes retain long paths, so energy-based termination saves work without changing the estimator.

BVH scaling
SceneTrianglesLinearBVHGain
Bunny · Open69,4510.4 fps32 fps80×
Bunny · Closed69,4511.7 fps97 fps57×
Lady Maria · Open1,013,600<0.1 fps15 fpsInteractive
Lady Maria · Closed1,013,600<0.1 fps37 fpsInteractive
Paths alive after bounce
OpenClosed
Bounce 1
54 / 82%
Bounce 2
26 / 57%
Bounce 4
8 / 36%
Bounce 6
2 / 24%
Kept Enabled
BVH + compaction

Both remove measurable work across the tested scenes. Compaction gains vary with ray escape rate; BVH gains scale sharply with triangle count.

Rejected After Profiling
Material sorting

Cornell Box: 44 → 29 fps (−34%). Bunny: 43 → 32 fps (−25%). Even a 20+ material scene fell from 51 → 42 fps, so sorting is disabled by default.

Camera & Display

Camera & Post Processing

Drag each frame to compare the optical and display-space changes without changing the underlying scene.

Cornell box without tone mapping Cornell box with tone mapping Tone mappedRaw HDR
Tone Mapping
Pinhole camera render Thin lens depth of field render Thin lensPinhole
Depth of Field
Light & Atmosphere

Bloom & God Rays

Bloom handles display-space energy around bright regions, while occlusion-aware god rays shape directional light through the scene.

Bloom test in a Cornell box
BloomPost-process
God rays test in a Cornell box
God RaysOcclusion-aware
CUDA path traced interior featuring Lady Maria, reflective materials, and depth lighting

CUDA PATH TRACER

CUDA · C++ · glTF · GPU ACCELERATION

A CUDA-based renderer exploring physically based light transport. It supports glTF assets, refraction, specular materials, depth of field, antialiasing and BVH acceleration, with Russian Roulette termination and performance analysis across complex scenes.