top of page

DXR Path Tracer

Project Overview

Path Tracing Pipeline

This project is designed to simulate global illumination by using DirectX Raytracing pipeline. Physically Based Rendering (PBR) and Path Tracing were integrated to achieve photo realistic rendering effect.

For each pixel, shoot 32 random rays, each ray will bounce at maximum 6 times, I also used Russian Roulette to terminal some rays in advance. After tracing, I get the accumulated radiance and average them to calculate final result.

pt1.png

Path Tracing in Cornell Box

HLSL Shader Code of Path Tracing

PBR

For PBR, I used Cook-Torrance BRDF to calculate all the specular part of BRDF.

As for DFG term in BRDF, Trowbridge-Reitz for D, Smith for G, Fresnel-Schlick for F.

pt4.png

PBR Props in the Scene

I implemented Fresnel-Schlick reflection, refraction based on the index of refraction (IOR), and total internal reflection (TIR). It probabilistically determines whether a ray reflects or refracts using Fresnel coefficients, ensuring realistic light interactions.

pt6.png

Glass Material in the Scene

DXR Pipeline

I integrate DirectX Raytracing pipeline into my engine. In my RT pipeline,

  • Build AccelerationStructure

  • Set RayGen、Miss、HitGroup

  • Set Root Signature

  • Set Shader Bind Table

  • Dispatch Rays

dxr1.png

DirectX Raytracing Pipeline

Engine Code of DXR Initilization

Screenshots

  • LinkedIn
  • YouTube

© 2025 by Jiabin Portfolio. All rights reserved.

bottom of page