vello/piet-gpu/shader
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
..
annotated.h shader: implement clip paths 2020-10-09 13:20:26 +02:00
backdrop.comp shader: implement clip paths 2020-10-09 13:20:26 +02:00
backdrop.spv shader: implement clip paths 2020-10-09 13:20:26 +02:00
binning.comp shader: implement clip paths 2020-10-09 13:20:26 +02:00
binning.spv shader: implement clip paths 2020-10-09 13:20:26 +02:00
bins.h Progress on wiring up fills 2020-05-20 11:14:19 -07:00
build.ninja piet-gpu-types: remove unused scene elements 2020-09-27 18:57:53 +02:00
coarse.comp shader: implement clip paths 2020-10-09 13:20:26 +02:00
coarse.spv shader: implement clip paths 2020-10-09 13:20:26 +02:00
elements.comp shader: implement clip paths 2020-10-09 13:20:26 +02:00
elements.spv shader: implement clip paths 2020-10-09 13:20:26 +02:00
kernel4.comp shader: implement clip paths 2020-10-09 13:20:26 +02:00
kernel4.spv shader: implement clip paths 2020-10-09 13:20:26 +02:00
path_coarse.comp shader: delete more unused code and variables 2020-09-13 13:03:56 +02:00
path_coarse.spv Fancy flattening 2020-06-09 20:45:19 -07:00
pathseg.h Start GPU-side flattening 2020-06-09 16:01:47 -07:00
ptcl.h shader: implement clip paths 2020-10-09 13:20:26 +02:00
scene.h shader: implement clip paths 2020-10-09 13:20:26 +02:00
setup.h shader: introduce a crude setting for adjusting the maximum workgroup size 2020-09-13 13:04:13 +02:00
state.h Experiment with new sorting scheme 2020-06-03 09:29:25 -07:00
tile.h Make fills work 2020-06-05 22:40:44 -07:00
tile_alloc.comp shader: implement clip paths 2020-10-09 13:20:26 +02:00
tile_alloc.spv shader: implement clip paths 2020-10-09 13:20:26 +02:00
tilegroup.h Implement stroked polylines 2020-04-28 18:45:59 -07:00