# OutlineBench (module)
A busy test stage and a per-frame cost meter for the look stack. `OutlineBench.build({ count = 3000, movers = 300, churnPerSecond = 30, recolourPerSecond = 10 })` lays out a few thousand objects under one local, temporary root: most stand still, some move every frame like moving platforms, some are spawned and despawned all the time, and some change material. `OutlineBench.measure(seconds)` then reads what toonBlocks' outline runtime and styleKit's stack spent in script on every frame (average, 99th percentile, worst frame, frames over 1 ms and over 33 ms). `OutlineBench.destroy()` takes the stage away. Used by toonBlocks' test suite for its cost check, and by anyone checking what a look costs in a big level.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.
# ToonBlocks (module)
The toonBlocks API: `ramps()`, `ramp(id)`, `rampSettings(id)` and `setRamp(id)` (pick a toon ramp for every toonRamp entry and every toon material in one change, for every player), `currentRamp()`, `setObjectOutline(entity, opts)` (one object's own outline, or none; the object as an entity, its id or its name), `setMaterialOutline(material, opts)` (every object wearing a material), `materialOutlines()`, `outlineStatus()` and `start()` (the outline runtime, started on its own). Require it with `require("~toonBlocks.ToonBlocks")`. The blocks themselves are ordinary styleKit blocks: stack them with `StyleKit.add`, `StyleKit.swap` and `StyleKit.applyLook`.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.
# ToonInkRuntime (module)
The runtime behind toonBlocks' toon ink line, on every player's machine. While a line block (toonOutline, toonSticker, toonStickerBlack, toonTintLine, toonFarLine, the pen, comic, brush, pencil, chalk, character and poster lines, or any block on the toonOutline shader) is live in the scene's style stack, it draws the line:
- **The shared line** of every object that has no line of its own grows from the depth edges of the frame (where the surface beside a pixel stands a real step farther away), through the engine's jump-flood outline (its seed and flood shaders) and toonBlocks' composite. It needs no list of objects: a thing that appears gets its line the frame it appears, a removed thing loses it the frame it goes, a new material, a hidden mesh or a swapped mesh change nothing here, and a wall or floor in front of an object hides its line. A still frame replays the same passes.
- **Objects with a line of their own** (a ToonOutline override, a group-masked entry, objects toonMaterials inks itself, excluded objects) are a few, found from small engine indexes, and drawn as their own groups; skinned characters keep an inverted hull, which draws the lines inside their silhouette.
- **Per-material rules and sphere masks** need each object's material or place, so with either in the stack every object is worked out one by one (budgeted per frame, read again after component writes).
It reads only synced state (the stack, ToonOutline components, the ToonOutlineRules entity), so every player, a late joiner included, draws the same lines. `ToonOutlines` is the same module under its old name.
API: `start()`, `rescan()`, `clearAll()`, `shellsOf(target)`, `status()` (`fast`, `shared`, `shells`, `rims`, `groups`, `targets`, `lastError`, `prof`), `costTotal()` (script milliseconds spent since load), `isOutlineBlock(blockId)`.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.
# ToonMaterial (module)
toonBlocks' toon light inside materials. `paint(entity, opts?)` (the entity, its id or its name) gives every Model and SkinnedModel at or under an object (a hero, a skinned character, a prop) a derived material on the `toonLit` shader that keeps its base colour and texture and takes the scene stack's toon light (bands, ramp or wrap, rim and highlight) or the light named in `opts` (`mode`, `ramp`, any toonLit setting); `unpaint(entity, { removeFiles = true })` puts every original back. `fromMaterials(folderOrList, opts?)` makes toon versions of a whole material set (a material library collection) without touching the originals. `fromStack()` reads the stack's toon light as toonLit settings; `setRamp(id)` re-colours every painted material with a toon ramp (ToonBlocks.setRamp calls it). The materials are world assets and the swaps are synced, so every player sees the same toon light.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.
# ToonOutline (component)
The toon-only part of one object's outline: an exact `width` with its `units`, and an ink `style` of its own (the name of any line block on the toonOutline shader). What every block reads about an object (its line weight, whether a line reaches it, its ink colour and how much the ink takes its own colour) lives on styleKit's `StyleChannel` beside it, the same setting a role from the styleRoles package fills in; this component is laid over the channel field by field. `draw`, `colour` and `tint` here still work for scenes made before toonBlocks 1.3.0. Set both with `ToonBlocks.setObjectOutline(entity, { weight = 2, colour = "#5a0010", width = 6, style = "toonComicLine" })`; `ToonBlocks.setObjectOutline(entity, nil)` gives the object back to the stack and its role. Synced and saved with the scene, so every player sees the same line on it.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- A two-client editor sometimes refuses to load two different scenes at once (#24666, #24667).
The package README's Known limits lists the rest.
# ToonOutlineRules (component)
Per-material rules for toonBlocks' hull outlines: every object wearing a named material gets that material's outline width, units, colour or tint, or none (`enabled = false`). It sits on one synced entity named `ToonOutlineRules`, saved with the scene, so every player draws the same lines. Set rules with `ToonBlocks.setMaterialOutline("toonBrick", { width = 4 })` and take one away with `ToonBlocks.setMaterialOutline("toonBrick", nil)`. An object's own `ToonOutline` component stands over its material's rule.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- A two-client editor sometimes refuses to load two different scenes at once (#24666, #24667).
The package README's Known limits lists the rest.
# ToonOutlines (module)
The runtime that draws toonBlocks' inverted-hull outlines on each machine. While a toon outline entry (toonOutline, toonSticker, toonStickerBlack, toonTintLine, toonFarLine) is live in the scene's style stack it gives every opaque object a local shell wearing a `toonHull` material with the entry's settings (a plain object's shell is a bare child holding the engine's own mesh and material components; a skinned mesh gets a SkinnedModel shell bound to the same skeleton), honours the entry's strength (it scales the width) and its group, sphere and depth masks (judged by each object's position; a rect mask is not applied), the stack's left-out objects, per-material rules (`ToonOutlineRules`) and per-object overrides (`ToonOutline`), and lets everything go when no outline entry is live.
It never walks the scene: it reads the engine's entity and component-field revisions every frame and works only when one moves (objects that arrive are found in the engine's index of Model and SkinnedModel components, a new material, visibility or mesh is read from the engine's own render components a chunk at a time), and every shell is made inside a small per-frame budget, so a big busy level costs well under a millisecond a frame and a still scene a few number reads. Started on every machine by toonBlocks itself. `status()` reports what it holds (`shells`, `materials`, `targets`, `queued`, `running`, `lastError`, and `prof`, milliseconds spent by part), `shellsOf(entity)` lists one object's shells with the hull material each wears, `costTotal()` is the script milliseconds spent since load (for per-frame meters such as `OutlineBench`), and `rescan()` looks for new objects at once.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.
# ToonSurface (component)
Marks an object that `ToonMaterial.paint` put on toon light inside its own materials, and remembers the material each of its meshes wore before, so `ToonMaterial.unpaint` puts every original back. Synced and saved with the scene, so every player sees the same toon light on the object.
## Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- A two-client editor sometimes refuses to load two different scenes at once (#24666, #24667).
The package README's Known limits lists the rest.
The full-frame pass shared by the Cel fill, Hue-shift cel fill and Two-tone poster fill style blocks (toonBlocks).
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# Cel fill (styleBlock, Fill)
Flat cel fill for the whole frame: each area of colour laid flat like cel paint, the texture detail inside it let go, and the light split into a lit tone and a shadow tone of a chosen colour.
Settings: `flatten` (0.85), `radius` (24), `keepEdges` (3), `saturation` (1.1), `posterLevels` (0), `threshold` (0.42), `softness` (0.02), `shadowColour` (`#9e94db`), `shadowLevel` (0.6), `litLevel` (1), `hueShift` (0), `shadowSaturation` (1), `lightWarmth` (0), `keepLight` (0), `shape` (0.9), `shadeLevel` (0.3), `castBelow` (0.8), `fullLight` (1), `keepLightColour` (0.3). Low quality gathers colour from `radius` 10 with four taps per ring instead of eight.
The area's colour is the surface's base colour (the deferred renderer's copy), averaged over two rings of taps out to `radius` reference pixels that lie on the same surface (same distance, same facing) and are close in colour, so texture detail goes by `flatten` while clear colour changes (a door in a wall) stay as edges by `keepEdges`. `saturation` and `posterLevels` (2 to 6 values, like poster paint) shape the flat colours. The light is read as the other toonBlocks blocks read it (the frame over the base colour, smoothed by `flatten`, redrawn as a clean sun light by `shape`, `shadeLevel` and `castBelow`) and split at `threshold`, `softness` wide: above it the lit tone (`litLevel`, turned warmer by `lightWarmth`), below it the shadow tone (the area's colour times `shadowColour` at `shadowLevel`, turned round the colour wheel by `hueShift` and saturated by `shadowSaturation`). `keepLight` 1 keeps the light the Light block before it made (bands, a ramp) inside the flat colours instead of the two tones, which is how the looks stack Toon bands with a cel fill. The Hue-shift cel fill (`celHueShift`) and the Two-tone poster fill (`celPoster`) are this block with other defaults, so they swap in one change and settings keep their meaning: `StyleKit.swap("fill", "celPoster")`.
It needs the base colour copy: on the forward renderer, and on the sky and pure black surfaces, it leaves the frame as it is.
## What it gives up in motion
Flat areas are steady: with the texture let go there is less fine detail to shimmer, and the colour is gathered again every frame, so it stays on its surfaces under any camera move and follows moving and animated things. The line between the lit and shadow tones follows the light, so it sweeps across a surface when the sun or a lamp moves; the sun's direction reaches the block about once a second, so under a moving sun that line moves in small steps. The gathering reach is sized in reference pixels, so as the camera closes in on a wall the same reach covers less of it and a little more texture shows; colour edges near silhouettes can wobble by a pixel or two as things move in front of each other.
## How it treats content
- Opaque things: laid flat in their own colours, two tones each, texture detail let go.
- Transparent things (glass, water): they keep no base colour of their own, so the pixel is painted as the flat surface behind, with the pane's tint and reflections counted only as light: glass and water mostly lose their own look under the fill. Leave panes and water out by name with `StyleKit.options({ exclude = { ... } })` where they matter.
- Particles and smoke: also painted as the surface behind, their brightness counted as light: a bright spark patch becomes the lit tone, smoke pushes the surface into its shadow tone, and their own colour is mostly lost. Leave effects that must keep their colour out by name.
- Sky: never touched.
- Fog: the base colour carries no fog, so distant surfaces are painted in their own flat colours and the haze is mostly painted out; fog only dims or lifts the light that picks the tone. Limit the block with a depth mask (`StyleKit.setMask("fill", { kind = "depth", near = 0, far = 60, soft = 0.3 })`) to keep far haze.
- Skinned characters: flattened every frame in their own colours, and a limb in front of the body keeps its own colour because taps must share its distance and facing; the tone line follows every pose.
- Foliage: each alpha-tested leaf is laid flat on its own; small leaves far away give the gathering little to average, so a distant canopy keeps some speckle.
- World text: letters a clear colour away from their card stay as edges, but small text can soften and words in shade take the shadow tone. Leave labels out by name: `StyleKit.options({ exclude = { "labelName" } })`.
- Black stays black: no light stays no light (the tones only exist where light arrived) and it returns through `sk_finish`, so with every light off the frame is black.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Hue-shift cel fill (styleBlock, Fill)
Cel fill whose shadows turn cooler and more saturated round the colour wheel and whose lights turn a touch warmer, as painters shade, instead of just darker.
Settings: `flatten` (0.85), `radius` (24), `keepEdges` (3), `saturation` (1.1), `posterLevels` (0), `threshold` (0.42), `softness` (0.02), `shadowColour` (`#d9d9f2`), `shadowLevel` (0.62), `litLevel` (1), `hueShift` (0.07), `shadowSaturation` (1.3), `lightWarmth` (0.02), `keepLight` (0), `shape` (0.9), `shadeLevel` (0.3), `castBelow` (0.8), `fullLight` (1), `keepLightColour` (0.3). Low quality gathers colour from `radius` 10 with four taps per ring instead of eight.
It is the Cel fill (`celFill`) with other defaults: the same flat areas and the same two tones, but the shadow tone is the area's colour turned 0.07 of a turn round the colour wheel (toward cooler hues for most colours) and saturated by 1.3, laid in a pale lavender `shadowColour` at 0.62, and the lit tone is turned 0.02 the other way. A red roof shades toward purple rather than brown, green grass toward teal. The Soft anime and Pencil anime looks use it with `keepLight` 1 over a colour ramp, so the ramp's light shows inside the hue-shifted colours. It swaps with `celFill` and `celPoster` in one change: `StyleKit.swap("fill", "celHueShift")`.
It needs the base colour copy: on the forward renderer, and on the sky and pure black surfaces, it leaves the frame as it is.
## What it gives up in motion
As the Cel fill: flat areas hold still and stay on their surfaces under any camera move; the lit and shadow line follows the light and sweeps when the sun or a lamp moves, in small steps about once a second under a moving sun (the sun's direction reaches the block on that rhythm). The reach of the colour gathering is in reference pixels, so very close up a little more texture shows. Hue shifting changes no timing: nothing flickers or boils.
## How it treats content
- Opaque things: laid flat in their own colours; shadows cooler and richer, lights a touch warmer.
- Transparent things (glass, water): painted as the flat surface behind, the pane's tint and reflections counted only as light, so glass and water mostly lose their own look. Leave them out by name where they matter.
- Particles and smoke: painted as the surface behind, their brightness counted as light; smoke pushes the surface into its hue-shifted shadow, so grey smoke can read as a cool coloured patch. Leave effects out by name to keep their colour.
- Sky: never touched.
- Fog: distant surfaces are painted in their own flat colours and the haze is mostly painted out. A depth mask on the entry keeps far haze.
- Skinned characters: flattened every frame; skin and cloth shadows turn cooler and more saturated, which suits stylized characters but can push pale skin toward violet in shade: lower `hueShift` or `shadowSaturation`.
- Foliage: each leaf is laid flat; shaded foliage turns toward teal and blue-green.
- World text: letters a clear colour away from their card stay as edges; words in shade take the shifted shadow colour. Leave labels out by name: `StyleKit.options({ exclude = { "labelName" } })`.
- Black stays black: no light stays no light and it returns through `sk_finish`, so with every light off the frame is black.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Two-tone poster fill (styleBlock, Fill)
A bold two-tone poster fill: every area flattened to one colour in a few poster values, cut hard into a lit tone and a deep shadow tone, like a screen print or a graphic comic.
Settings: `flatten` (1), `radius` (24), `keepEdges` (3), `saturation` (1.3), `posterLevels` (3), `threshold` (0.5), `softness` (0.006), `shadowColour` (`#8c80bf`), `shadowLevel` (0.42), `litLevel` (1), `hueShift` (0), `shadowSaturation` (1), `lightWarmth` (0), `keepLight` (0), `shape` (0.9), `shadeLevel` (0.3), `castBelow` (0.8), `fullLight` (1), `keepLightColour` (0.3). Low quality gathers colour from `radius` 10 with four taps per ring instead of eight.
It is the Cel fill (`celFill`) with other defaults: texture fully let go (`flatten` 1), colours more saturated and cut to three poster values, the light split exactly at half of full light with a very narrow edge, and the shadow tone a deep violet at 0.42 of the lit tone. The Thick sticker look pairs it with the Sticker border. It swaps with `celFill` and `celHueShift` in one change: `StyleKit.swap("fill", "celPoster")`.
It needs the base colour copy: on the forward renderer, and on the sky and pure black surfaces, it leaves the frame as it is.
## What it gives up in motion
As the Cel fill, with harder edges: flat areas hold still and stay on their surfaces under any camera move, and the split between the two tones follows the light, so it sweeps across a surface as the sun or a lamp moves, in small steps about once a second under a moving sun. With a very narrow edge the split is crisp, so a slow light change shows as a clean moving line rather than a fade. Poster values are cut from each area's gathered colour, so an area whose colour sits near a cut can switch value when a nearby colour edge moves across its taps.
## How it treats content
- Opaque things: one flat poster colour per area, two hard tones each.
- Transparent things (glass, water): painted as the flat surface behind, the pane's tint and reflections counted only as light, so glass and water lose their own look. Leave them out by name where they matter.
- Particles and smoke: painted as the surface behind, their brightness counted as light; smoke can flip a surface hard into its shadow tone where it crosses the split. Leave effects out by name to keep them soft.
- Sky: never touched.
- Fog: distant surfaces are painted in their own flat colours and the haze is painted out. A depth mask on the entry keeps far haze.
- Skinned characters: flattened every frame into two hard tones that follow every pose; faces read graphic and bold.
- Foliage: leaves become flat cut-outs; a far canopy with small leaves can keep speckle between the two tones.
- World text: letters a clear colour away from their card stay; small text can merge into its card's poster value. Leave labels out by name: `StyleKit.options({ exclude = { "labelName" } })`.
- Black stays black: no light stays no light and it returns through `sk_finish`, so with every light off the frame is black.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
The full-frame pass of the Toon bands style block (toonBlocks).
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# Toon bands (styleBlock, Light)
Cel shading for the whole frame with no material edits: the light on every surface cut into a chosen number of hard flat bands, with tinted shadows, clean anti-aliased band edges and cast shadows that stay shadows.
Settings: `bands` (3), `shadowLift` (0.65), `keepShade` (0), `shadowTint` (`#9e99db`), `bias` (0.05), `softness` (0.015), `topBoost` (1), `shape` (0.9), `shadeLevel` (0.3), `castBelow` (0.8), `fullLight` (1), `keepLightColour` (0.5), `smoothLight` (0.85). Low quality smooths nothing (`smoothLight` 0).
It reads the light the scene sent at each pixel as the frame divided by the surface's base colour (the deferred renderer's copy), both in display values, so texture cancels and the sun, its shadows, the ambient and every lamp are left; `fullLight` is how much of that counts as full light. `smoothLight` mixes in the mean of two rings of taps (3 and 8 reference pixels, only taps on the same surface by depth), so normal-map grain and occlusion speckle do not cut islands into the bands. `shape` then redraws the light as a clean two-level toon light from the scene's sun: full where the surface faces the sun (its normal rebuilt from depth) and the light that arrived is above `castBelow` of full light, `shadeLevel` elsewhere, never more than four times the light that arrived; with no sun in the scene it changes nothing. The result is cut into `bands` levels (edges moved by `bias`, each edge `softness` wide), the darkest band keeps `shadowLift` of the light and turns toward `shadowTint`, the top band is scaled by `topBoost`, and the surface's base colour is put back lit by `keepLightColour` of the light's own colour. The sky and pixels whose base colour is black are left as they are; on the forward renderer, which keeps no base colour copy, it judges the light by brightness alone and goes half way.
`keepShade` (0 by default, off) keeps a surface's own colour in the shadow band. The shadow band is the base colour times `shadowLift` and `shadowTint`, which on its own paints a surface at about 40 percent of its colour, however much light the scene really gave it. Under a strong sky light a wall turned from the sun shows at nearly its full colour, and that 40 percent turns orange brick walls and a red tile roof dark brown. Raise `keepShade` (0.7 was the 1.0.4 to 1.0.9 default) and the shadow band is lifted toward that share of the brightness the scene showed there, keeping its tint and hue, at most two thirds of the way to the next band and only inside the shadow band; cast shadows and dark scenes, which the scene itself left dark, stay dark, and black stays black. How far it lifts follows a steady 8 x 8 mean of the scene's light smoothly: nothing until the scene asks for a third of the way, all two thirds from two thirds on. It is not clean on a figure: the lift is read from the scene's light, which carries pixel-level noise at silhouettes and seams (texture, the coarser copies the blocks read), and wherever a figure's shade asks for less than the full lift that noise shows as specks inside the shadow band. From an editor camera 3 m from the showcase figure (1920 x 1080), 0.7 flecks the figure more than 0 does, some of it where 0 is one flat tone (the counts are in the package README, 1.1.2). That is why it is off by default: at 0 the band is exactly as cut. Use it on walls and props under a strong sky, the case it is for, and keep it off a stage whose figures are seen close. (1.0.9 lifted in crisp whole thirds; wherever a figure's shade sat near a step, that noise tipped it pixel by pixel into a comb along the figure's edges and dark flecks inside the band. Up to 1.0.8 the floor followed the scene's brightness pixel by pixel over every band and drew a soft terminator's climb over the darker lit bands.)
starterBlocks' Stepped light (`lightBands`) is the light, cheap version: one pass that steps brightness over base colour into bands, and a `bandedToon` material. Toon bands goes further: the light read in display values, smoothing against normal-map grain, a clean light from the sun's direction with cast shadows kept, tinted shadows, band bias and anti-aliased edges, the ramp, wrap, rim and highlight blocks beside it, and a material version (`ToonMaterial.paint`, the `toonLit` shader). Both are Light blocks, so they swap in one change: `StyleKit.swap("light", "lightBands")`.
## What it gives up in motion
Bands are cut again every frame from the light that arrived, so they stay on their surfaces under pan, dolly, orbit and zoom and follow moving and animated things exactly; nothing slides. When the sun or a lamp moves, a band edge sweeps across a surface instead of fading, as cel shading does. The sun's direction reaches the block about once a second (styleKit reads it on that rhythm), so under a moving sun (a day cycle) the clean light's terminator moves in small steps about once a second; lower `shape` for a fast sun. Normals are rebuilt from depth rather than taken from the mesh, so a low-polygon rounded shape shows its facets as steps in the clean light, and the terminator can flicker by a pixel along thin parts and silhouettes. On the low tier, with no smoothing, fine texture in the light (occlusion speckle) can cut small islands into the bands that crawl as the camera moves.
## How it treats content
- Opaque things: banded by the light that reached them, each keeping its own colour and texture; shadows tinted toward `shadowTint` (with `keepShade` raised, the shadow band is lifted toward that share of what the scene showed, so a shaded wall keeps its colour); cast shadows read as shade.
- Transparent things (glass, water): they keep no base colour of their own, so the pixel is read as the surface behind with the pane's tint, reflections and highlights counted as light on it. A tinted pane or deep water can drop what is behind into a lower band, and a bright reflection can step it into the top band.
- Particles and smoke: counted as light on the surface behind: sparks and glows lift it into a brighter band, smoke dims it toward the shadow band, with a hard edge where they cross a band edge. Leave effects that must stay soft out by name: `StyleKit.options({ exclude = { "Sparks" } })`.
- Sky: never touched.
- Fog: the cut is made on the fogged light. Fog lightens dark surfaces and dims bright ones with distance, so far surfaces drift toward one middle band and a shaded far wall can read as lit; fog's colour survives only as the light's colour. In heavy fog lower `shape`, or limit the block with a depth mask.
- Skinned characters: banded every frame, so bands follow every pose; a coarse body shows its facets in the clean sun light. For a character banded by its own exact normals, paint it with `ToonMaterial.paint` and keep this block off it with a group mask.
- Foliage: alpha-tested leaves have depth and base colour and are banded leaf by leaf; normals rebuilt across a mass of leaves are noisy, so a canopy breaks into scattered lit and shaded leaves rather than one shaded mass. Lower `shape` or keep foliage out with a group mask.
- World text: a label is a surface like any other and is banded: white words in shade turn toward the shadow tint. Leave labels a player must read out by name: `StyleKit.options({ exclude = { "labelName" } })`.
- Black stays black: no light stays no light (the bands only exist where light arrived) and it returns through `sk_finish`, so with every light off the frame is black.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Brush-weighted line (styleBlock, Line)
An ink line that swells and thins with its direction, like a loaded brush or a chisel nib held at one angle.
Edges running across the brush's angle (35 degrees) are broad and edges along it are thin, as a real brush or nib draws, so round things get a thick-and-thin stroke.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonBrushLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonBrushLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# White chalk line (styleBlock, Line)
A white chalk line for dark scenes and night levels: soft-edged, slightly weighted, light on dark.
An off-white line (#f2efe6) that reads against dark backdrops; it is still lit like the scene, so with every light off it goes black with the rest of the frame.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonChalkLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonChalkLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Character-only line (styleBlock, Line)
An ink line on characters (skinned models) only, so heroes and creatures stand out from an unlined world.
Only skinned characters get a line, drawn as an inverted hull that follows every pose and also draws the lines inside the body (an arm in front of the chest). Props and level geometry get none.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonCharacterLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonCharacterLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Coloured ink line (styleBlock, Line)
A line in a dark shade of each object's own colour, taken from what is drawn at its edge, for soft coloured line work.
The line's colour is read on the GPU from the object at its silhouette, darkened by half, so a red roof gets a dark red line and a texture's colours carry into the line; a recolour or a new material shows in the line the same frame.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonColourLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonColourLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Bold comic line (styleBlock, Line)
A bold comic-book ink line: heavy up close, thinning into the distance, with a little brush weight.
Heavy in the foreground and thinner past 25 metres (never below 1.5 pixels), so a crowded distance does not fill in with black, with a slight swell on edges facing the brush's angle.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonComicLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonComicLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Thinning outline (styleBlock, Line)
An outline that thins with distance: heavy up close, fine far away, so a busy distance does not fill with lines.
3.5 pixels up to 6 metres, thinning to 0.7 pixels by 60 metres (`fadeStart`, `fadeEnd`, `minWidth`).
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonFarLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonFarLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
The full-frame pass of the Toon highlight style block (toonBlocks).
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# Toon highlight (styleBlock, Light)
A stylized hard highlight: a cut-out glint of sunlight on the round parts and bevelled edges of lit things, on the side that faces the viewer; none on the middle of flat faces, in cast shadow or on the side turned from the sun. For cartoon shine and anime highlights.
Settings: `size` (0.55), `fromView` (0.5), `bendFrom` (0.0015), `softness` (0.03), `strength` (0.85), `colour` (`#fffff7`), `tintByColour` (0.15), `curvedOnly` (1), `curveReach` (5), `litAbove` (0.65), `fullLight` (1), `keepLightColour` (0.5).
It is a chain block at rank 60: it builds on what the light blocks before it made and lands after a rim light (rank 50). It needs a sun: with no directional light in the scene it draws nothing.
Where the glint goes:
- **Where the shape bends.** Depth is read across opposite pairs of taps `curveReach` pixels and three times that far from the pixel, on the same object. The reciprocal of depth runs exactly straight across any flat surface on screen, at any angle and distance, so only a real bend registers (the threshold is `bendFrom`): round parts, and the edges of boxes, steps and rims. The middle of a flat face never lights up whole, and fine grain (tiles, grout, planks, the noise in far depth) does not count as shape, which keeps glints from twinkling as the camera moves.
- **Which way it faces.** The normals rebuilt from depth on the same object are averaged over the same two rings, so fine detail cancels and a form's own turn is left: on a box's edge the average leans between the two faces (a bevel), on a limb it follows the round. A glint shows where that averaged normal faces the highlight's own light: the sun pulled toward the camera by `fromView`. At 0 it is the physical mirror point, which under a low or back sun lies on few surfaces the camera can see (a stage lit from behind gets almost nothing); at the default 0.5 it sits on the lit side of a form, facing the viewer, the way a drawn highlight does.
- **Whether the sun reaches it.** The surface (or its bevel) has to turn toward the sun, and the light that arrived must not be far below what an open surface at that angle gets (`litAbove`), which keeps glints out of cast shadow while a low sun's glancing light still carries one.
The glint replaces the colour by `strength` with `colour` (taking `tintByColour` of the surface's colour and `keepLightColour` of the light's), never darker than what was there.
On the Toon recipe stage at the defaults it draws white glints along the stage's front edge, the stone basin's rim, the crates and the television and on the character's lit side, alone and on top of `toonBands`. Before 1.0.3 it placed the glint at the exact mirror point and judged roundness from shading, so on that stage (sun low and behind) it drew almost nothing.
## What it gives up in motion
A glint slides over a round surface and along an edge as the camera or the sun moves, as a real one does; it is found again every frame, so it stays on its object and follows moving and animated things. The sun's direction reaches the block about once a second, so under a moving sun the glint moves in small steps. An edge's glint is `curveReach` pixels wide in the picture at any distance, so far edges carry a glint as wide as near ones; lower `curveReach` for finer edge glints.
## How it treats content
- Opaque things: round parts and edges that face the sun get a hard glint on their viewer-facing side; the middle of flat floors, walls and panels, and things in shadow, get none.
- Transparent things (glass, water): they write no depth, so glass and water get no highlight of their own from this block (their own material's reflections stay as they are), and rounded things behind a pane can show their highlight through it.
- Particles and smoke: no depth, so no highlight of their own; bright smoke over a sunlit rounded thing can lift it past `litAbove` and widen where the blob shows.
- Sky: never touched.
- Fog: the glint is laid after fog at full brightness, so far rounded things in thick fog can still catch a bright highlight; fog that dims the light below `litAbove` turns it off. A depth mask keeps it to the near ground.
- Skinned characters: heads, shoulders and limbs catch the glint on their lit, viewer-facing side, and it moves over them with every pose.
- Foliage: grass blades and leaves are real bent shape, so a sunlit patch of foliage catches many small glints that move with it; keep foliage out with a group mask if that is too busy.
- World text: flat labels get none.
- Black stays black: it draws only where the sun reaches a lit surface and returns through `sk_finish`, so with every light off the frame is black.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
The pass shared by toonBlocks' five outline blocks (Toon outline, Sticker border, Black sticker border, Tinted outline, Thinning outline). It leaves the frame unchanged; the line itself is an inverted hull drawn by the ToonOutlines runtime from the entry's settings.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# Toon outline (styleBlock, Line)
A thin dark ink line round every object, the classic cel-shaded outline.
The default line: 2.5 reference pixels of near-black ink (#0f0d14), even everywhere.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonOutline")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonOutline" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Fine pen line (styleBlock, Line)
A fine, even pen line round every object, the clean technical line of a ligne-claire comic or an architect's sketch.
A thin, even line of one width everywhere, with no brush weight and a crisp edge. Pick it for clean, readable line work that never crowds small props.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonPenLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonPenLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Soft grey pencil line (styleBlock, Line)
A soft grey pencil line, lighter and softer-edged than ink.
Graphite grey (#4a4a52) at three-quarter strength with a soft edge, for a sketchbook or storybook feel over cel light.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonPencilLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonPencilLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Heavy poster contour (styleBlock, Line)
A heavy poster contour: a thick black outline that holds its weight far into the distance.
A thick graphic contour that keeps at least 3 pixels at any distance, for posters, title screens and bold graphic looks.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonPosterLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonPosterLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
The full-frame pass of the Toon ramp style block (toonBlocks).
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# Toon ramp (styleBlock, Light)
Ramp shading for the whole frame: the light on every surface picks its colour from a five-stop colour ramp, from deep shadow to full light, blended or stepped like cel paint, and the whole ramp switches with one call.
Settings: `rampDark` (`#1a1733`), `rampShadow` (`#615c99`), `rampMid` (`#c7b3bd`), `rampLight` (`#fff2db`), `rampHigh` (`#fffff5`), `shadowAt` (0.25), `midAt` (0.5), `lightAt` (0.78), `hard` (0.75), `softness` (0.02), `rampStrength` (1), `shape` (0.9), `shadeLevel` (0.3), `castBelow` (0.8), `fullLight` (1), `keepLightColour` (0.5), `smoothLight` (0.85). Low quality smooths the light with four taps per ring instead of eight.
It reads and cleans the light as Toon bands does: the frame divided by the surface's base colour in display values (a share of `fullLight`), smoothed over the same surface, and redrawn by `shape` as a clean two-level light from the scene's sun (full where the surface faces the sun and the light that arrived is above `castBelow`, `shadeLevel` elsewhere). While `shape` redraws it, the ramp reads that light fully smoothed (the dense 8 x 8 mean; `smoothLight` matters only with `shape` 0), holds the shadow colour up to where Toon bands' first band edge lies at its defaults (0.38 of the way from shade to full sun) and spreads the stops above over the rest, and on the high tier takes, for each pixel, the lower of the middle of its row of three and the middle of its column of three, so a hairline seam between two parts of a figure, or one pixel, does not take the next colour alone. That light, 0 to 1, then picks a colour from the ramp: `rampDark` at 0, `rampShadow` at `shadowAt`, `rampMid` at `midAt`, `rampLight` at `lightAt`, `rampHigh` at 1. `hard` 0 blends through the stops, 1 steps from one to the next halfway between them, each step `softness` wide. The ramp's colours are light, not paint: they multiply the surface's own colour, so every object keeps its colour and the ramp says what colour its light and shadow are. `rampStrength` below 1 keeps the ramp's brightness and lets go of its colour.
The package ships thirteen ramps (`ToonBlocks.ramps()` lists them): `classicCel`, `warmCool`, `goldenHour`, `sunset`, `moonlight`, `pastelAnime`, `storybook`, `candy`, `autumn`, `noir`, `comicTwoTone`, `plasticCG` and `toxicSciFi`. `ToonBlocks.setRamp("sunset")` puts one on every toonRamp entry in the scene's stack (one synced change each, so every player sees it) and on every object painted with `ToonMaterial.paint`; `ToonBlocks.currentRamp()` names the ramp the first entry wears. A ramp of your own is a `<name>.toonRamp` folder (see the toonRamp asset type). From Toon bands: `StyleKit.swap("light", "toonRamp")`, then `ToonBlocks.setRamp(id)`.
## What it gives up in motion
The ramp is picked again every frame from the light that arrived, so colours stay on their surfaces under any camera move and follow moving and animated things; nothing slides. A moving sun or lamp moves the colour steps across surfaces, sweeping rather than fading when `hard` is high. The sun's direction reaches the block about once a second, so under a moving sun the clean light's terminator moves in small steps; lower `shape` for a fast sun. Normals are rebuilt from depth, so low-polygon rounded shapes show their facets as steps, and the terminator can flicker by a pixel on thin parts and silhouettes. Switching the ramp is instant, for every player at once.
## How it treats content
- Opaque things: shaded through the ramp by the light that reached them, each keeping its own colour and texture under the ramp's light colours.
- Transparent things (glass, water): read as the surface behind with the pane's tint and reflections counted as light, so glass or water can shift what is behind to a darker or brighter ramp colour.
- Particles and smoke: counted as light on the surface behind: a glow lifts it up the ramp, smoke pulls it down toward the shadow colours. Leave effects that must keep their own colour out by name with `StyleKit.options({ exclude = { ... } })`.
- Sky: never touched.
- Fog: the ramp is picked from the fogged light, so far surfaces drift toward the ramp's middle colours and fog's own colour survives only as light colour. In heavy fog lower `shape`, or limit the block with a depth mask.
- Skinned characters: shaded every frame, so the ramp follows every pose; a coarse body shows its facets. `ToonMaterial.paint(heroId, { ramp = "sunset" })` puts a character on the same ramp inside its own material, with its exact normals; keep this block off it with a group mask.
- Foliage: each alpha-tested leaf is shaded on its own; normals rebuilt across a mass of leaves are noisy, so a canopy breaks into scattered ramp colours. Lower `shape` or keep foliage out with a group mask.
- World text: a label is shaded like any surface and takes the ramp's colours: white words in shade turn the shadow colour. Leave labels out by name: `StyleKit.options({ exclude = { "labelName" } })`.
- Black stays black: no light stays no light (the ramp only colours light that arrived) and it returns through `sk_finish`, so with every light off the frame is black whatever `rampDark` is.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
The full-frame pass of the Rim light style block (toonBlocks).
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# Rim light (styleBlock, Light)
A hard toon rim light along the outer edges of things, found where depth drops away behind a surface, so it hugs characters, props and roof lines and never washes a flat floor.
Settings: `width` (4), `strength` (0.7), `colour` (`#fff5e0`), `side` (0), `fresnel` (0.5), `followLight` (0.5), `tintByColour` (0.3), `fullLight` (1), `keepLightColour` (0.5). Low quality looks for the edge with four taps instead of eight.
It is a chain block at rank 50: it builds on what the light block before it made (Toon bands, Toon ramp, Soft wrap light), so add it after one and it lands after it. A pixel is on an outer edge when a tap `width` reference pixels away lies clearly farther (by about 4% of the distance plus 5 cm) or on the sky. `fresnel` also asks the surface to turn away from the camera (its normal rebuilt from depth); `side` -1 rims only the side turned from the sun (a back light), +1 only the side facing it. The rim is light added on top: `colour`, taking `tintByColour` of the surface's own colour, at `strength`, and by `followLight` as bright as the light on the surface (0 the same rim in sun and shade, 1 bright in sun and faint in shade). `keepLightColour` is declared for the family but this pass does not use it: the rim's colour is `colour` alone.
## What it gives up in motion
The rim is found again every frame from depth, so it sits on silhouettes and moves with them under any camera move, on moving and animated things too; it keeps its width in the picture at any distance. Thin parts (railings, wires, far branches) can flicker as their depth edge comes and goes at a pixel's width. With `side` set, which side is rimmed follows the sun's direction, which reaches the block about once a second, so under a moving sun the rimmed side changes in small steps.
## How it treats content
- Opaque things: rimmed on outer edges, including where a near part stands clearly in front of a farther one (an arm over a distant wall). A part only slightly in front (an arm against its own body) gets none. The far edge of a ground plane against the sky counts as an edge and gets a thin rim on the horizon; limit the block with a depth mask if that shows.
- Transparent things (glass, water): they write no depth, so a pane or a water surface gets no rim of its own, and the rims of things behind are drawn through it, over the glass's colour.
- Particles and smoke: no depth, so no rim of their own; rims of things behind thin smoke are drawn over the smoke.
- Sky: never rimmed, but things against the sky are rimmed on that side, since the sky counts as farther than anything.
- Fog: the rim is light added after fog, so a far silhouette in thick fog still gets a clear rim; lower `followLight` makes it fainter where the fogged light is low, a depth mask keeps it to the near ground.
- Skinned characters: rimmed every frame, so the rim follows every pose and every silhouette of the body.
- Foliage: every leaf edge against something clearly farther is rimmed, so a canopy against the sky can sparkle. Lower `strength`, narrow `width`, or keep foliage out with a group mask.
- World text: flat words on a sign have no depth step and get no rim; the sign's outer edge does. Free-standing letters can be rimmed on their outer edges. Leave labels out by name: `StyleKit.options({ exclude = { "labelName" } })`.
- Black stays black: the rim only adds light where light arrived (it is scaled by the light's presence) and it returns through `sk_finish`, so with every light off the frame is black.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Sticker border (styleBlock, Line)
A thick white border with a dark outer edge round every object, like a die-cut sticker.
Two lines in one: a 6 pixel white line and a 1.5 pixel dark line beyond it (`outerWidth`, `outerColour`), never thinner than 2 pixels.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonSticker")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonSticker" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Black sticker border (styleBlock, Line)
A thick black border with a dark outer edge round every object.
The Sticker border in black: a heavy dark line with an outer edge of its own.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonStickerBlack")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonStickerBlack" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Tinted outline (styleBlock, Line)
An outline tinted from each object's own colour (a darker shade of it) instead of black, the soft coloured line work of anime backgrounds and clear-line comics.
A 1.6 pixel line whose colour is read on the GPU from the object at its silhouette and darkened by half (`tint` 1, `tintDarken` 0.5): a red roof gets a dark red line, and a texture's colours carry into the line. The Soft anime look uses it.
Every toonBlocks line block draws the same toon ink line on the engine's own outline effect and shares the same settings (`width`, `units`, `colour`, `tint`, `tintDarken`, `outerWidth`, `outerColour`, `fadeStart`, `fadeEnd`, `minWidth`, `smoothing`, `skipOwnInk`, `lowDistance`, `targets`, `brush`, `brushAngle`, `softness`, `opacity`), so switching ink is one name: `StyleKit.swap("line", "toonTintLine")`. Per-object ink (`ToonBlocks.setObjectOutline`, including `{ style = "toonTintLine" }` for one object), per-material rules (`ToonBlocks.setMaterialOutline`), group, sphere and depth masks and the stack's exclude list all work with it. See the guides "Tuning toon outlines and light for games" and "How to keep a toon look fast in a big game".
## What it gives up in motion
The line is found every frame from the frame's own depth (characters: from a hull on their own skeleton), so it never slides, swims or boils as things move or the camera turns, and holds its width in the picture at any distance (or thins as `fadeStart`, `fadeEnd` and `units` say). A thing that appears is drawn round on the frame it appears and loses its line the frame it goes. It is antialiased at full resolution, so a slow camera does not make it crawl. A depth mask and the low tier's `lowDistance` cut the line per pixel at their distance, so a line ends where the distance is crossed rather than switching a whole object at once.
## How it treats content
- Opaque things: a line outside each silhouette, over what stands behind, and round a part standing in front of another (any step in depth of 6 cm, or 3 percent of the distance, whichever is more). Hard-edged and multi-part models close into one line at every corner. A wall or floor in front hides the line exactly where it hides the object.
- Transparent things (glass, water): no line of their own, and they do not cut lines seen through them.
- Particles and smoke: no line; smoke in front covers the line as it covers the object.
- Sky: never outlined; an object against the sky gets its line over the sky.
- Fog: the line is not fogged by itself; thin far lines with `fadeStart` and `fadeEnd` or cut them with a depth mask in a foggy distance.
- Skinned characters: an inverted hull on the character's own skeleton, so the line follows every pose and also draws the lines inside the body (an arm in front of the chest).
- Foliage: cut-out leaf cards that write depth get a line of their shape, see-through leaves get none; switch leaf materials off per material.
- World text: text gets no line; a sign's card does.
- Black stays black: when nothing in the scene gives light the line is drawn black, whatever its colour.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
The full-frame pass of the Soft wrap light style block (toonBlocks).
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# Soft wrap light (styleBlock, Light)
Soft wrap-around light (half-Lambert) for the whole frame: the light wraps round the side turned from the sun so shapes stay readable in shadow, the darks lifted softly instead of cut, for a soft anime or storybook look.
Settings: `wrap` (0.8), `wrapPower` (2), `shadowShape` (0.6), `litAbove` (0.75), `bands` (0), `softness` (0.08), `shadowLift` (0.35), `shadowTint` (`#bfb8eb`), `fullLight` (1), `keepLightColour` (0.5), `smoothLight` (0.85). Low quality smooths the light with four taps per ring instead of eight.
It reads the light like the other toonBlocks light blocks (the frame divided by the base colour in display values, a share of `fullLight`, smoothed by `smoothLight` over two rings of taps on the same surface), then lifts the darks toward the light by `wrap` (0 the light as rendered, 1 the half-Lambert lift). Where a surface is below `litAbove` of full light (turned from the sun, or in cast shadow) the sun's half-Lambert term, `wrapPower` its curve, shapes it by `shadowShape`, from the sun's direction and the normal rebuilt from depth, so a sphere in shade still reads round. `bands` 2 or more cuts the wrapped light into that many soft bands (`softness`, `shadowLift`); 0 keeps a smooth gradient. The light turns toward `shadowTint` as it fades. It does not redraw a clean two-level sun light as Toon bands and Toon ramp do: the light keeps the scene's own shadows and gradients, only softened.
## What it gives up in motion
Smooth and calm. The light is read again every frame, so nothing slides under any camera move and the shading follows moving and animated things. The wrap follows the sun, so a moving sun moves the soft terminator; the sun's direction reaches the block about once a second, so under a moving sun the shaping in shade shifts in small soft steps, which the smooth gradient hides well. With `bands` set, band edges sweep across surfaces as the light moves, like Toon bands but softer. Normals rebuilt from depth can show facets of low-polygon shapes in the shaped shade.
## How it treats content
- Opaque things: lit softly with readable form in shade, each keeping its own colour and texture.
- Transparent things (glass, water): read as the surface behind with the pane's tint and reflections counted as light, so glass and water brighten or dim what is behind softly.
- Particles and smoke: counted as light on the surface behind: glows brighten it, smoke dims it, with no hard edge unless `bands` is set.
- Sky: never touched.
- Fog: the wrap lifts the fogged light, so far surfaces lift a little more toward one soft value; fog's colour survives only as light colour. A depth mask keeps the block to the near ground if the haze flattens.
- Skinned characters: wrapped every frame, so the soft light follows every pose; shading in shade comes from normals rebuilt from depth, smooth on finely made bodies, faceted on coarse ones. The `toonLit` material's wrap mode (`ToonMaterial.paint(heroId, { mode = "wrap" })`) gives a character the same light from its exact normals.
- Foliage: each leaf is softened on its own; the noisy normals across a canopy show less here than with hard bands, since nothing is cut.
- World text: a label is lit like any surface; dark words in shade are lifted a little. Leave labels out by name: `StyleKit.options({ exclude = { "labelName" } })`.
- Black stays black: no light stays no light (the wrap only lifts light that arrived) and it returns through `sk_finish`, so with every light off the frame is black.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
·toonblocksstartup · born here
❒asset # ink (toonBlocksStartup)
Starts toonBlocks' toon ink line on every machine that loads a world with the package installed, so a look with a toon line block draws its line, and the lines of objects with a game role, for every player, late joiners included. Keep it in the package.
## Known limits
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Clear line (whole look)
The clear-line comic style: flat even colour with almost no shading, one light shadow tone, a uniform thin black line of the same weight everywhere. Blocks: `celFill` (light two-tone), `toonOutline` (1.4 px, no thinning).
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Comic ink cel (whole look)
Classic cel-shaded game: three hard light bands with cool tinted shadows, a thin warm rim on silhouettes, hard highlights on rounded things, flat cel colour and an even dark ink outline. Blocks: `toonBands`, `toonRim`, `toonHighlight`, `celFill`, `toonOutline`.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Nineties CG (whole look)
Late-nineties TV computer animation: smooth, slightly banded plastic shading through a saturated ramp, hard white specular blobs, no outlines. Blocks: `toonRamp` (plasticCG ramp), `toonHighlight`.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Pencil anime (whole look)
Soft anime ramp light drawn over with soft pencil lines instead of ink: the pastel ramp and hue-shifted flat colour of Soft anime, with styleKit's own `sketchLine` in place of the outline. Blocks: `toonRamp`, `celHueShift`, `sketchLine`.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Saturday-morning cartoon (whole look)
Bright TV-cartoon cel shading: saturated flat colours, one hard shadow band in a soft violet, a thick black outline round everything. Blocks: `toonBands` (2 bands), `celFill`, `toonOutline` (3.5 px). Apply with `StyleKit.applyLook("saturdayMorning")`.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Soft anime (whole look)
Soft anime background-art shading: a pastel colour ramp with lavender shadows, a soft rim from behind, hue-shifted flat colour and thin lines tinted from each object's own colour. Blocks: `toonRamp` (pastelAnime ramp), `toonRim`, `celHueShift`, `toonTintLine`. Apply with `StyleKit.applyLook("softAnime")`; for pencil lines instead of tinted ones, `StyleKit.swap("line", "sketchLine")`, or apply Pencil anime.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Thick sticker (whole look)
A die-cut vinyl sticker world: bold two-tone poster colours and a thick white border with a thin dark edge round every object. Blocks: `celPoster`, `toonSticker`.
## Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.
# Autumn (toon ramp)
Russet and amber light with warm brown shadows.
Woodland and harvest levels: lights turn amber, shadows russet brown.
Pick it with `ToonBlocks.setRamp("autumn")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "autumn" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Candy (toon ramp)
Pink and mint candy light: bubblegum shadows, sugary bright lights.
Every shadow turns bubblegum pink; for cute, toy-like worlds.
Pick it with `ToonBlocks.setRamp("candy")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "candy" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Classic cel (toon ramp)
Neutral cel light: clean white light, cool blue-grey shadow, three clear steps.
The everyday ramp: surfaces keep their own colours, shadows cool slightly toward blue-grey. A safe start for any cel-shaded game.
Pick it with `ToonBlocks.setRamp("classicCel")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "classicCel" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Hard comic two-tone (toon ramp)
Two flat tones only: full light and one hard, deep shadow, like printed comics.
Everything is either lit or in shadow, cut hard, with a narrow darker-grey step between them; pair it with a thick outline.
Pick it with `ToonBlocks.setRamp("comicTwoTone")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "comicTwoTone" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Golden hour (toon ramp)
Deep honey light with long warm shadows of rust and plum.
A late-afternoon glow, warmer and richer than warm-to-cool.
Pick it with `ToonBlocks.setRamp("goldenHour")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "goldenHour" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Moonlight (toon ramp)
Silver-blue moonlit light with deep navy shadows.
Night without losing the toon look: lit faces read silver-blue, shadows navy.
Pick it with `ToonBlocks.setRamp("moonlight")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "moonlight" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Noir (toon ramp)
High-contrast black and white light: inky shadows, a narrow grey step, hard white light.
Pulls colour out of the light and drops shadows to near black; with the Two-tone poster fill or a grey grade a whole level turns noir.
Pick it with `ToonBlocks.setRamp("noir")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "noir" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Soft pastel anime (toon ramp)
Soft creamy light with lavender shadows and a gentle step, the look of pastel anime backgrounds.
Shadows stay light and lavender, so nothing goes dark; pair it with the Hue-shift cel fill and a tinted outline, as the Soft anime look does, or lower rampStrength for less lavender.
Pick it with `ToonBlocks.setRamp("pastelAnime")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "pastelAnime" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Nineties plastic (toon ramp)
Saturated, slightly banded plastic light with a bright hot top, like early computer-animated TV.
Smooth gradients with a faint banding and a strong top end; pair it with a hard toon highlight.
Pick it with `ToonBlocks.setRamp("plasticCG")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "plasticCG" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Muted storybook (toon ramp)
Muted, dusty light with soft olive and plum shadows, like a printed picture book.
Quiet, slightly desaturated colours with warm paper-like lights; lovely on paperBlocks papers.
Pick it with `ToonBlocks.setRamp("storybook")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "storybook" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Sunset (toon ramp)
Orange evening light falling into rose and deep violet shadow.
For evening levels and endings: every surface glows orange where it is lit and sinks into rose and violet.
Pick it with `ToonBlocks.setRamp("sunset")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "sunset" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Toxic sci-fi (toon ramp)
Acid green light with deep teal and ink-blue shadow, for alien and lab levels.
A sickly green glow on everything lit, teal and ink-blue shadows; strong, so lower rampStrength to keep materials readable.
Pick it with `ToonBlocks.setRamp("toxicSciFi")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "toxicSciFi" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# Warm to cool (toon ramp)
Warm golden light turning into cool blue shadow, the painter's classic temperature split.
Lights lean gold, shadows lean blue: the split that makes a daylight scene feel sunny without changing any material.
Pick it with `ToonBlocks.setRamp("warmCool")`: every toonRamp entry in the stack and every object painted with `ToonMaterial.paint` takes it (painted materials switch to ramp mode), for every player. Materials made with `ToonMaterial.fromMaterials` keep the ramp they were written with: pass `{ ramp = "warmCool" }` when you make them.
## Known limits
- It shows only through the blocks that read it, which run after antialiasing, so offscreen captures do not show it (#17427).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# toonFrame (shader module)
What a full-frame toonBlocks block reads at a pixel: `tf_read` returns the frame, its base colour, the light the scene sent as a share of full light (the frame divided by the base colour, so surface texture cancels) and the light's own colour; `tf_normal_at` the surface's shading normal at one pixel (the deferred renderer's copy, else rebuilt from world positions four pixels apart); `tf_normal` that normal averaged over a dense 8 x 8 pixel square on the same surface (4 x 4 on the low tier), so a round object, a low-polygon one included, turns smoothly and the light cut from it has clean band edges; `tf_smoothed_light` the light averaged over the same kind of dense square; `tf_shaped_light` the clean light from the scene's sun (`shape`, `shadeLevel`, `castBelow`), climbing from `shadeLevel` to full as a surface turns toward the sun, with open ground in sun three quarters of the way up; `tf_shaped_span` the two values that light takes in shade and in full sun, which a banding block cuts its bands across; `tf_sun_seen` whether the sun reaches the pixel. Pixels with no known base colour, the sky and the hull outlines' ink are marked unknown and left alone, and every gather leaves them out. Include after styleKit's `skCommon` and `~toonBlocks.shaders.toonLight`.
Every average here reads every pixel of its square once (bilinear taps on the corners between pixels). A few scattered taps would not do: on a mosaic of small facets or on textured ground each tap crosses an edge at a different pixel, so their mean steps from pixel to pixel, and a band, a cast shadow or a poster level cut from it comes out stippled.
## Known limits
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks' inverted-hull outline material: a shell of each object pushed out past its silhouette in screen or world units, flat ink or the object's own colour, drawn by the outline runtime.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: clears the ink mask the toon ink rims are composited into, once a frame, so styleKit reads only this frame's ink.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: finds where the toon ink line starts, from the scene's own depth. A pixel is an edge when the surface beside it stands a real step farther away (an object against the sky, a prop in front of a wall, an arm in front of a body); a slope seen at a grazing angle is not a step. It marks the near side only, so the line grown from it by the engine's jump flood lies outside the near object's silhouette, over what stands behind. It needs no list of objects: new things get their line the frame they appear, removed things lose it the frame they go, and a wall or floor in front of an object leaves no edge to draw. Objects in the veto mask (characters with their own hull, objects switched off or with a line of their own) start no line here. Driven by `ToonOutlines`; nothing to set up.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: one step of the shared jump flood over the region map, carrying which line each found edge belongs to and skipping edges of the pixel's own region.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: the composite pass of the toon ink line. It is the engine's jump-flood outline composite with a toon line's needs added per pixel from the silhouette's own depth: width thinning with distance or a real thickness in centimetres, a brush weight that follows the edge's direction, a soft edge and an opacity, and black ink in a scene with no light. Depth-correct (a wall or floor in front hides the line), antialiased at full resolution, and it writes the line into the scene colour and into the ink mask styleKit reads as drawn ink. Driven by ToonOutlines; nothing to set up.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: the composite of every per-object ink line at once. Each pixel draws the line of the region its nearest edge belongs to, with that line's colour, width, outer width and tint from a twelve-entry palette, and the shared line style (units, thinning, brush, softness, opacity, distance cut).
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: gathers the masks of up to twelve per-object ink lines into one region map (which line covers each pixel), so every line shares one jump flood and one composite instead of a pass chain each.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: copies the lit scene before the toon ink line is drawn, so a line tinted from the object's own colour reads that colour at its silhouette on the GPU, whatever material the object wears now. Driven by `ToonOutlines`; nothing to set up.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks internal: the first step of the shared jump flood over the region map: each pixel finds the nearest pixel of another line's region, so touching objects of different lines still get a line between them.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# toonLight (shader module)
The toon light model every toonBlocks light block and the `toonLit` material share: `tl_band_level` and `tl_band_light` (hard light bands, any count), `tl_ramp` (five-stop colour ramp, blended or stepped), `tl_wrap` (half-Lambert wrap-around light), `tl_rim` (rim light on either side), `tl_highlight` (a hard-edged stylized highlight), `tl_presence` (zero light stays zero), `tl_hue_rotate` and `tl_saturate`. Pure math with no bindings, so a full-frame block and a material shade by exactly the same rules. Include it with `#include "~toonBlocks.shaders.toonLight"`.
## Known limits
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
toonBlocks' toon light inside a material: hard bands, a colour ramp or soft half-Lambert wrap, with a rim light and a stylized highlight, lit by the scene's sun, shadows, ambient and lamps. Written onto chosen objects by ToonMaterial.paint and onto whole material sets by ToonMaterial.fromMaterials.
## Known limits
- A post-process shader has no surface preview image.
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.
# toonBlocks test suite
Checks every toonBlocks block against styleKit's block rules (the three fills and the five outlines each share one set of named settings, defaults inside their ranges); that at least ten toon ramps are listed and `ToonBlocks.setRamp` switches them in one change; that every whole look applies in one change, needs only toonBlocks and styleKit, and lets a part swap after; that an outline swaps with styleKit's depth line and back in one change, its shells appearing and going with it and nothing held once the stack is cleared; that per-object (`setObjectOutline`) and per-material (`setMaterialOutline`) outlines take and come off; that `ToonMaterial.paint` and `unpaint` put toon light inside a material and take it off leaving the frame and the files as they were. On the presented frame, over a small lit set of its own: every block changes the picture and taking it off returns the frame exactly. With every light off the frame stays black under every block and look (measured at the Lookbook's every-light-off moment, so it needs lookbookKit's modules, and stands down as skipped where they are not installed). The per-object outline check also addresses the test ball by its name, as the guides do (1.0.6 refused a live entity's name). The every-light-off check discards the edits its run leaves in the Lookbook scene's autosave once the previous scene is back (the whole overlay when there was none before, else only the new edits), so a world that installed toonBlocks keeps its Lookbook exactly as it came. The band-count check passes under a fresh world's default light (a strong sun, faint ambient), where 1.0.8 found 4 tones at 5 bands. Two checks catch the faults 1.0.5 fixed, on the suite's own ball under a light the check sets (the scene's sun turned to shine from the side, other directional lights off for the moment and every light put back after, the ball seen from 22 m): every light block, fill and whole look draws the ball in clean flat bands, with at most 1 percent of it flecked (a fleck is a pixel that 6 of its 8 neighbours differ from by more than 6 code values, all one way, which a band edge never is; 1.0.4's `toonBands` flecked 5.3 percent and `celPoster` 15.4); and the band count is a dial anyone can see, with 2 against 5 bands changing more than 5 percent of the frame and 25 percent of the ball, 3 against 4 more than 5 percent of the ball, and the ball showing at least n flat tones at n bands for 2 to 5 (1.0.4, whose clean light had two levels, showed 2, 3, 3 and 4). A figure check (1.1.0) looks at the engine's humanoid figure as the showcase stage shows it (about a fifth of the frame tall, the sun behind it, the side the camera sees in the shadow band) under `toonBands`, `toonRamp` and Comic ink cel at their defaults, before a red backdrop that casts no shadow (so the white figure stands out even under a fresh world's bright default light), with a front fill light swept from off to strong so the shade passes through the whole range where a `keepShade` lift would change: no fleck inside a band (where the same stack with `keepShade` 0 is flat), and no more flecks on the figure than with `keepShade` 0 (`toonRamp`: no more than `toonBands` with `keepShade` 0). It turns the debug drawing off while it looks and puts it back. 1.0.9, whose default lift tipped between thirds pixel by pixel, failed it with up to 98 flecks inside a band. The ball's stipple check covers `keepShade` 0.7, now that 0 is the default. A close-up figure check (1.1.2; with the 3D view set to 1920 x 1080 while it runs since 1.1.3) looks at the same figure half the frame tall, as an editor camera a few metres off shows it, where the outline's inner lines are drawn: the outline alone adds no more than 0.1 percent of the figure in specks, `toonRamp` has at most 1 lone speck (a speck in flat paint), and Comic ink cel no more than `toonBands` with `keepShade` 0 has or 2, whichever is more (since 1.1.3; `toonBands`' own lone count moves between 0 and 3 from run to run). The whole counts, and Comic ink cel's specks away from its line (its rim and glint edges), are reported, not judged: `toonBands`' own count moves between runs by more than a fixed margin over it (since 1.1.3). 1.1.1 failed it (the outline alone 0.17 percent, Comic ink cel 18 lone specks, `toonRamp` 4), and 1.1.2 failed it in a brand new world (`toonRamp` 3 lone specks).
## Known limits
- Frame tests read the presented frame, so a run needs a drawn view, and a busy machine moves the timing checks (#24548).
- A two-client editor sometimes refuses to load two different scenes at once (#24666, #24667).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.
# toonBlocksStartup (asset type)
The asset type that starts toonBlocks' toon ink line on every machine. An asset of it holds a `README.md` and a `.metadata` and nothing else. When it registers (when a world loads, when the package is installed, when it arrives from another player), the type's `onRegister` hook loads `ToonBlocks`, which starts the toon ink runtime. From then on a look with a toon line block in its stack (Comic ink cel and every other toon look) draws its line, and the lines of objects with a game role, on every player's screen, players who join late included, with no setup code in the world. While no toon line block is on, the runtime does nothing.
Without it the line only drew on machines where some other code happened to load `ToonBlocks` first: in a world that had installed toonBlocks and nothing else, the toon look came up with its bands and fills but no line at all.
The package ships the one asset it needs, `ink.toonBlocksStartup`. A world never makes its own.
## Known limits
- An asset of this type registers when the engine indexes its files, a moment after they are written.
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
·renderfeature · born here
❒asset # toonInk (render feature)
Draws toonBlocks' toon ink outline for every plain (non-skinned) object as a screen-space rim, on the engine's own jump-flood outline shaders (`@builtin::shaders.outline_mask`, `@builtin::renderFeatures.shaders.outline_jfa_seed`, `_flood`, `_composite`): one mask, seed, flood and composite chain per (colour, width) group, composited into the scene colour at `afterLighting` and, in the same pass, into an ink mask that styleKit's surface copy reads as drawn ink, so the light and fill blocks leave the line as drawn. Depth tested against the silhouette, so a line hides behind whatever stands in front of its object; antialiased and a steady pixel width, so it does not crawl when the camera moves. Started and stopped by `ToonOutlines`; nothing to set up.
## Known limits
- Its passes are queued again every frame, even when nothing changed (#24548).
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- The camera gives no near and far planes, so depth terms are read from the view-projection matrix (#24514).
The package README's Known limits lists the rest.
# toonRamp (asset type)
A toon colour ramp: the five colours light runs through on a cel-shaded surface, from deepest shadow to full light. Every toonBlocks block that shades through a ramp (the `toonRamp` light block and the `toonLit` material) takes its colours from the ramp picked with `ToonBlocks.setRamp(id)`, so one change re-colours a whole toon look for every player.
A ramp is a folder `<id>.toonRamp/` holding:
- `ramp.yaml`:
```yaml
name: "Sunset"
summary: "Warm orange light falling into rose and deep violet shadow."
tags: [warm, evening, sunset]
dark: "#2a1438" # deepest shadow (a light colour the surface is multiplied by)
shadow: "#7a3f74" # shadow
mid: "#e07a62" # where light turns into shadow
light: "#ffc58a" # lit
high: "#fff1d6" # full light
shadowAt: 0.25 # where the shadow colour sits, 0 no light to 1 full light
midAt: 0.5
lightAt: 0.78
hard: 0.8 # 0 smooth blend to 1 stepped like cel paint
```
- `README.md`: what mood the ramp gives and what it suits.
- `.metadata`: search tags.
The colours are light, not paint: each one multiplies the surface's own colour, so a ramp keeps every object its own colour and only says what colour its light and shadow are. `high` near white keeps lit surfaces true to their colour; a coloured `high` tints the whole look. `ToonBlocks.ramps()` lists every ramp installed, `ToonBlocks.ramp(id)` reads one.
## Known limits
- An asset of this type registers when the engine indexes its files, a moment after they are written.
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.
# toonWorld
Give an existing world, scene or installed kit a cel-shaded toon look with toonBlocks and styleKit, and leave it undoable.
## What it does
1. **Survey.** Reads the scene's stack exactly as it is (every entry with its id, block, strength, on, mask and settings, and the stack options with its exclude list and groups), the light (is there a sun, how low, how strong the ambient), the objects and the materials they wear, which objects carry toonMaterials' own ink (`ToonInk`, `ToonProp`), floors and ground planes, glass and water, effects, the screen UI, the world labels, the characters and the colours that carry gameplay meaning. The recorded stack is the undo.
2. **Choose.** Picks one of the seven toon looks (`comicInkCel`, `saturdayMorning`, `softAnime`, `pencilAnime`, `clearLine`, `thickSticker`, `ninetiesCG`) or a stack built from the blocks, from the reference picture or the asker's words, with a ramp when the look shades through one, the reason, and what the scene's light needs (a directional sun for the clean toon light).
3. **Apply.** `StyleKit.applyLook(<look>, { keep = <slots to keep> })` (or `StyleKit.load` for a built stack), then `ToonBlocks.setRamp(<ramp>)` when the look has a toonRamp entry, and at most one round of `StyleKit.set` on `fullLight`, `castBelow`, `shadowLift` or the line's width.
4. **Outlines.** `ToonBlocks.setMaterialOutline(<material>, false)` for floors, terrain and backdrops, a quieter line for busy walls, `ToonBlocks.setObjectOutline(<entity>, { width = ... })` for the hero, `false` for pickups and glows; objects with their own toonMaterials ink are left to it (`skipOwnInk` 1) and full-frame lines are kept off them with a group mask.
5. **Hero.** `ToonMaterial.paint(<hero id>)` when there is a hero (the stack's toon light inside its own materials), and a group mask that keeps the Light and Fill entries off it.
6. **Check.** Screen UI and world labels readable (labels left out by name), characters and gameplay colours still read, effects and glass, black stays black with the lights off (outline ink included), the low tier, the multiplayer note.
7. **Report.** The look and why, the stack before and after, every outline rule and setting made, every painted object, the checks, the numbers, and the undo.
**Undo.** The report carries the full `StyleKit.load(...)` call of the stack from before the run (or `StyleKit.clear()` when there was none) and the exclude list and groups from before, `ToonMaterial.unpaint(<id>, { removeFiles = true })` for every object this run painted (its original materials back, the derived material files deleted), `ToonBlocks.setMaterialOutline(<material>, nil)` for every material rule and `ToonBlocks.setObjectOutline(<entity>, nil)` for every object setting this run made (which remove the `ToonOutlineRules` entries and `ToonOutline` components). With no outline entry live, every hull shell is released and the frame is exactly as rendered before.
## What it needs
toonBlocks installed (it brings styleKit). inkBlocks and paperBlocks are optional: the run can swap the line for an ink line or add a paper when the asker wants a drawn look. The Lookbook check uses lookbookKit when the world has it.
## Starting it
zero workflow start --name toonWorld --args '{"subject":"main","look":"bright cartoon with thick black outlines","hero":"Hero"}'
`subject` names the world, scene or kit (default: the loaded scene); `look` is the look in the asker's words or a look id (default: the run proposes one); `hero` names the entity to paint (default: the run proposes one or none); `reference` is an optional path to a reference picture.
## Known limits
- Installing a package with several dependencies can take a while (#21420).
- ZeroMind's description of this can lag one release behind what is installed (#19258).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.
# styleBlock (asset type)
A styleBlock is one stackable piece of an art style. It sits in one of ten slots (Surface, Light, Fill, Tone, Line, Colour, Ground, Time, Raster, Medium), it states what it reads and what it writes, and the styleKit stack runs it over the whole frame after antialiasing. Any block swaps for any other block of its slot with no other change.
## Folder shape
A block is a plain folder holding the block asset and its shader side by side:
```
blocks/posterize/
posterize.styleBlock/ the block: block.yaml, README.md, .metadata (all required)
posterize.shader/ the post-process shader the stack runs
posterizeField.shader/ optional: the shader that writes a shared field (Ground or Time blocks)
posterize.shaderModule/ optional: the piece a material includes for a chosen set of objects
```
Paths in `block.yaml` are relative to the plain folder. The shader sits beside the `.styleBlock` rather than inside it, because a shader nested inside another asset folder is not listed by the engine and could not be found without a computed lookup that would block publishing.
The quickest way to start one is `StyleKit.newBlock("myTint", { slot = "colour" })` (written to `/zero/source/myBlocks/myTint`, or the `folder` you pass), which writes the whole folder, block and shader, and registers it at once. `asset.create("styleBlock", name, { slot = "line" })` writes only the `.styleBlock` files; write the `<name>.shader` beside it yourself.
## block.yaml
```yaml
name: "Posterize"
slot: colour # surface light fill tone line colour ground time raster medium
version: "1.0.0"
summary: "Cuts the picture into a few flat tone steps."
reads: [frame] # frame depth normal albedo motion ground wobble clock mask soft pigments rendered paper sun
writes: [frame] # frame, and field:ground, field:paper (Ground) or field:wobble (Time) when it has a field
stacking: layer # optional: layer (default) or chain
rank: 10 # optional: StyleKit.add places it before the first block of its slot with a higher rank
keepDim: false # optional: true keeps a dim room dim under this block (the dim guard); defaults to true in the Tone slot, false elsewhere
shader: posterize.shader # relative to the plain folder
field: { name: ground, shader: plainPaperField.shader } # optional, Ground and Time only
include: posterize.shaderModule # optional
settings: # every non-sk_ property of the shader, with what it means
levels: "How many steps each channel keeps."
defaults: # optional: this block's own defaults over the shader's (many blocks, one shader)
levels: 4
quality: # optional per-tier overrides of settings
low: { samples: 4 }
```
A Ground block's `field` may also name a paper-field shader and say that it layers (styleKit 1.2.0):
```yaml
field: { name: ground, shader: paperField.shader, paper: paperTakes.shader, layers: true }
writes: [frame, field:ground, field:paper]
```
- `paper`: a shader that publishes the paper field (`sk_paper`: r thirst -1 hard-sized to +1 thirsty, 0 the standard sheet; g sheen; b fibre; a dark ground 0 to 1) for blocks that read `paper`. It is run only when a live block reads it. A Ground block without one leaves the paper field neutral (every value 0). Add `field:paper` to `writes`.
- `layers: true`: when this block is not the first Ground block in the stack, it lays its ground (and its paper field) over the one before by its strength and mask, instead of being ignored as a later field. Its field shaders receive the field before as `sk_ground` / `sk_paper` and mix over it (`sk_view.y` is 1 when they are layered).
`defaults` lets several blocks share one shader (paperBlocks' seventeen papers run on one): each key must be a setting the shader declares, it overrides the shader's default for this block on every tier (`quality` overrides come after it, an entry's own settings last), and `StyleKit.settingsOf(id)` reports it as the block's default.
The shader's `properties.yaml` starts with the styleKit shared header (the `sk_` properties) and then declares the block's own settings with their defaults and ranges. `StyleKit.checkBlock(id)` reports anything missing.
## Stacking and rank
- `stacking: layer` (the default): every block in a slot reads the slot's input, and later ones are laid over the earlier ones by strength and mask.
- `stacking: chain`: the block reads what the blocks before it in its slot made, so modifier blocks build on each other (a wash, then its granulation, then its darkened edges).
- `rank: <number>`: `StyleKit.add` places the block before the first block of its slot with a higher rank, so a chain lands in its intended order whatever order its blocks are added in. A block with no rank lands before the first block of its slot ranked 100 or more: give finishing blocks that must stay on top (a printed margin, a frame, weather laid over the picture) `rank: 100` and up with `stacking: chain`, and grain or a vignette added later goes under them instead of painting them out.
## Keeping a dark scene dark (keepDim)
`keepDim` (styleKit 1.4.0) asks for the stack's dim guard. While any live block declares it, two small passes run after the chain: they measure the stack's result against the frame as rendered and scale the result down wherever it comes out brighter than a dim room was, so a shading block's sheet and the light between its marks never brighten a dim or unlit room. Every mark keeps its shape, and in daylight or a well lit room the guard hands the result on exactly unchanged.
- Leave it out on a Tone block: every Tone block keeps dim unless it says `keepDim: false`. A new hatching, stipple or dots block gets the guard for free.
- Set `keepDim: true` on a block in another slot that lays a light sheet or light marks over the picture.
- Set `keepDim: false` on a Tone block that is meant to light up the dark (a glow, chalk marks on a black board).
## Published inputs (styleKit 1.8.0)
Beyond the five extra inputs, a block can read a texture another package computes: list `input:<name>` under `reads` and declare an `in_<name>` texture after the shared header. The producer calls `StyleKit.publishInput(name, texture)` on each machine and draws it before the stack runs; with nothing published the block reads black. `StyleKit.checkBlock` refuses a read without its texture and a texture without its read. The guide "Writing your own style block" has the whole recipe.
## Extra inputs
Five inputs come after the shared header, each declared straight after it and bound by the stack only when `reads` lists the matching word:
- `sk_soft` (`reads: soft`): a half-resolution, depth-aware blur of what the block reads, never smearing a nearer thing over a farther one. Read it through the `skSoft` shader module (`sk_soft_at`, `sk_soft_wide`, `sk_soft_depth`, `sk_soft_in_front`). Its width is the stack option `softRadius`.
- `sk_pigments` (`reads: pigments`): the scene's pigment set as a 16 x 1 palette. Read it through the `skPigmentSet` shader module (`skg_has_set`, `skg_pigment`, `skg_shadow`, `skg_light`, `skg_air`, `skg_remix`).
- `sk_rendered` (`reads: rendered`): the frame as it entered the stack, before any block changed it. Read it through the `skRendered` shader module (`sk_rendered_at`). Its use is a light estimate against `sk_albedo` (texture cancels out) or an original colour to restore.
- `sk_paper` (`reads: paper`, a texture, default black): the paper field the Ground blocks publish. Read it through the `skPaper` shader module (`sk_thirst`, `sk_sheen`, `sk_fibre`, `sk_dark_ground`). Where no Ground block publishes it every value is 0, so the block draws as it did without it. A Ground block's own paper-field shader declares it to read the field laid before it, without listing `paper` under reads.
- `sk_sun` (`reads: sun`, a float4): the direction toward the scene's first directional light, `w` 1 when it gives light. Read about once a second. Raking light and sheen use it.
`StyleKit.checkBlock` refuses a block that declares one of them without the word under `reads`, or lists the word without declaring the texture.
When an asset of this type registers on any machine (world load, install, a collaborator's new block arriving), the type's `onRegister` hands it to the styleKit library, so `StyleKit.blocks()` lists it and a stack can use it at once.
## Known limits
- An asset of this type registers when the engine indexes its files, a moment after they are written.
- ZeroMind's description of this can lag one release behind what is installed (#19258).
The package README's Known limits lists the rest.