vello/piet-gpu
Elias Naur 8fab45544e shader: implement clip paths
Expand the the final kernel4 stage to maintain a per-pixel mask.

Introduce two new path elements, FillMask and FillMaskInv, to fill
the mask. FillMask acts like Fill, while FillMaskInv fills the area
outside the path.

SVG clipPaths is then representable by a FillMaskInv(0.0) for every nested
path, preceded by a FillMask(1.0) to clear the mask.

The bounding box for FillMaskInv elements is the entire screen; tightening of
the bounding box is left for future work. Note that a fullscreen bounding
box is not hopelessly inefficient because completely filling a tile with
a mask is just a single CmdSolidMask per tile.

Fixes #30

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-10-09 13:20:26 +02:00
..
bin Update winit example 2020-06-14 23:32:59 +02:00
shader shader: implement clip paths 2020-10-09 13:20:26 +02:00
src shader: delete more unused code and variables 2020-09-13 13:03:56 +02:00
Cargo.toml Add command line args for loading svg 2020-05-31 09:57:25 -07:00
Ghostscript_Tiger.svg Fills 2020-05-01 19:42:20 -07:00