Nodes/GLSL Nodes/glslEditorPro
ComfyUI Node

glslEditorPro

A ComfyUI node in GLSL with 3 inputs and 1 output.

By patriciogonzalezvivo·Created 2 years ago·Updated about a year ago· 246
glslEditorPro
  • code
  • GLSL_CODE
version140
typefragment
CategoryGLSL

Inputs (3)

NameTypeDefaultDescription
versionCOMBO14012 options: 100, 120, 130, 140, 150, 330, +6
typeCOMBOfragment2 options: fragment, fragment (shadertoy)
codeGLSL_STRING // <NAME>_TYPE: have the uniform type //uniform U_TEX0_TYPE u_tex0; //uniform U_TEX0_TYPE u_val0; uniform vec4 u_date; uniform vec2 u_resolution; uniform float u_delta; uniform float u_time; uniform float u_fps; uniform int u_frame; void main() { vec4 color = vec4(0.0, 0.0, 0.0, 1.0); vec2 pixel = 1.0 / u_resolution; vec2 st = gl_FragCoord.xy * pixel; color.rgb = vec3(st, 0.5 + 0.5 * cos(u_time)); // texture arrays have this <NAME>_TOTALFRAMES //#ifdef U_TEX0_TOTALFRAMES //color = texture(u_tex0, vec3(st, float(u_frame))); //#else //color = texture(u_tex0, st); //#endif gl_FragColor = color; }

Outputs (1)

NameTypeDescription
GLSL_CODEGLSL_CODE