A real-time and offline renderer built on WebGPU and OpenUSD, written in C++17. One codebase, one shader source, two targets: a native desktop app (Dawn) and a browser build (Emscripten + emdawnwebgpu).
Mainly a personal hobby project and rendering playground.
Requires a WebGPU-capable browser -- a recent Chrome or Edge is the safest bet.
Progressive path tracer. Physically-based materials, IBL from an HDR environment, and a BVH-accelerated compute traversal.
Pixar's Kitchen Set (1788 prims) loaded straight from USD and rendered in real time -- geometry, texture binding, and material resolution all driven by the USD stage.
PTStudio ships two interchangeable renderers over a shared USD-backed scene. You can flip between them at runtime on the same stage, which makes the rasterizer directly comparable against a ground-truth reference.
| Forward | Forward renderer with a G-buffer prepass, analytic area lights, shadow maps, screen-space effects, and IBL. This is the real-time path. |
| Path Trace | Progressive BVH path tracer running as a compute pass. Same materials, same lights, same stage -- used both as a visual target and as the source of truth for the automated image-diff suite. |
- LTC area lights -- linearly transformed cosines for rect and disk lights, giving analytic, noise-free specular and diffuse response from area sources rather than punctual approximations.
- Cook-Torrance PBR with a GGX/Smith BRDF, metallic-roughness workflow, normal mapping, and USD
UsdPreviewSurfacematerial binding. - Image-based lighting -- equirectangular-to-cubemap projection, irradiance convolution for the diffuse term, roughness-prefiltered specular mips, and a precomputed split-sum BRDF LUT.
- Glass and transmission -- TODO (will explore transmission LTC and spherical gaussian BTDF prefiltering, etc.)
- PCSS soft shadows -- percentage-closer soft shadows with blocker search, for distant (directional) lights as well as rect and disk area lights, so penumbra width tracks the actual emitter size.
- Receiver-plane depth bias -- derivative-based bias propagated through the light's clip space, which is what makes PCSS survive grazing angles without acne or peter-panning.
- Split visibility pipeline -- shadow visibility is generated and resolved in separate passes rather than sampled inline, decoupling shadow cost from shading and making the visibility signal available to temporal filtering.
- Temporal resolve with variance clamping -- history is reprojected using G-buffer motion vectors and clamped against the local neighborhood's variance, which suppresses the noise of a sparse PCSS kernel without smearing on motion.
- Contact shadows -- screen-space ray marching to recover the short-range occlusion that shadow-map resolution drops.
- SSAO with a bilateral (depth-aware) blur.
- G-buffer motion vectors driving history reprojection.
- Tone mapping as the final graph node.
pixi run build
pixi run testpixi brings its own Python and the whole toolchain (Conan, CMake, Ninja, clang-format), so there is nothing to bootstrap first.
- Building -- prerequisites, web builds, Conan and tooling
- Pipeline and verification -- Slang/WGSL, USD assets, image-diff, headless capture
- Known issues -- open gaps and limitations, with evidence




