dof_gather.computeShader
- README.md986 B
- bindings.yaml276 B
- shader.wgsl5.3 KB
This package holds more than this page lists. See all of its files in its world.
README.md
dof_gather
Gathers colour over each pixel's circle of confusion, so an out-of-focus point becomes a disc
whose radius is the one dof_coc states. The taps spread over the widest circle
that can land on the pixel: the widest near-field circle that can reach its tile
(neighbor_max), and the widest far-field one out to twice the pixel's own
radius, the farthest a circle behind the focal plane covers it from. Where no
wider near-field circle reaches the pixel, its own disc takes the full tap count
and a ring of half as many taps covers the rest of that radius, each ring tap
weighted by the share of the disc it stands for. The result is the gather
itself: an in-focus pixel keeps its own colour by the weight of its tight
circle.
Includes
dof_commondof_tile
Bindings
| name | kind |
|---|---|
scene_color | texture2d |
coc_map | texture2d |
neighbor_max | texture2d |
dof_params | buffer |
dof_out | storage2d (rgba16f) |