Builtin Library
- ..
- README.md1.7 KB
- bindings.yaml480 B
- shader.wgsl5.4 KB
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
| name | kind |
|---|---|
scene_depth | texture_depth |
scene_color | texture2d |
ao_history | texture2d |
frame_cam | buffer |
ao_params | buffer |
ao_state | buffer |
ao_out | storage2d (rgba16f) |
ao_light | storage2d (rgba16f) |