Refactor ImageFilter to remove channel1_output_session and update blending logic in shaders

This commit is contained in:
brunoherbelin
2025-11-08 14:11:37 +01:00
parent bdc313cd1f
commit 0ef06e400d
3 changed files with 9 additions and 14 deletions

View File

@@ -1,11 +1,12 @@
// Blending of source texture (channel 0) with output window loopback (channel 1)
// Blending of source texture (channel 0) with texture of an external Source
// by Bruno Herbelin for vimix
uniform float Blend;
uniform sampler2D Source;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
fragColor = mix( texture(iChannel0, uv), texture(iChannel1, uv), Blend);
fragColor = mix( texture(iChannel0, uv), texture(Source, uv), Blend);
}