vello/piet-gpu/shader
Raph Levien 18563101b2 Fix blending math
The blending math had two errors: first, colors were not separated for the purpose of blending (blending was wrongly applied to premultiplied values), and second, alpha was applied over-aggressively to the alpha channel.

This PR does *not* address the issue of gamma correctness. That is a complex issue and should probably be handled in the short term by disabling sRGB conversions and doing the internal math in sRGB color space rather than linear. This will degrade the quality of antialiasing but on the other hand give spec-compliant results for compositing.

We remove the plus-darker mode as its specification does not appear to be valid. The plus-lighter mode remains as it is quite useful for cross-fading effects.

Also the generated shaders were compiled on mac so the DXIL is unsigned. Those should be compiled on Windows before this PR is merged. (and we should figure out a better strategy for all that)
2022-05-13 10:18:29 -07:00
..
gen Fix blending math 2022-05-13 10:18:29 -07:00
.clang-format shaders: Add .clang-format and reformat 2022-01-30 16:33:14 +09:00
annotated.h Initial implementation of blend modes 2022-02-28 12:38:14 -05:00
backdrop.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
bbox_clear.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
binning.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
bins.h all: add optional memory checks 2021-02-15 16:07:45 +01:00
blend.h Fix blending math 2022-05-13 10:18:29 -07:00
build.ninja Fix blending math 2022-05-13 10:18:29 -07:00
clip_leaf.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
clip_reduce.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
coarse.comp Radial gradients 2022-03-30 20:32:13 -07:00
draw_leaf.comp Radial gradients 2022-03-30 20:32:13 -07:00
draw_reduce.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
draw_scan.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
drawtag.h Radial gradients 2022-03-30 20:32:13 -07:00
kernel4.comp Fix blending math 2022-05-13 10:18:29 -07:00
mem.h avoid non-uniform barrier control flow when exhausting memory 2021-04-20 10:15:29 +02:00
path_coarse.comp shaders: Add .clang-format and reformat 2022-01-30 16:33:14 +09:00
pathseg.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
pathseg.h collapse FillCubic and StrokeCubic into Cubic with flags for fill mode 2021-03-19 12:50:12 +01:00
pathtag.h Path stream processing 2021-12-01 07:33:24 -08:00
pathtag_reduce.comp Adjust workgroup sizes 2021-12-08 11:48:38 -08:00
pathtag_scan.comp shaders: Add .clang-format and reformat 2022-01-30 16:33:14 +09:00
ptcl.h Radial gradients 2022-03-30 20:32:13 -07:00
scene.h Initial implementation of blend modes 2022-02-28 12:38:14 -05:00
setup.h Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
state.h ensure consistent path segment transformation 2021-03-19 12:45:23 +01:00
tile.h ensure consistent path segment transformation 2021-03-19 12:45:23 +01:00
tile_alloc.comp Variable size encoding of draw objects 2022-03-14 16:32:08 -07:00
transform_leaf.comp shaders: Add .clang-format and reformat 2022-01-30 16:33:14 +09:00
transform_reduce.comp Adjust workgroup sizes 2021-12-08 11:48:38 -08:00
transform_scan.comp shaders: Add .clang-format and reformat 2022-01-30 16:33:14 +09:00