Nodes/Jovi_GLSL/BLEND LINEAR (JOV_GL)
ComfyUI Node

BLEND LINEAR (JOV_GL)

Simple linear blend between two images. Will stretch/shrink images to fit.

By Amorano·Created 2 years ago·Updated 12 months ago· 20
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)

NameTypeDefaultDescription
imageAoptIMAGEMASK, RGB or RGBA
imageBoptIMAGEMASK, RGB or RGBA
blend_amtoptFLOAT0.500–1Scalar blend amount
FRAGMENToptSTRING// 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)

NameTypeDescription
RGBAIMAGEFull channel [RGBA] image. If there is an alpha, the image will be masked out with it when using this output.
RGBIMAGEThree channel [RGB] image. There will be no alpha.
MASKMASKSingle channel mask output.