Pipeline text
A pipeline can be shown as text: one line per node and one per link. You can paste it in an AI assistant (ChatGPT, Claude, Copilot…) so that it reads your pipeline, and the assistant can answer in the same format. It is a Pro feature, trial included.
Ask an assistant
- Open a pipeline and click View pipeline as text in its toolbar.
- Write what you want in the field under the text: explain this pipeline, find what is wrong, add a vignette…
- Click Copy for AI and paste in the assistant.
The copied prompt has everything the assistant needs to start: what ISF Studio is, the format below with recipes and an example of feedback, your pipeline and your request. It also gives the address of the node catalog and of the snippet catalog, which an assistant that can read web pages fetches by itself. If yours cannot, tick Include the list of the node types under the text: the prompt then holds every node type, with its ports (a few thousand words). Tick Include the list of the snippets for the same reason: the prompt then holds the id and the signature of every snippet of the Toolbox (about 35 KB), and With what each snippet does adds the first sentence of each description (about twice that). Copy gives the text alone.

Ask about one group
When a group, a loop, a branch or a function is open in the editor, the dialog offers Ask only about the group (ticked by default). Copy for AI then gives the assistant what is inside that block, with its ports, and not the rest of the pipeline: a shorter prompt, on the part you are looking at. The text shown in the dialog, and Copy, stay the whole pipeline.
The assistant answers with the inside of the block, in a pipeline-text-inside block. ISF Studio only imports whole pipelines, so you apply that answer by hand. Untick the option to ask about the whole pipeline, which can be imported back.
Bring a pipeline in
When an assistant or a web page gives you a pipeline in this format, copy it and choose File > Import > Pipeline from Clipboard. ISF Studio creates a new pipeline in your library, lays it out, and opens it. It is a Pro feature, trial included.
To make the pipeline in a folder of the library, right-click the folder and choose Import… > Pipeline from Clipboard….
The files a pipeline points at (a shader, another pipeline, an image) do not have to be where the text says: if no file has that path, ISF Studio looks from the folder you import into, then for a path that ends the same way, then for a file of the same name, the closest one first. The notice that follows the import says which file was taken for which.
You can copy the text as it is: a code block from a chat, with sentences around it, or a quoted reply. If it cannot be read, or the graph does not work (a port that does not exist, two types that do not match), a dialog tells you what is wrong and on which line, with a suggestion when there is one. Copy errors for AI copies the errors and the text, so that the assistant can fix them.
You can import nodes, values, links, groups, loops, branches, functions, Toolbox snippets, the vertex graph, and the shaders, pipelines and images of your library, given by their path from the library root ({"shaderId": "Shaders/Plasma.fs"}). ISF Studio reads those files as when you drop them on the canvas, and keeps the images in the new pipeline. A snippet that was renamed or moved in an earlier version is still found under its old id. A path that is not in the library is an error, with the nearest names.
Copy for AI also lists the shaders, pipelines and images of your library, so that the assistant knows which files exist. Only the paths are listed. If the assistant gets a shader's inputs wrong, the errors list the right ones.
Shaders too
A shader is already text. Click Copy the shader for an AI assistant in the toolbar of its editor, write your request, and click Copy for AI. The prompt has what an ISF shader is, your shader and the console errors. It is a Pro feature too.
Turn a shader into a pipeline
Tick Ask for a pipeline of this shader in the same dialog. The prompt then also has the format of the pipeline text, the files of your library and the path of the shader, and asks the assistant to cut the shader so that the graph can be read: its inputs become input nodes, each function becomes a snippet node written with its own code, a short main() becomes nodes of the catalog, and its passes become pass nodes. A buffer a function reads (a persistent pass, for example) is a sampler2D parameter that a read-pass node feeds. By default the assistant is asked to cut all of it, even if it has to rewrite some code, and to say what it could not do. Tick Allow the shader itself where it cannot be cut to let it plug the shader in with a shader-isf node for that part. Copy its answer and choose File > Import > Pipeline from Clipboard.
The result is an attempt, not a conversion: compare the picture with the shader's. A snippet written with its own code is a function of the pipeline: its code is in the text, so View pipeline as text shows it, and an assistant can change it. As with a pipeline, tick Include the list of the node types and Include the list of the snippets if your assistant cannot read web pages.
For assistants
The nodes and snippets are listed in files made for machines: the node catalog (every type, its ports and values), the snippet catalog, and llms.txt and llms-full.txt, which hold the docs and both catalogs in one text.
The format
A pipeline is a graph of nodes. In ISF Studio it is drawn on a canvas; this text is the same graph, one line per node and per link. The coordinates are not in it: the editor lays the graph out.
Shape of the text
pipeline-text 1
title "Mixing colors"
metadata {"CREDIT": "Me", "CATEGORIES": ["Color"]}
values {"mixAmount": 0.5}
graph fragment
node n1 input-color {"input": {"NAME": "colorOne", "TYPE": "color", "DEFAULT": [1, 0, 0, 1]}}
node n2 input-color {"input": {"NAME": "colorTwo", "TYPE": "color", "DEFAULT": [0, 0, 1, 1]}}
node n3 math-add-vec4 # a: vec4, b: vec4 -> result: vec4
node n4 output-color # fragmentValue: vec4 -> (nothing)
link n1.value -> n3.a
link n2.value -> n3.b
link n3.result -> n4.fragmentValue
graph vertex
...
- The first line is
pipeline-text 1.title,metadata(the words of the ISF header) andvalues(what the inputs are set to, by input name) are optional. graph fragmentholds the fragment graph, and is always there.graph vertexholds the vertex graph, when the pipeline has one.- A line is a keyword, then its words. Blanks at the start are free. A line that starts with
#is a comment, and so is the end of a line after#(the app writes the ports of a node there: read them, they are not needed to write one). - Strings and objects are JSON, on one line.
Nodes
node <id> <type> ["label"] [{data}] [begin]
id: a name you choose (letters, digits,_), unique in the whole graph. The app writes n1, n2…type: the exact name of the node's definition (value-float,math-multiply-vec3-float,glsl-common-mix-vec3-vec3-float,input-float,output-color,snippet…). It is not a label: there is one type for each combination of types a node works with, somath-add-vec4andmath-add-floatare different nodes. Use the types that appear in the pipeline you are given or in the node catalog (https://isf-studio.app/node-catalog.json, one line for each in https://isf-studio.app/llms-full.txt); do not invent one."label": only when the node was renamed.{data}: what the node holds. Examples:{"value": 0.5}forvalue-float,{"value": [1, 0.5, 0]}forvalue-vec3,{"input": {"NAME": "speed", "TYPE": "float", "DEFAULT": 0.5, "MIN": 0, "MAX": 2}}for an input (NAME,TYPE,DEFAULT,MIN,MAX,LABELare those of an ISF input; an input'sNAMEis what the shader and the controls know it by),{"snippetId": "noise-and-patterns/noise/value-noise-2d"}for a snippet of the library (its code comes from the library: its inputs are the parameters of its function and its output isresult; the snippet catalog, https://isf-studio.app/snippets-catalog.json, gives the id and the signature of each, e.g.float noise2d(vec2 p): use the ids it gives, nothing else). A function of your own is a snippet written with its code, and no id:{"snippetName": "Twice", "code": "float twice(float x) {\n return x * 2.0;\n}"}(one GLSL function: the parameters of its signature are the inputs of the node, and its value isresult; anoutparameter is one more output; the code holds the helpers the function calls, written before it, and the constants it uses: two snippets that need the same helper both hold it, and it is declared once; give each function its own name, and write the same code again to use it in two places). With"mode": "define"the node only declares the function, and afunction-callnode uses it: link the snippet'sfnto the call'sfn, then give the call the arguments. A snippet's code may read the built-ins (TIME,RENDERSIZE…) but not the inputs of the pipeline: pass them as parameters. A shader, a pipeline or an image of the user's own library is told by its path from the root of the library:{"shaderId": "Shaders/Plasma.fs"}forshader-isf(a.fsor a.istshader),{"pipelineId": "Pipelines/Glow.istpipe"}forpipeline-isf,{"path": "Images/city.jpg"}forimported-image. Their ports come from the file (a shader's inputs, for example), and only the files the user lists exist.- A
comment,textortodonote can be put on a node of the same graph, and the compiler writes it above that node in the shader (as//lines). Write it as{"text": "What it does", "attachTo": "n3", "side": "top", "width": 220, "height": 60}(sideistopby default, orbottom,left,right: where the note is drawn; the notes of one side are stacked), or with a link,link c1.text -> n3.note(the app writes it so). A node takes any number of notes; a note is on one node. It goes on a node that computes, or on a container, a group, a function, a loop or a branch (the compiler writes it above what the container holds, or above its declaration for a function): not on a node at the edge of a container (aloop-input, afunction-parameter…), or on another note. - Draw Text and Typewriter are not node types of their own: they are
snippetnodes with no id,"textInput": trueand asnippetName, fragment graphs only. The string they draw comes from atextnode linked to theirtextinput (link t1.text -> d1.text, witht1atextnode,{"text": "Hello"}), and the app writes their real code from it when the pipeline is compiled: write only a stub of the function, with the right signature and a body that returns 0. Draw Text,{"snippetName": "Draw Text", "textInput": true, "code": "float drawText(sampler2D font, vec2 p, float size, float spacing, float lineSpacing, out float sdf, out vec2 aabbMin, out vec2 aabbMax) {\n sdf = 0.0;\n aabbMin = vec2(0.0);\n aabbMax = vec2(0.0);\n return 0.0;\n}"}: inputstext(string),font(the image of a font),p(the pixel, in pixels from the start of the first line),size(the em, in pixels),spacingandlineSpacing(added to each character and each line, as a fraction ofsize); outputsresult(the coverage, 0 to 1),sdf(the distance in pixels, above 0 inside) andaabbMin,aabbMax(the box of the text, in pixels aspis). Typewriter writes how much of the same text is typed, to mask what Draw Text draws: its function must be namedtypewriter…(the name is what tells it from Draw Text),{"snippetName": "Typewriter", "textInput": true, "code": "float typewriterText(sampler2D font, vec2 p, float size, float spacing, float lineSpacing, float time, float speed, out float characters, out vec2 penEnd, out float index, out vec2 cell) {\n characters = 0.0;\n penEnd = vec2(0.0);\n index = -1.0;\n cell = vec2(0.0);\n return 0.0;\n}"}: the same inputs, plustime(seconds since the typing starts) andspeed(characters a second); outputsresult(1 where the text is written, 0 elsewhere),characters(its length),penEnd(where the pen is after it),index(the number of the character under the pixel, -1 where there is none) andcell(where the pixel lies in its cell). Both read the sametextand the samefontandp. - A
sendand itsreceivenodes share a channel by its name: areceivereads thesendof its graph that has the samechannelName({"channelName": "baseColor"}on both); the channels of a graph have different names. No id ties them, and no link: thereceivehas no input. begin: the node holds a graph of its own (a group, a loop, a function). Its nodes and links follow, until a line that is onlyend.
Links
link <id>.<port> -> <id>.<port>: from an output port (src) of a node to an input port (sink) of another.
- A port is written by its name, as in the comment of its node (
n3.result). If a node has two ports of one name, the first isnameand the nextname~2,name~3. Any character that is not a letter, a digit,_or-in a name is written%XX. - A link joins two nodes of the same graph (the same block). A link to a group, a loop or a function goes to its own ports, outside; the nodes inside are linked inside.
- The types of the two ports must be the same: to join a vec3 to a vec4 insert a conversion node (
convert-vec3-vec4). A few types are the same under another name and join with no node:coloris a vec4,point2Da vec2,eventa bool (aninput-eventfeeds aboolparameter of a snippet), andaudioandaudioFFTare images, that issampler2D(aninput-audioorinput-audiofftfeeds asampler2Dparameter of a snippet, and is read withIMG_NORM_PIXELthere). An input port takes one link, unless it is marked as taking several. - Some ports take the type of what is linked to them, so the type in a comment can change once a link is made.
Groups, loops and functions
The node has begin, and its inside holds boundary nodes: group-input and group-output for a group (function-input, function-parameter, function-return, function-output for a function; branch-input and branch-output, which share a "pairId", for a loop). The data of a boundary node gives the name of the port it makes on the outside: {"portName": "offset"}. The ports of the container are made from them, so write the inside first and link the container after. For a function's parameters and returns and the channels of a loop, "portType" gives the type of the port ({"portName": "x", "portType": "float"}), and the loop-input and loop-output of one channel share a "pairId", which is unique in the whole text, as an id of a node is (two loops never use the same one: give each loop its own, "marchT" and "shadowT"). A loop comes with its iterator, its bound and its test: write what the loop of the pipeline you are given holds, and link the nodes the same way. The text of a function call names the function it calls by the link into its fn port.
The ends of a pipeline
A fragment graph ends in an output-color node (gl_FragColor, a vec4): link what the pipeline draws to it. The inputs of the pipeline are the input-* nodes: they become the controls of the window.
Passes, feedback and sizes
A pass node draws what is linked to its color port (a vec4) into an image of its own, and gives that image at texture. Its data names it and sets it, everything optional: {"target": "trail", "persistent": true, "float": true, "width": "$WIDTH/2", "height": "$HEIGHT/2"}. target is its name, persistent keeps the image from one frame to the next, float makes it 32-bit, width and height are ISF expressions ($WIDTH and $HEIGHT are the size of the output).
A read-pass node, {"target": "trail"}, gives at texture the image of the pass of that name, wherever it is in the graph. For a persistent pass it is the image drawn at the previous frame: that is how trails and feedback are made. An image is read as a color with img-this-norm-pixel (the pixel being drawn: image -> color) or img-norm-pixel (a coordinate from 0 to 1 at coordinate). What is linked to output-color is drawn last. A trail, the brightest of the image and of the faded previous frame:
graph fragment
node img input-image {"input": {"NAME": "inputImage", "TYPE": "image"}}
node fade input-float {"input": {"NAME": "fade", "TYPE": "float", "DEFAULT": 0.95, "MIN": 0, "MAX": 1}}
node cur img-this-norm-pixel
node prev read-pass {"target": "trail"}
node prevPx img-this-norm-pixel
node faded math-multiply-vec4-float
node keep glsl-common-max-vec4-vec4
node trail pass {"target": "trail", "persistent": true}
node show img-this-norm-pixel
node out output-color
link img.value -> cur.image
link prev.texture -> prevPx.image
link prevPx.color -> faded.a
link fade.value -> faded.b
link cur.color -> keep.a
link faded.result -> keep.b
link keep.result -> trail.color
link trail.texture -> show.image
link show.color -> out.fragmentValue
Recipes
- What a pipeline is. ISF Studio files a pipeline by its image inputs: with none it is a generator, with an
input-imagenamedinputImagea filter, withstartImageandendImage(and aprogressfloat from 0 to 1) a transition. Name the inputs so. - Time.
isf-timeis the seconds since the start (a float). Multiply it by a speed input (math-multiply-float) before aglsl-trigonometry-sin-floator aglsl-common-fract-float, so that the user can change the speed. - Coordinates.
isf-frag-norm-coordis the position of the pixel from 0 to 1 (a vec2, the origin at the bottom left). Centered:math-subtract-vec2-floatwith 0.5. With the right aspect:isf-rendersize(the size in pixels, a vec2) ->split-vec2,math-divide-floatfor x / y, multiply the centered x by it (math-multiply-float), andcompose-vec2the two back. The distance to the center isglsl-vector-length-vec2. The snippetspace-and-camera/coordinates/centered-aspect-uv(uvandviewportSize, theisf-rendersize) does all of that in one node: use it, and multiply by 2 for coordinates from -1 to 1 in height. - A soft edge.
glsl-common-smoothstep-float-float-floattakes the two edges ataandband the value atc. Its result is theamountof aglsl-common-mix-vec4-vec4-floatbetween two colors. - Colors are vec4 (
input-color,output-color). To make one from a vec3 useconvert-vec3-vec4(wis the alpha, 1 for opaque). - Few nodes. Look in the snippets before writing a chain of arithmetic nodes: there is one for centered coordinates, for repeating or tiling a space, for a palette, a hash, a rotation, a glow. A formula of more than four or five operations is one snippet written with its own code (one GLSL function, see the data of a
snippetnode), not a chain ofmath-*nodes: a pipeline of a hundred nodes is hard to read and to change. - Inside a loop. A snippet node and the constant nodes (
value-float,value-vec3…) sit in the body of the loop and are called there: do not pass a function in through aloop-inputto call it. Only what comes from outside the loop (an input of the pipeline, the result of another node) goes in through aloop-input; what changes from one turn to the next goes out through theloop-outputof the same"pairId". - Controls. Every
input-*is a control of the window: give it aNAMEin camelCase, aDEFAULT, and aMINandMAXfor a float. Alonginput is a menu: it needsVALUES(the whole numbers) andLABELS(their names, same count), or it shows nothing. A pipeline with no input has nothing to adjust. - Check the types. A float and a vec2 are not joined directly: take the node whose name says both (
math-multiply-vec2-float), or convert. When a link is refused the error says why: write the pipeline again with it fixed.
What the text does not tell
Coordinates, internal ids, the code of a snippet of the library, a shader or a sub-pipeline (only where to find it), the bytes of an image. The code of a snippet of your own is in the text. A node that does not appear in the text does not exist.