Builtin Library
- ..
- README.md1.4 KB
- bindings.yaml338 B
- shader.wgsl650 B
README.md
ao_pass
The screen-space estimate of ambient occlusion: ground-truth ambient occlusion
(GTAO) over a visibility bitmask. A few screen-space slices are walked through
each texel; along each, the hemisphere above the surface is cut into 32
sectors, and every depth tap marks the sectors its occluder covers, from the
angle of its front face to the angle of its back face thickness behind it
along the line of sight. The open sectors are integrated against the cosine
lobe around the surface normal, and their mean direction is the bent normal.
Light passes behind an occluder thinner than its reach, so a floor beyond a
thin rail keeps the sectors past the rail's back face.
The walk turns with each render a view carries its accumulation (ao_state),
so the renders it holds sample directions no other render did; a view's first
render takes the first pattern. A tap that falls off the frame says nothing about the
hemisphere and is left out.
bias is the elevation a neighbour must clear above the tangent plane before it
can close a sector: a neighbour closer to the plane than that is the same
surface read through the depth buffer's quantisation.
Includes
ao_walk
Bindings
| name | kind |
|---|---|
scene_depth | texture_depth |
frame_cam | buffer |
ao_params | buffer |
ao_state | buffer |
ao_out | storage2d (rgba16f) |