vello/shader
Arman Uguray 2c46228d06 [binning] Correctly handle disjoint bounding-box intersections
When the bounding boxes of a path and its clip are disjoint (i.e. they
do not intersect) the result of their intersection is a negative
rectangle.

When calculating the intersection of the bboxes, the binning stage
ensures that the bbox is non-negative. It then normalizes the
coordinates to bin dimensions and rounds the top-left corner down
to the neareast integer and the bottom-right corner up.

However this rounding causes zero-area bounding boxes to have a non-zero
area and sends the bottom-right corner to the placed in the next bin.
This causes fully clipped out draw objects to be included in binning,
with an incorrect clip bounding box that causes them to be erroneously
drawn with partial clipping.

`binning` now takes care around this logic to make sure that a zero-area
intersected-bbox gets skipped and clipped out. `tile_alloc`, also takes
care in its logic.

Fixes #286 and #333
2023-06-28 20:42:52 -07:00
..
shared Fix invalid buffer access errors caught by shader validation 2023-06-28 12:59:21 -07:00
backdrop.wgsl Move the vello crate to the workspace root (#231) 2023-01-05 09:32:09 +00:00
backdrop_dyn.wgsl Move the vello crate to the workspace root (#231) 2023-01-05 09:32:09 +00:00
bbox_clear.wgsl Move the vello crate to the workspace root (#231) 2023-01-05 09:32:09 +00:00
binning.wgsl [binning] Correctly handle disjoint bounding-box intersections 2023-06-28 20:42:52 -07:00
clip_leaf.wgsl [shaders] Explicitly guard writes to clip_bboxes 2023-04-21 18:43:51 -07:00
clip_reduce.wgsl Move the vello crate to the workspace root (#231) 2023-01-05 09:32:09 +00:00
coarse.wgsl rework radial gradients 2023-05-09 18:09:53 -04:00
draw_leaf.wgsl Fix invalid buffer access errors caught by shader validation 2023-06-28 12:59:21 -07:00
draw_reduce.wgsl Fix invalid buffer access errors caught by shader validation 2023-06-28 12:59:21 -07:00
fine.wgsl Address review feedback 2023-05-15 14:45:38 -04:00
path_coarse.wgsl Move the vello crate to the workspace root (#231) 2023-01-05 09:32:09 +00:00
path_coarse_full.wgsl Add check for division-by-zero in path_coarse_full 2023-04-23 16:28:52 -07:00
pathseg.wgsl rework radial gradients 2023-05-09 18:09:53 -04:00
pathtag_reduce.wgsl Move the vello crate to the workspace root (#231) 2023-01-05 09:32:09 +00:00
pathtag_reduce2.wgsl Support for larger pathtags 2023-01-05 14:25:21 -08:00
pathtag_scan.wgsl Fix missing barriers in the pathtag_scans (#255) 2023-01-16 20:20:20 +00:00
pathtag_scan1.wgsl Fix missing barriers in the pathtag_scans (#255) 2023-01-16 20:20:20 +00:00
permutations Playing with shader permutations and AOT compilation 2023-03-29 10:38:10 -07:00
tile_alloc.wgsl [binning] Correctly handle disjoint bounding-box intersections 2023-06-28 20:42:52 -07:00
UNLICENSE Move the vello crate to the workspace root (#231) 2023-01-05 09:32:09 +00:00