Reference

ISF header reference

The keys of an ISF header, as ISF Studio reads them.
This describes the header as ISF Studio reads and writes it. The reference for the format itself is isf.video, by VIDVOX.

The header is a JSON object in a comment at the very top of the shader:

/*{
  "DESCRIPTION": "Concentric rings",
  "CREDIT": "You",
  "CATEGORIES": ["Generator"],
  "INPUTS": [
    { "NAME": "speed", "TYPE": "float", "DEFAULT": 0.6, "MIN": 0.0, "MAX": 2.0 }
  ]
}*/
void main() {
  gl_FragColor = vec4(vec3(sin(TIME * speed)), 1.0);
}

Root keys

KeyWhat it is
DESCRIPTIONWhat the shader does.
CREDITWho made it.
CATEGORIESA list of categories, for hosts that sort by them.
ISFVSNThe ISF version. Studio writes 2.
INPUTSThe inputs.
PASSESThe passes of a multi-pass shader.
IMPORTEDThe images the shader imports.
LICENSEA licence. Not part of ISF itself: Studio keeps it, other hosts ignore it.

Inputs

Each input has a NAME and a TYPE, and may have LABEL, DEFAULT, MIN, MAX, IDENTITY, VALUES and LABELS. Studio also keeps a DESCRIPTION on an input, and a LOOP on a float (true: it is the length of a loop of the shader, in seconds; another host ignores it). The export dialog reads it to suggest a video length, see Loop check.

TypeValue
floatA number.
longAn integer, optionally from a list (VALUES, LABELS).
booltrue or false.
point2DA point [x, y].
color[r, g, b, a], each 0 to 1.
imageAn image.
eventA trigger.
audio, audioFFTThe sound, as an image.

Passes

A pass may have TARGET (the buffer it draws to), PERSISTENT, FLOAT, WIDTH and HEIGHT. WIDTH and HEIGHT are expressions.

Imported

"IMPORTED": {
  "tex": { "PATH": "imported/tex.png" }
}

A list form is accepted too. A .istshader and a .istpipe keep their images in imported/.

What ISF Studio reports

ISF Studio reports, and does not silently repair: invalid JSON, misspelled keys, keys from ISF 1 (such as PERSISTENT_BUFFERS), lists and entries of the wrong shape, inputs without a name or a type, unknown input types, and imports whose file is missing or whose path is wrong. Keys it does not know are kept untouched.

What has an obvious answer comes with a Fix button in the console, including the conversion of ISF 1 shaders: PERSISTENT_BUFFERS becomes PERSISTENT on the passes, and the vv_ names become isf_ ones.