-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Hi, thanks for the library! I've been using it since 2019 — it's very useful.
I'm currently trying to blend a mask and a video into a single output video. The GLSL
code I’m using does the trick, but I need to pass two videos (original video and mask video) as inputs.
Right now, the library supports .setImages(),
which only accepts a Bitmap
as the second input, not a video.
How can I pass a video instead?
void mainImage( out vec4 fragColor, in vec2 fragCoord ){
vec2 uv = fragCoord.xy/iResolution.xy;
vec4 orig = texture(iChannel0, uv);
vec4 mask = texture(iChannel1, uv);
if (mask.r > 0.9 && mask.g > 0.9 && mask.b > 0.9) {
fragColor = orig;
} else {
fragColor = vec4(0.004, 1.0, 0.004, 1.0);
}
}
Metadata
Metadata
Assignees
Labels
No labels