Shaders
Lives in: shaders/ · commands (char, bg, sprite, obj, panel, screen_shader) · plate shader (target: "bg" only)
Visual filters from .gdshader files. Attach by name (no extension), or clear with null.
On a character or prop
{
"type": "char",
"name": "hana",
"position": "left",
"shader": "drop_shadow",
"shader_params": { "blur": 2.0 }
}
| Value | Effect |
|---|---|
| key absent | Keep whatever is already on |
null | Clear |
| string | Apply shaders/<name>.gdshader |
| object | Full form — see below |
Pack files do not list shaders — the story (or a bind) does. Drive a uniform from a flag with bind and a shader:… key — Reacting to flags live.
Backgrounds: Backgrounds.
Full object
{
"name": "hotspot_glow",
"params": { "glow_radius": 45 },
"target": "full",
"pass": "subviewport",
"margin": 48
}
| Key | Effect |
|---|---|
name | File stem under shaders/ |
params | Uniforms (numbers, #hex, vectors) |
target | bg | full — allowed values differ by surface (see below) |
pass | direct or subviewport |
margin | Extra pixels so glow is not clipped (forces subviewport when > 0) |
Which forms each surface accepts, its target values, and where the effect sits is the per-surface matrix: only char / bg / stage take a bare string; sprite / obj / panel / screens need the object. Every effect is one shader per slot / instance, never per layer or part.
On a named plate (panel.<preset>.plates.<name>.shader), only target: "bg" applies — Theme: panel → Plates.
Whole-screen effect
{ "type": "screen_shader", "value": "glitch", "target": "game", "shader_params": { "noise_intensity": 0.2 } }
{ "type": "screen_shader", "value": null }
target here is the screen-shader plane (game / scene / all) — coverage map: Planes and slots. Clear with null.
Usually you need
| Want | Do |
|---|---|
| Soft shadow on a character | "shader": "drop_shadow" (+ params) |
| Clear it | "shader": null on a later char |
| Room-wide vibe | screen_shader |
| Uniform follows a flag | bind → shader:… |