← Back to Technical Work

GLSL Shader Pathtracer

GPU-accelerated path tracer with MIS and BVH in GLSL/OpenGL

Date May 2025
Tags
glslopenglc++

Cover Render

128spp, 1303x2000, no denoising, 2m 19s. ACES tone-mapping

Cover render

Character model by YYB-Era, scene models, composition, lighting by me

Materials

Trowbridge-Reitz Microfacet Specular Reflection & Transmission

1024spp, 1000x1000, no denoising. Reinhard tone-mapping

roughness 0.01roughness 0.05roughness 0.25
roughness 0.01roughness 0.05roughness 0.25
roughness 0.50roughness 0.75roughness 0.95
roughness 0.50roughness 0.75roughness 0.95

Oren-Nayar Microfacet Diffuse Reflection

512spp, 1000x1000, denoised. ACES tone-mapping. Oren-Nayar model using sigma = 0.8.

One can see that the regular simplified Oren-Nayar is visibly darker than the Lambertian one — this is because the most common simplified Oren-Nayar model is actually not energy conserving, it loses light energy because A < 0 for any sigma > 0. The render below is after applying a small energy conserving compensation.

The more noticeable parts of the render differences are the stone and the dragon’s chin — Oren-Nayar model is able to preserve the light energy a lot better at those grazing angles.

LambertianOren-Nayar (Energy Conserve Fix)Oren-Nayar
LambertianOren-Nayar EC FixOren-Nayar

Models from Benedikt Bitterli’s rendering resources

Conductive Material Fresnel Reflectance

Gold — eta [0.183, 0.421, 1.373], k [3.424, 2.346, 1.770]

Copper — eta [0.271, 0.677, 1.316], k [3.609, 2.625, 2.292]

Aluminum — eta [1.655, 0.879, 0.520], k [9.224, 6.270, 4.837]

Conductor materials

Intel OpenImageDenoise

12spp, 1303x2000. ACES tone-mapping

RawDenoised
RawDenoised

Environment Map

1024spp, 1000x1000, 2s. Reinhard tone-mapping

Cornell BoxGlass Sphere
Cornell BoxGlass Sphere

See the cover render at top for procedural skybox.

Depth of Field

128spp, 1303x2000, no denoising. ACES tone-mapping

No DOFDOF
No DOFDOF
SphericalAnamorphic
SphericalAnamorphic

NEE Demo Renders

1024spp, 1000x1000

Area LightSpot LightSphere Light
AreaSpotSphere
Point LightRough MirrorVeach Scene
PointRough MirrorVeach