ComfyUI Node
MIN MAX (JOV_GL)
Gets the minimum and maximum of an image
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)
| Name | Type | Default | Description |
|---|---|---|---|
| imageopt | IMAGE | RGB(A) image | |
| FRAGMENTopt | STRING | // 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)
| 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. |