ThreeJS Shader Guidelines

The new SYQEL Desktop applications now enable users to import custom shaders and style them.

In order for these shaders to be ingested correctly, they need to meet the following standards:

Shader Import Requirements (SYQEL Desktop)

SYQEL imports fragment shader code (single-pass), not full multi-pass projects.

Runtime target

Recommended entrypoint

Use this signature for best compatibility:

void mainImage(out vec4 fragColor, in vec2 fragCoord)

SYQEL can also handle void main() and some alternate mainImage(…) signatures, but the above is the safest and preferred format.

Required behavior

Available uniforms / inputs

SYQEL provides:

Audio-reactive aliases (also available):

Texture channel behavior

Compatibility rules

Minimal compatible template

void mainImage(out vec4 fragColor, in vec2 fragCoord) { vec2 uv = fragCoord / iResolution.xy; float t = iTime; float a = texture2D(iChannel0, vec2(0.1, 0.5)).r; // audio in most feeds vec3 col = 0.5 + 0.5*cos(t + uv.xyx + vec3(0.0, 2.0, 4.0)); col *= 0.6 + a * 1.4; fragColor = vec4(col, 1.0); }


For your convenience you can also provide the following prompt to leading AI models that may be included as the technical guidelines while it creates the custom visual for you:

Use this prompt when asking an AI to generate shader code:

Generate a single-pass GLSL ES 1.00 fragment shader for WebGL1.
Output only shader code (no markdown).
Use entrypoint: void mainImage(out vec4 fragColor, in vec2 fragCoord).
Assume uniforms: iResolution, iTime, iFrame, iMouse, iChannel0, iChannel1, and varying vUv.
Make it audio-reactive using FFT texture sampling (texture2D(iChannel0, vec2(x,0.5)).r or iChannel1 for AI-image mode).
Do not use multi-pass buffers, includes, or WebGL2-only features.
Keep code performant and stable at 60 FPS.