Skip to content

Code Editor

The Fragment and Vertex tabs are plain text editors for writing GLSL shader code directly. Every edit triggers a live recompile — the updated shader appears in your track within half a second.

The fragment shader runs once per pixel and sets gl_FragColor. This is the main shader file.

Every shader must begin with an ISF JSON metadata block that defines its parameters:

/*{
"DESCRIPTION": "My shader",
"CREDIT": "Your Name",
"CATEGORIES": ["Generator"],
"INPUTS": [
{
"NAME": "speed",
"TYPE": "float",
"DEFAULT": 1.0,
"MIN": 0.0,
"MAX": 5.0
}
]
}*/
void main() {
vec2 uv = isf_FragNormCoord;
gl_FragColor = vec4(uv, 0.5 + 0.5 * sin(TIME * speed), 1.0);
}
UniformTypeDescription
TIMEfloatElapsed seconds since the shader started
TIMEDELTAfloatSeconds since the last frame
FRAMEINDEXintFrame counter
isf_FragNormCoordvec2Normalised UV coordinates (0–1)
RENDERSIZEvec2Output size in pixels
inputImagesampler2DInput texture (effects only — not available on generators)

The CATEGORIES array in the metadata block sets the shader type used when loading into Arkestra. Use "Generator" for layer shaders (no input) and "Effect" for post-processors that read inputImage.

The Vertex tab is for an optional custom vertex shader. Leave it empty if you only need a fragment shader — Arkestra uses a default passthrough vertex shader automatically.

Use a custom vertex shader when you need:

  • Varying variables passed from vertex to fragment stage
  • Effects that sample neighbouring pixels (optical flow, Sobel edge detection, multi-pass blur)

When the fragment shader declares varying variables, you must provide a matching vertex shader in the Vertex tab.

The Chat tab and code tabs stay in sync. Edits you make in the Fragment or Vertex tabs are visible to the AI when you switch back to Chat. When you switch from a code tab back to Chat, the current shader state is synced into the AI’s context automatically.