Builtin Library
- ..
- README.md1.0 KB
- bindings.yaml160 B
- shader.wgsl2.9 KB
README.md
rt_ao_upsample
Carries the ray-traced occlusion term from the grid it was traced on to the frame's own resolution.
rt_ao traces a hemisphere of rays per texel of a grid that can be coarser than
the frame — the cost of the effect is rays × texels, so a half-resolution grid
is a quarter of the rays. This pass is what makes that grid usable: for every
frame pixel it takes the 3×3 neighbourhood of grid texels around it and weights
each one by how close the depth of the surface that texel describes is to the
depth under the pixel, so occlusion does not cross a silhouette.
The filter after it smooths the estimate across the frame; this pass only resamples it. Where the grid is the frame's own resolution the feature skips this pass and hands the traced term straight on.
Bindings
| binding | what |
|---|---|
ao_raw | The occlusion term as traced, at the grid's resolution. |
scene_depth | The drawn render target's depth. |
ao_full | The term at the frame's resolution. |