Builtin Library
README.md
pathTrace
The GPU side of the reference view: two compute passes and a blit, enqueued
only while referenceView is enabled.
| Pass | Order | What it does |
|---|---|---|
pt_trace | 10 | One thread per pixel. Builds a primary ray from the camera in the parameter block, follows it through the scene BVH, and adds the radiance into the accumulation buffer. Skipped once the image has converged. |
pt_resolve | 11 | Divides the accumulation by the sample count it carries in alpha, exposes, tonemaps, and writes the display image. |
| blit | 12 | Draws that image over the scene colour. |
All three run at afterLighting, where the scene colour is fully lit on both
render paths — the state the reference is meant to be compared against.
The resolved target is created at a fixed size rather than with
screen = true: the accumulation buffer is indexed by that resolution, and an
engine-driven resize per render target would silently invalidate every sample
in it. The blit scales the image to whatever target it lands in.
The scene arrives entirely through buffers the module snapshotted, so this runs on either backend with no dependency on hardware ray tracing or on the deferred G-buffer.