Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit15ce14a4c1

README.md

ao_pass_indirect

The screen-space estimate of ambient occlusion together with the light the occluders send: the walk of ao_walk, stored as the occlusion and the bent normal, and, for the part of the hemisphere the occluders close, the light they send the surface. It runs in place of ao_pass while the ao module's indirect is above 0.

An occluder's light is the light it sent toward the camera when the view last drew it: the view's colour history (@scene.colorHistory), the lit colour its previous render ended with, read where the occluder stood in that render. It counts only where that render drew the same surface there (the depth the occlusion accumulation remembers for the texel), and only from a face that turns toward the surface; a sector closed by an occluder whose light is not on the previous picture is left to the shading's own stand-in.

ao_light carries, per texel, the gathered light weighed by each closed sector's share of the cosine lobe, in the units of the ambient term, scaled by intensity and the indirect strength, in rgb; and in a the share of the closed part whose light it found, times the indirect strength up to 1. Shading takes the gathered light in place of its own crease estimate over that share, so a strength between 0 and 1 moves the frame from the one occlusion alone draws to the gathered one, and above 1 brightens the gathered light alone.

Includes

  • ao_walk

Bindings

namekind
scene_depthtexture_depth
scene_colortexture2d
ao_historytexture2d
frame_cambuffer
ao_paramsbuffer
ao_statebuffer
ao_outstorage2d (rgba16f)
ao_lightstorage2d (rgba16f)