antiAliasing.package
- ..
- README.md1.9 KB
- bindings.yaml484 B
- shader.wgsl2.0 KB
This package holds more than this page lists. See all of its files in its world.
README.md
stable_surface
The G-buffer surface temporal antialiasing restates beside its depth, on the
deferred path.
stable_depth keeps, for every pixel of a still view, the depth sample taken
nearest the pixel centre; the normal and the material an effect after the
reconstruction reads have to describe that same sample, or an outline found
in the normals and a fill read from the base colour move with the raster while
the depth and the picture hold still.
Where stable_depth kept the sample it held (the sign bit of its output's y
is set), this keeps
the normal and the material it held beside it; everywhere else it takes this
render's. Two fragment passes then hand both back to the frame
(@scene.normal, @scene.material). The three run on a frame where a pass
reads what they leave in either channel (whenRead), and on the first render that
runs them after one that did not, the history reads as absent
(surface_state.x is 0), so each pixel takes this render's surface.
Bindings
| name | kind |
|---|---|
stable_choice | texture2d |
scene_normal | texture2d |
scene_material | texture2d (uint) |
normal_history | texture2d (uint) |
material_history | texture2d (uint) |
surface_state | buffer |
normal_out | storage2d (r32u) |
material_out | storage2d (rgba8u) |
surface_state is the normal history target's state buffer, written by the
engine before each render of a view: x whether the histories hold that
view's previous result. normal_out holds the normal's 10:10:10:2 texel as one
word, its lanes in bits 0-9, 10-19, 20-29 and 30-31, which the restatement
into @scene.normal writes back as that texel. material_out holds the material's four integer lanes
in @scene.material's own format, rgba8u, which the restatement into
@scene.material copies texel for texel.