Nodes/Jovi_GLSL/MIN MAX (JOV_GL)
ComfyUI Node

MIN MAX (JOV_GL)

Gets the minimum and maximum of an image

By Amorano·Created 2 years ago·Updated 12 months ago· 20
MIN MAX (JOV_GL)
  • image
  • RGBA
  • RGB
  • MASK
FRAGMENT// name: MIN MAX // desc: Gets the minimum and maximum of an image // category: FILTER uniform sampler2D image; // | RGB(A) image void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 uv = fragCoord / iResolution.xy; vec4 color = texture(image, uv); fragColor = vec4( min(min(color.r, color.g), color.b), max(max(color.r, color.g), color.b), 0.0, 1.0 ); }
CategoryJOV_GL 🌈/FILTER

Inputs (2)

NameTypeDefaultDescription
imageoptIMAGERGB(A) image
FRAGMENToptSTRING// name: MIN MAX // desc: Gets the minimum and maximum of an image // category: FILTER uniform sampler2D image; // | RGB(A) image void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 uv = fragCoord / iResolution.xy; vec4 color = texture(image, uv); fragColor = vec4( min(min(color.r, color.g), color.b), max(max(color.r, color.g), color.b), 0.0, 1.0 ); }

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.