How to use GLSL Shader
- Add an image as the source.
- Choose Open in a workflow. Sign in, check the credit estimate on the board, then run it.
- Connect the result to the next step on the board, such as an editor or another model.
Inputs explained
- Image (required)
- Set the image used by this model. Type: image.
Tips before you run
Start with the default settings and change one input at a time. Keep the result you like on your board so the next step can use it.
If you add a reference file, use a link the workflow can read. Check the inputs and credit estimate on the board before starting a run.
GLSL Shader pricing
GLSL Shader is free to run on Wireflow.
See Wireflow plans and credits
GLSL Shader API
Run GLSL Shader from your own code with the Wireflow API. Open it in a workflow, then call the run endpoint with that workflow's ID and poll for the result. Agents can run it through MCP.
# Model: GLSL Shader. Open a workflow first.
# Replace YOUR_WORKFLOW_ID with the ID in its /flow/ URL.
curl 'https://www.wireflow.ai/api/v1/workflows/YOUR_WORKFLOW_ID/run' \
-H 'Authorization: Bearer YOUR_WIREFLOW_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"nodeIds":["model"]}'
# Response (202):
# {"data":{"executionId":"...","status":"running",
# "poll":"/api/v1/workflows/executions/.../poll"}}
# GET the returned poll path with the same Authorization header.Read the run API docs or connect your agent.
Working with this model
What it is for
A fragment shader is the smallest useful unit of image processing there is, and one node that runs an arbitrary one replaces a dozen single-purpose effect nodes. Vignette, grain, chromatic aberration, halftone, duotone, posterise, scanlines, bloom, a bespoke grade. All of them are a few lines of GLSL, and this node runs them on your wired image in the browser for free.
It is also the most agent-friendly node in the product: an LLM can write GLSL, so "give me a warm halftone with an adjustable dot size" is one prompt away from a working control panel.
The contract
You write a fragment shader BODY. The node declares these for you, so do not declare them yourself:
| Declared for you | What it is |
|---|---|
uniform sampler2D tex | The wired image |
uniform vec2 resolution | Output size in pixels |
in vec2 uvs | Texture coordinates, 0..1 |
out vec4 outColor | What you write your pixel to |
The #version line and the precision qualifiers are ours too. If you paste a
shader that carries its own #version, it is ignored rather than breaking the
compile.
The smallest shader that works:
void main() {
outColor = texture(tex, uvs);
}
Uniforms become controls
Every float, vec2 and vec3 uniform you declare turns into a control
in the editor, and its value is saved with the node.
| You declare | You get |
|---|---|
uniform float amount; | A slider, 0..1 |
uniform float amount; // min -2 max 2 | A slider, -2..2 |
uniform vec2 center; | An x / y pair |
uniform vec3 tint; | A colour picker |
Add default to the same comment to set the starting value:
// min 0 max 4 default 1.5, or // default #ff8800 for a colour.
Precision qualifiers are fine: uniform highp float amount; reads exactly
like the plain form.
If you give a range but no default, the control starts at the MIDDLE of it, so a pasted shader shows you its effect instead of previewing as a no-op.
Anything else is refused with a message rather than quietly ignored: arrays,
uniform float a, b; on one line, vec4, int, mat3, extra samplers.
A control the node cannot build is a uniform the node would never bind, and a
shader running on an unbound uniform is worse than one that will not save.
Two more things it will tell you about rather than swallow: a declaration missing its semicolon, and a block comment you never closed (which otherwise hides every declaration after it).
What you cannot do
#extension directives do not work. They have to precede everything else in
the unit, and the node's own declarations come first, so the driver rejects
them. Nothing outside core GLSL ES 3.0 is available.
There is one texture, tex, and no way to add a second, so multi-input
effects (blends, displacement maps) are out. The output is one image at the
source image's size.
Presets
Three shaders ship in the preset menu (vignette, film grain, chromatic aberration) plus a passthrough to start from. They are just source text: load one, then change it. There is nothing special about a preset once it is in your editor.
Errors
Compile errors appear under the source with the line numbers remapped onto YOUR lines, not the assembled ones. Save is disabled while any error is showing, and a shader that fails at full resolution writes nothing at all, so the node keeps serving its last good image instead of a blank one.
What it costs
Nothing. The shader runs on your own GPU and the result goes straight to storage. It is a free node, so it has no Run button; it refreshes with the rest of a workflow run.
Re-render needed
The output is stamped with the identity of the shader source, every uniform value, and the upstream image. Change any of them and the card shows Re-render needed. It keeps serving the previous image while that badge is up, deliberately: dropping it would fall back to the unshaded upstream photo, and a paid node downstream would then process the wrong image while looking perfectly healthy. Open the editor and save again to clear it.
GLSL Shader FAQ
What is GLSL Shader?
GLSL Shader is a Wireflow workflow tool. Run a custom GLSL fragment shader over an image; the shader’s own uniforms become sliders, colour pickers and point controls.
Is GLSL Shader free?
Yes. GLSL Shader is free to run on Wireflow.
Can I use GLSL Shader commercially?
Yes. What you make with GLSL Shader on Wireflow is yours to use for personal and commercial work, subject to the model maker's own terms. Our terms of service have the details.
Does GLSL Shader have an API?
Yes. Save a workflow with GLSL Shader, then call the Wireflow run API with its workflow ID. The API tab above has examples you can copy, and agents can run it through MCP.
How do I use GLSL Shader?
Set the inputs above and choose Open in a workflow. Sign in to save your board, then check its credit estimate before you run.
