Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

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

bindingwhat
ao_rawThe occlusion term as traced, at the grid's resolution.
scene_depthThe drawn render target's depth.
ao_fullThe term at the frame's resolution.