On Github cabanier / SVGOpenKeynote
Alpha of source and background are ignored
Image is on top of the 2 rectangles
Result = α x blendedColor + (1 - α) x original
Extend globalCompositeOperation to take blend modes
We got many requests toadd the 'missing' Photoshop blend modes
So, we will add them as well:
Result = source + (1 - αs) x backdrop
01 <rect ...> 02 <g id="gsave"> 03 <circle ...> 04 <circle style="alpha-compositing: clear" ...>
.gsave: hover {opacity: .5};
+
=
This is an extra channel that keeps track of the shape
clip-path: polygon(evenodd, 10px 175px, ...)
original
grayscale(1)
sepia(0.8)
saturate(0.2)
hue-rotate(90deg)
opacity(0.2)
invert(0.5)
brightness(0.25)
contrast(0.5)
blur(6px)
drop-shadow(...)
After creating the mesh, a shader could examine the pixels in the filter region
However, rendered content includes:
which results in a security leak...
We disallow access to the pixel data...
We use the Angle library to:
Compile the shader Examine the data flow If there is texture access, the shader is rejectedYES!