ComfyUI Node
BLEND LINEAR (JOV_GL)
Simple linear blend between two images. Will stretch/shrink images to fit.
BLEND LINEAR (JOV_GL)
- imageA
- imageB
- RGBA
- RGB
- MASK
◄blend_amt0.50►
◄FRAGMENT// name: BLEND LINEAR
// desc: Simple linear blend between two images. Will stretch/shrink images to fit.
// category: COMPOSE
uniform sampler2D imageA; // | MASK, RGB or RGBA
uniform sampler2D imageB; // | MASK, RGB or RGBA
uniform float blend_amt; // 0.5; 0; 1; 0.01 | Scalar blend amount
void mainImage( out vec4 fragColor, vec2 fragCoord ) {
vec2 uv = fragCoord / iResolution.xy;
vec4 col_a = texture(imageA, uv);
vec4 col_b = texture(imageB, uv);
fragColor = mix(col_b, col_a, blend_amt);
}►
CategoryJOV_GL 🌈/COMPOSE
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| imageAopt | IMAGE | MASK, RGB or RGBA | |
| imageBopt | IMAGE | MASK, RGB or RGBA | |
| blend_amtopt | FLOAT | 0.500–1 | Scalar blend amount |
| FRAGMENTopt | STRING | // name: BLEND LINEAR // desc: Simple linear blend between two images. Will stretch/shrink images to fit. // category: COMPOSE uniform sampler2D imageA; // | MASK, RGB or RGBA uniform sampler2D imageB; // | MASK, RGB or RGBA uniform float blend_amt; // 0.5; 0; 1; 0.01 | Scalar blend amount void mainImage( out vec4 fragColor, vec2 fragCoord ) { vec2 uv = fragCoord / iResolution.xy; vec4 col_a = texture(imageA, uv); vec4 col_b = texture(imageB, uv); fragColor = mix(col_b, col_a, blend_amt); } | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| RGBA | IMAGE | Full channel [RGBA] image. If there is an alpha, the image will be masked out with it when using this output. |
| RGB | IMAGE | Three channel [RGB] image. There will be no alpha. |
| MASK | MASK | Single channel mask output. |