ISF header reference
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
| Key | What it is |
|---|---|
DESCRIPTION | What the shader does. |
CREDIT | Who made it. |
CATEGORIES | A list of categories, for hosts that sort by them. |
ISFVSN | The ISF version. Studio writes 2. |
INPUTS | The inputs. |
PASSES | The passes of a multi-pass shader. |
IMPORTED | The images the shader imports. |
LICENSE | A 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.
| Type | Value |
|---|---|
float | A number. |
long | An integer, optionally from a list (VALUES, LABELS). |
bool | true or false. |
point2D | A point [x, y]. |
color | [r, g, b, a], each 0 to 1. |
image | An image. |
event | A trigger. |
audio, audioFFT | The 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.