Author post-processing and sprite effects with presets or raw GLSL.
Shader Editor
The Shader Editor (Asset Manager → Shaders) is how you author visual effects — colour grading, vignettes, pixelation, scanlines, glow — and apply them to the whole screen, a zone, a sprite, or a VFX layer. It has two modes, and a live preview that renders a sample sprite through your compiled shader with time animating.
Two Authoring Modes#
| Mode | For |
|---|---|
| Stack | No code. Add ordered preset nodes and tune their parameters with sliders and colour pickers |
| GLSL | Write a raw fragment shader, then Compile & Validate — errors are reported inline, and a failed compile clears the preview instead of breaking anything |
Preset nodes#
The stack library ships with: color-adjust, tint, gradient-map, vignette, pixelate, chromatic-aberration, wave, glow-lite, scanlines, grayscale, and flash-pulse. Nodes are ordered, individually enabled, and each exposes typed parameters (float, vec2, colour) — including animatable curves.
Scopes#
A shader declares where it can be applied:
| Scope | Applies to |
|---|---|
| Fullscreen | The whole screen — colour grading, CRT looks, damage flashes |
| Zone | The ground (terrain) of every map — a murky swamp floor, a frozen lake bed. For a look over everything on screen use Fullscreen |
| Layer | One render layer |
| Entity / Sprite | A single character or sprite — a frozen or burning target |
| Tile | Terrain tiles |
| VFX | A visual-effect layer |
Per-entity scopes (Entity, Sprite, VFX) are subject to a runtime budget that warns and skips rather than tanking the frame rate.
Quality tiers#
Tick the tiers a shader is allowed to run on. In game the tier comes from the player's Settings → Graphics → Lighting choice (the Preset row sets Lighting too), so a heavy effect is skipped exactly when the player, or their frame rate, asked for less.
| Player's Lighting | Tier your shader is checked against |
|---|---|
| Ultra | ultra |
| High | high |
| Medium | medium |
| Low | low |
| Off | low |
| Auto | Whatever Auto is running right now. It steps down when the frame rate stays low and climbs back when it recovers, and your shaders follow each step |
What to know:
- Phones and tablets never go above medium. Even if the player picks High or Ultra lighting, a shader ticked for High / Ultra only does not run there. Tick Medium (or Low) for anything a phone player must see.
- There is no "off" for shaders. A player who turns Lighting off still gets every shader ticked for Low. Tick Low for effects that are part of the game's look (an underwater tint, a poison haze), and leave it unticked for pure eye candy.
- A shader with no tier ticked runs on every tier.
- If your world has dynamic lighting switched off, shaders use high on computers and medium on phones and tablets.
Authoring a shader — step by step#
- Open Asset Manager → Shaders and create a shader. Give it a Name.
- Choose the Mode (Stack or GLSL) and the Scope (where it can apply).
- Tick the quality tiers it's allowed to run on, and leave Enabled off until it looks right.
- Stack mode: click to add preset nodes, drag to reorder them (order matters — they run top to bottom), toggle each on/off, and tune the sliders / color pickers. GLSL mode: write your fragment shader, then Compile & Validate.
- Watch the live preview — it renders a sample sprite through your compiled shader with time animating. A bad compile clears the preview and reports the error inline instead of breaking anything.
- Enable the shader and save. Fullscreen shaders apply in game straight away, on the tiers you ticked. Zone shaders apply on every map. Others attach to their target (a sprite, tile, layer, or a VFX layer).
Triggers — when a shader shows#
Under the editor, Triggers decides when a saved fullscreen or zone shader is on screen. Pick Always, or Only while… and build a condition from the player's own state: health, mana or stamina %, in combat, dead, riding, indoors, playing a minigame, a status effect, the map, the weather, the time of day, a player switch or variable. Combine conditions with **all of these hold or any of these holds**, and nest one group.
- Save the shader, then scroll to Triggers — when it shows.
- A zone shader: pick the Map binding to give a rule (bind it to a map first). A
fullscreen shader has one rule.
- Choose Only while… and add conditions — for a low-health vignette, Health % below 25.
- Set Fade in and Fade out (ms): how long it takes to appear and to go.
- Optional: + Driver makes a parameter follow a signal — *strength follows Health %: at 0 → 1,
at 100 → 0* grows the effect as health falls.
- Move the Simulate state sliders: the live preview shows or hides it, and drivers move its
parameters, exactly as the game will. Then Save rule and publish.
| Field | What it does |
|---|---|
| Always / Only while… | Always on, or only while the condition holds |
| ± hold | Once on, a number condition stays on until the value moves back past the threshold by this much — so a health bar wobbling at 25% does not flicker the effect |
| Fade in / Fade out | Milliseconds to appear and to go (0 = at once) |
| Parameter drivers | A float parameter that follows Health %, Mana %, Stamina % or a player variable, between two points |
| Simulate state | Fakes the player's state to try the rule in the preview. Nothing is saved |
Two flags beside Enabled:
| Flag | What it does |
|---|---|
| Flashing | The shader flashes or strobes. Players with Reduced motion on never see it |
| Essential | It carries information (a poison tint): players can't switch it off or turn it down |
- Conditions are about the player themself and run on their screen — a shader cannot react to
another player's health.
- A shader can also be switched by events (Set Shader) and by status effects (a **Screen
shader or Entity tint** on the effect).
- Players can turn screen effects down, or off one by one, in Settings → Accessibility —
except the ones you mark Essential.
How screen effects stack#
Full-screen shaders share the screen with two effects the engine adds itself, always in this order:
- your Fullscreen shaders,
- the lighting vignette (darker corners; High and Ultra lighting only, in maps without Diorama — a Diorama map draws only its own colour-grade vignette, none by default),
- the heat haze over the ground during a heatwave (High and Ultra weather only).
Turning one of them on or off never removes the others.
Editing a shader that is already in the game#
Save a change and, once it reaches your game server, players who are already online see it without reloading. That includes a slider you only nudged: the running effect picks up the new value.
Two shaders built from the same nodes with different slider values are separate effects, each with its own values.
Writing GLSL#
Raw mode expects a GLSL ES 3.00 fragment shader that assigns finalColor. These builtins are provided: uTexture, uTime, uResolution, and vTextureCoord. Any extra uniform must be declared as a typed parameter (float, vec2, or color) and named u<Name> — that's what turns it into a slider or color control. The validator rejects unsafe code (while loops, unbounded for, shaders over 16 KB) and anything referencing an undeclared uniform.
Limits: up to 24 nodes in a stack and 32 parameters. Parameters can be animated over time with curves.
Cross-editor tip: any shader you build here can be applied as a post-pass on a single VFX layer from the VFX Editor — great for a heat-haze or glitch pass on one effect.
New projects seed three example shaders (CRT, sepia, frozen tint) in the library, disabled — they're there to read and copy, not to tint your world by default.