Skip to main content
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
The GLSL Shader node applies custom GLSL ES fragment shader code to input images. It allows you to write shader programs that can process multiple images and accept uniform parameters (floats and integers) to create complex visual effects. The output size can be determined by the first input image or set manually.

Inputs

ParameterData TypeRequiredRangeDescription
fragment_shaderSTRINGYesN/AGLSL fragment shader source code (GLSL ES 3.00 / WebGL 2.0 compatible). Default: A basic shader that outputs the first input image.
size_modeCOMBOYes"from_input"
"custom"
Output size: ‘from_input’ uses first input image dimensions, ‘custom’ allows manual size.
widthINTNo1 to 16384The width of the output image when size_mode is set to "custom". Default: 512.
heightINTNo1 to 16384The height of the output image when size_mode is set to "custom". Default: 512.
imagesIMAGEYes1 to 8 imagesInput images to be processed by the shader. Images are available as u_image0 to u_image7 (sampler2D) in the shader code.
floatsFLOATNo0 to 8 floatsFloating-point uniform values for the shader. Floats are available as u_float0 to u_float7 in the shader code. Default: 0.0.
intsINTNo0 to 8 integersInteger uniform values for the shader. Ints are available as u_int0 to u_int7 in the shader code. Default: 0.
Notes:
  • The width and height parameters are only required and visible when size_mode is set to "custom".
  • At least one input image is required.
  • The shader code always has access to a u_resolution (vec2) uniform containing the output dimensions.
  • A maximum of 8 input images, 8 float uniforms, and 8 integer uniforms can be provided.

Outputs

Output NameData TypeDescription
IMAGE0IMAGEThe first output image from the shader. Available via layout(location = 0) out vec4 fragColor0 in the shader code.
IMAGE1IMAGEThe second output image from the shader. Available via layout(location = 1) out vec4 fragColor1 in the shader code.
IMAGE2IMAGEThe third output image from the shader. Available via layout(location = 2) out vec4 fragColor2 in the shader code.
IMAGE3IMAGEThe fourth output image from the shader. Available via layout(location = 3) out vec4 fragColor3 in the shader code.