Shaders and effects
Live GPU shader fills whose params you can key, texture and noise fills, and effects that animate.
How to
Put a moving gradient behind a title
- Select the layer (the Shader title template's backdrop is one), open its fill and choose Shader as the fill type.
- Pick Mesh gradient from Backgrounds. Each tile plays a short loop of what the preset draws. It moves on its
own: a shader that reads
timeanimates in Animate, in present mode and in exports, on the timeline's clock, so a frame always renders the same. - Its params (Mesh speed, Mesh spread and four colours) show under the presets. Click a param's ◆ to key it, the way you'd key opacity: key Mesh speed from 0.3 to 2 over the last second for a burst.
- Every preset is a node graph: Edit nodes opens it in the node editor, where you can wire the music or another node into any of its knobs.
Description
A launch post in Animate with its frame selected. Its fill opens, Shader is picked, and Mesh gradient from Presets fills the frame with a slowly moving gradient. Space plays it: a shader that reads time animates on its own.
Write your own shader
Click Edit WGSL, write a fn shade(uv, res, time) that returns a colour, and Apply (or press Ctrl+Enter, Cmd+Enter
on a Mac). The fields of a struct Params { … } become controls, and // @range, // @default and // @color
annotations on them set their sliders, defaults and colour pickers. A colour or vector param is keyed per component.
While you type, the preview above the code draws your draft. Nothing changes on the canvas until you apply, and
Not applied shows until you do. When the code doesn't compile, the preview keeps the last version that did. The
gutter marks each line with an error, and the list under the code says what's wrong: click an error to jump to its line.
A problem that isn't on one of your lines, like a shade with the wrong arguments, is listed without a line. Tab
indents; press Ctrl+M to make Tab move focus out of the code instead.
An f32 field marked // @audio bass (or any other audio signal) follows the music as soon as you apply the code.
Applying a shader, its audio binding included, is one undo step.
Description
A launch post whose frame has the Plasma shader fill, with its fill open. Edit WGSL shows the code under a live preview. A number in the code is replaced with nope: the gutter marks its line and the list under the code says the value is unresolved, while the preview keeps the last version that compiled. Typing 1.5 instead clears the error and the preview draws tighter bands; Cmd+Enter applies it to the canvas.
- Click Edit WGSL: the code opens under a live preview.
- A mistake is marked on its line and explained in the list under the code.
- Fix it: the preview follows as you type.
- Press Cmd+Enter (Ctrl+Enter) to apply it to the canvas.
Save and share your shaders
Save keeps the shader under My shaders with the name you type, its param values included, so the same code with other colours can be saved as another look. Saving under a name you already used replaces that shader (the button says Replace). A shader built with nodes keeps its graph: picking it again opens in the node editor. Each saved or installed shader's tile plays a short loop of it with its values (a still when it doesn't move). Hover a saved shader to rename it (the pencil) or delete it.
Publish shares some of your saved shaders on the marketplace as a shader pack. Each one's preview in the dialog is its first frame with its values. The listing shows each shader's loop, or that first frame when the loop is too large. A node shader keeps its graph in the pack, so whoever installs it can edit the nodes too. Publishing the same pack name again updates the listing, also after you rename the pack in My packs.
The package button next to Publish opens My packs: the shader packs you've published. List or unlist each one, rename it, or delete it. Deleting takes a pack off the marketplace; copies people already installed keep working. The brush library has the same My packs for brush packs.
Description
Signed in, a launch post whose frame has a tweaked Plasma shader fill, its fill open. Save asks for a name; Neon plasma is typed and the shader joins My shaders. Publish opens Publish a shader pack with Neon plasma ticked beside its first frame. Cancel closes it, and the package button opens My shader packs: two published packs, each with its picture, item and install counts, a Listed switch, a link to its page and delete. Turning off the first pack's switch makes it unlisted.
- Click Save and name the shader.
- Click Publish: each of your shaders shows its first frame. Pick the ones for the pack, name it, and publish.
- The package button opens My packs.
- List or unlist a pack with its switch, rename it, or delete it.
Reference
Built-in shader presets
The fill picker lists the presets in three groups: Backgrounds, Effects and Audio visualizers. Every one is a
node graph, so Edit nodes opens any of them, and its knobs are the inputs of its
nodes nobody wired. A knob is named after its node and input: mesh_speed is the speed of the node called mesh,
shown as Mesh speed in the panel and keyed at fills[@f1].shaderParams.mesh_speed.
Each tile plays a 2.5-second loop of the preset at its starting values. A visualizer's loop is driven by a made-up beat, so you can see what follows the music before you add any.
Backgrounds fill the layer:
| Preset | Nodes | Knobs |
|---|---|---|
| Mesh gradient | mesh (Mesh gradient) | mesh_speed, mesh_spread, mesh_colorA, mesh_colorB, mesh_colorC, mesh_base |
| Plasma | plasma (Rainbow plasma) | plasma_speed, plasma_scale, plasma_hue, plasma_glow, plasma_saturation |
| Waves | waves (Waves) into water (Mix) | waves_speed, waves_scale, water_a (deep), water_b (foam) |
| Starfield | stars (Twinkling stars) added onto sky (Blend) | stars_density, stars_twinkle, stars_cells, sky_base |
| Grid glow | grid (Pulsing grid) lighting glow (Blend) | grid_cells, grid_speed, grid_line, glow_layer (the line colour), glow_base |
Effects: particles, lines, bursts and light
These draw with transparency, so put them on a layer over the picture (a full-frame rectangle) and set its blend mode — Screen for light, sparkles and rain. Each one is a single node in the Effect group of the node editor's library, so you can also drop one into a graph of your own. Its knobs are keyable (key a burst's Burst progress 0 → 1 on the hit, a line's Lines amount up as a charge builds), and every frame renders the same.
| Preset | What it draws | Knobs |
|---|---|---|
| Petals | Blossom falling in three layers of depth, tumbling | particles_density, _speed, _angle, _sway, _size, _spin, _opacity, _seed, _colorA, _colorB |
| Rain | Streaks falling fast along the angle | the same |
| Snow | Soft flakes drifting down | the same |
| Sparkles | Four-point stars twinkling on their own clocks | the same |
| Confetti | Flipping paper squares in two colours | the same |
| Embers | Glowing motes rising and flickering | the same |
| Dust motes | Slow motes drifting in a beam of light | the same |
| Focus lines | Manga concentration lines rushing in toward a centre, redrawn rate times a second | lines_center, _inner, _count, _thickness, _rate, _amount, _color |
| Speed lines | Parallel streaks rushing along an angle: a dash, a charge | lines_angle, _count, _speed, _streak, _thickness, _density, _amount, _color |
| Impact burst | A hit's star-burst: a hot core, spikes flung out and a shock ring, driven by progress | burst_center, _progress, _spikes, _sharpness, _rate, _core, _ray |
| Light rays | Shafts of light fanning from an origin (off the frame is fine): sunbeams, a spotlight's haze | rays_origin, _spread, _angle, _rays, _intensity, _falloff, _speed, _color |
Audio visualizers
Zoom feedback, Kaleidoscope, Plasma pulse, Synth tunnel, Starfield warp and Liquid ink are MilkDrop-style graphs whose Audio nodes follow the timeline's sound in real time. They're described, knob by knob, in Shader graph and Audio-reactive animation.
Shaders from older files
Before every preset was a graph, the backgrounds and effects were hand-written shaders whose params had plain names
(speed, colorA). A fill from an older file keeps drawing exactly as it did. The first time you click Edit nodes on
it, or the agent edits its graph, it becomes the preset's graph: the picture doesn't change, its values move to the
matching knobs (speed to mesh_speed), and so do its keys, behaviours and variable bindings. Templates and the agent
still accept the old names when they set a preset's params.
The particle presets are one particle system: space is cut into cells that scroll along the angle at the speed (in thousandths of the layer's height per second, so a particle is the same size on any layer), each cell holding a particle when its hash is under the density, swaying across its path. They share their params, so switching a layer from snow to petals keeps its keys. A shader fill renders at the layer's size up to 2048 px on its longer side, keeping its shape.
Texture and noise fills
The Texture / noise fill type makes a shader from a noise: Cloudy, Perlin, Value, Cells, Paper or Canvas, with Scale, Contrast, Seed, Color A, Color B and Animate (so it moves with time).
Effects
Description
A launch post with its frame selected. The + of Effects lists the effects, and Noise adds film grain over the frame, which shows on the canvas at once.
Every number and colour of every effect is keyable:
| Effect | Keyable |
|---|---|
| Drop and inner shadow | Colour, X offset, Y offset, Blur, Spread |
| Layer, background and progressive blur | Radius; a progressive blur's Angle, Start and End |
| Motion blur | Length (Radius) and Angle |
| Noise | Amount, Size, Density, Color A and B, Seed (key the seed for film grain) |
| Texture | Scale, Contrast, Opacity, Seed |
| Glass | Radius, Refraction, Dispersion, Rim, Depth |
| Halftone | Dot size, Gradient angle, Centre X and Y, Ink, Paper, the tone thresholds and each band's colour and dot scale |
Motion blur and smears
Motion blur smears a layer along one direction: its Length in px at its Angle (0° is left–right, 90° top–bottom). Key the length up and down with a move for a smear, or leave it on for a streak (a reflection in a wet road is the picture flipped, faded and motion-blurred straight down).
On a group, frame or instance it smears everything inside, so a whole character or a scene's camera group streaks as one — and smears add up: a character smeared inside a camera group that whips smears by both. (Text inside is not smeared.) The Whip pan preset and scene transitions are built on it.
Lottie can't carry shader fills, blurs, glass, halftone, noise or texture: see
Exporting. The agent sets shader fills with set_shader_fill, and builds node shaders with edit_shader_graph.