ComfyUI Node Runs on cloud
GLSL Shader
Apply GLSL ES fragment shaders to images. u_resolution (vec2) is always available.
GLSL Shader
- images
- floats
- ints
- bools
- curves
- IMAGE0
- IMAGE1
- IMAGE2
- IMAGE3
◄fragment_shader#version 300 es
precision highp float;
uniform sampler2D u_image0;
uniform vec2 u_resolution;
in vec2 v_texCoord;
layout(location = 0) out vec4 fragColor0;
void main() {
fragColor0 = texture(u_image0, v_texCoord);
}
►
◄size_mode▾►
Categoryimage/shader
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| fragment_shader | STRING | #version 300 es precision highp float; uniform sampler2D u_image0; uniform vec2 u_resolution; in vec2 v_texCoord; layout(location = 0) out vec4 fragColor0; void main() { fragColor0 = texture(u_image0, v_texCoord); } | GLSL fragment shader source code (GLSL ES 3.00 / WebGL 2.0 compatible) |
| size_mode | COMBO | Output size: 'from_input' uses first input image dimensions, 'custom' allows manual size | |
| images | COMFY_AUTOGROW_V3 | Images are available as u_image0-4 (sampler2D) in the shader code | |
| floats | COMFY_AUTOGROW_V3 | Floats are available as u_float0-19 in the shader code | |
| ints | COMFY_AUTOGROW_V3 | Ints are available as u_int0-19 in the shader code | |
| bools | COMFY_AUTOGROW_V3 | Booleans are available as u_bool0-9 (bool) in the shader code | |
| curves | COMFY_AUTOGROW_V3 | Curves are available as u_curve0-3 (sampler2D, 1D LUT) in the shader code. Sample with texture(u_curve0, vec2(x, 0.5)).r |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE0 | IMAGE | Available via layout(location = 0) out vec4 fragColor0 in the shader code |
| IMAGE1 | IMAGE | Available via layout(location = 1) out vec4 fragColor1 in the shader code |
| IMAGE2 | IMAGE | Available via layout(location = 2) out vec4 fragColor2 in the shader code |
| IMAGE3 | IMAGE | Available via layout(location = 3) out vec4 fragColor3 in the shader code |