A GLSL ES 3.00 fragment shader with your own uniforms and main. The plugin declares the version,
the precisions, uniform sampler2D uSource (the picture so far), in vec2 vUv and
out vec4 fragColor. Declaring any of them again is a compile error.
Names the pass for MapEffects.removePass. Adding a pass under an id in use replaces it in place.
OptionalmipmappedWhether the shader reads uSource at mip levels other than 0, with textureLod. The plugin then
builds the picture's mip levels before the pass. Without it, every level reads as level 0.
OptionalplacementDefaults to before-depth-of-field.
OptionaltexturesThe textures the shader samples besides uSource, each under the name of the uniform sampler2D
it declares, or a function returning one, called on every draw. They bind to texture units 1 to
15, in the order given.
ImageBitmap, a VideoFrame or ImageData is uploaded once: to change its picture,
hand a new object.uSource, so texture(uPaper, vUv) lays it over the
frame upright. It is sampled linearly, repeats past its edges and has no mip levels.undefined, skips
the pass for that draw. Its textures are freed when the pass is removed.OptionaluniformsThe uniform values, or a function returning them, called on every draw. A function that throws skips the pass for that draw, with one warning.
A full-screen GPU pass of your own, run inside the plugin's WebGL chain, such as a watercolour or posterise stylisation that the rest of the effects should then work on.