Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit15ce14a4c1

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

namekind
scene_depthtexture_depth
frame_cambuffer
ao_paramsbuffer
ao_statebuffer
ao_outstorage2d (rgba16f)