The full-frame pass of comicBlocks' duotone spot palettes (Colour): the picture printed in black and one spot colour on paper, each ink optionally snapped to a few flat tints.
# Duotone blue (Colour)
A duotone spot colour palette: the whole picture printed with two inks on paper, black and one blue spot ink. The spot ink carries the middle tones and shadows, black comes in only for the deepest darks, and the lights are bare paper. It is a palette like `goldenAgePalette` (Colour, chain, rank 80), so it swaps with any palette in one change:
```luau
StyleKit.add("duotoneRed", { id = "palette" })
StyleKit.swap("palette", "duotoneBlue")
StyleKit.set("palette", { spot = "#2a8a3a" }) -- any spot ink
```
Siblings: `duotoneRed`, `duotoneBlue`, `duotoneOrange`; they share one shader and one set of settings (`spot`, `black`, `paper`, `spotAmount`, `blackStart`, `contrast`, `levels`, `soft`).
## What it gives up in motion
Nothing moves on its own; tints follow the picture's brightness.
## How it treats content
It reads only the finished frame, so every kind of content is printed the same way:
- **Opaque surfaces and the sky:** printed like the rest of the picture.
- **Transparent things and particles:** printed as they show in the frame, over what is behind them.
- **Fog:** printed as part of the picture; fogged distance comes out in lighter tints.
- **Skinned characters:** printed like everything else; nothing slides on them, because nothing here is laid on surfaces.
- **Foliage:** printed like everything else; fine leaves stay as fine as they were drawn.
- **World text and labels:** re-inked with the rest; keep text a player must read with `StyleKit.options({ exclude = { ... } })`. Screen UI is drawn after the stack and is never touched.
# Duotone orange (Colour)
A duotone spot colour palette: the whole picture printed with two inks on paper, black and one orange spot ink. The spot ink carries the middle tones and shadows, black comes in only for the deepest darks, and the lights are bare paper. It is a palette like `goldenAgePalette` (Colour, chain, rank 80), so it swaps with any palette in one change:
```luau
StyleKit.add("duotoneRed", { id = "palette" })
StyleKit.swap("palette", "duotoneBlue")
StyleKit.set("palette", { spot = "#2a8a3a" }) -- any spot ink
```
Siblings: `duotoneRed`, `duotoneBlue`, `duotoneOrange`; they share one shader and one set of settings (`spot`, `black`, `paper`, `spotAmount`, `blackStart`, `contrast`, `levels`, `soft`).
## What it gives up in motion
Nothing moves on its own; tints follow the picture's brightness.
## How it treats content
It reads only the finished frame, so every kind of content is printed the same way:
- **Opaque surfaces and the sky:** printed like the rest of the picture.
- **Transparent things and particles:** printed as they show in the frame, over what is behind them.
- **Fog:** printed as part of the picture; fogged distance comes out in lighter tints.
- **Skinned characters:** printed like everything else; nothing slides on them, because nothing here is laid on surfaces.
- **Foliage:** printed like everything else; fine leaves stay as fine as they were drawn.
- **World text and labels:** re-inked with the rest; keep text a player must read with `StyleKit.options({ exclude = { ... } })`. Screen UI is drawn after the stack and is never touched.
# Duotone red (Colour)
A duotone spot colour palette: the whole picture printed with two inks on paper, black and one red spot ink. The spot ink carries the middle tones and shadows, black comes in only for the deepest darks, and the lights are bare paper. It is a palette like `goldenAgePalette` (Colour, chain, rank 80), so it swaps with any palette in one change:
```luau
StyleKit.add("duotoneRed", { id = "palette" })
StyleKit.swap("palette", "duotoneBlue")
StyleKit.set("palette", { spot = "#2a8a3a" }) -- any spot ink
```
Siblings: `duotoneRed`, `duotoneBlue`, `duotoneOrange`; they share one shader and one set of settings (`spot`, `black`, `paper`, `spotAmount`, `blackStart`, `contrast`, `levels`, `soft`).
## What it gives up in motion
Nothing moves on its own; tints follow the picture's brightness.
## How it treats content
It reads only the finished frame, so every kind of content is printed the same way:
- **Opaque surfaces and the sky:** printed like the rest of the picture.
- **Transparent things and particles:** printed as they show in the frame, over what is behind them.
- **Fog:** printed as part of the picture; fogged distance comes out in lighter tints.
- **Skinned characters:** printed like everything else; nothing slides on them, because nothing here is laid on surfaces.
- **Foliage:** printed like everything else; fine leaves stay as fine as they were drawn.
- **World text and labels:** re-inked with the rest; keep text a player must read with `StyleKit.options({ exclude = { ... } })`. Screen UI is drawn after the stack and is never touched.
# Fine press (Medium)
The light sibling of `newsprintPress`: a touch of spread and gain, blacks only just softened. Same shader and settings; swap with `StyleKit.swap("press", "finePress")`.
## What it gives up in motion
Nothing moves on its own.
## How it treats content
It reads only the finished frame, so every kind of content is printed the same way:
- **Opaque surfaces and the sky:** printed like the rest of the picture.
- **Transparent things and particles:** printed as they show in the frame, over what is behind them.
- **Fog:** printed as part of the picture; fogged distance comes out in lighter tints.
- **Skinned characters:** printed like everything else; nothing slides on them, because nothing here is laid on surfaces.
- **Foliage:** printed like everything else; fine leaves stay as fine as they were drawn.
- **World text and labels:** re-inked with the rest; keep text a player must read with `StyleKit.options({ exclude = { ... } })`. Screen UI is drawn after the stack and is never touched.
# Golden-age palette (styleBlock, Fill)
Flat colour in the small printable palette of a golden-age comic: every colour snapped to quarter tints of three process inks, value cut into a few flat steps, deep shadows spotted solid black.
This block starts from: `blacks` (0.13), `cyan` (#1a94c8), `levels` (4), `magenta` (#d6336e), `saturation` (1.25), `valueSteps` (3), `yellow` (#f7d93a). It shares one shader, and so every setting, with the other palette blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
The palette is worked out per pixel from the colour this block reads, so it holds still with the picture and adds no marks of its own: nothing slides or crawls. Where the light changes slowly across a surface a tint edge sits on the surface and moves only when the light moves; each step between tints is a short soft ramp, so it never flickers between two tints. Textured surfaces can break into small tint patches; put a flattening fill before it (toonBlocks' celFill) for clean areas. Nothing changes on the clock.
## How it treats content
- Opaque things: printed in the palette's flat tints; deep shadows go solid black, near whites to paper.
- Transparent things (glass, water): printed by the colour seen through them.
- Particles and smoke: printed like everything else; soft gradients turn into a few tint steps.
- Sky: printed in the palette, usually one or two flat tints of cyan.
- Fog: fog greys colours toward the paper, so far things print in paler tints.
- Skinned characters: printed in the palette like everything else, no sliding.
- Foliage: printed in flat tints; dense leaves can go patchy, a flattening fill before it helps.
- World text: letters keep their contrast but take palette colours; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black (solid black ink).
- Dim rooms: not a Tone block, so it does not ask for the dim guard: it only re-colours, it lays no light sheet.
# Black ink on paper (styleBlock, Colour)
Black and white: the picture printed in black ink on paper with no colour at all, the base a spot colour on chosen objects is laid beside.
This block starts from: `select` (3). It shares one shader, and so every setting, with the other spot blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Which places get the spot is read from the frame as rendered every frame, so it holds still with the picture; the edge of a spot area is a short ramp in hue and saturation, so a colour near the edge of the key hue fades rather than flickers. Nothing slides and nothing changes on the clock.
## How it treats content
- Opaque things: black and white, except those whose colour (or entry variant) is chosen for the spot.
- Transparent things (glass, water): chosen by the colour seen through them.
- Particles and smoke: a fire or a magic effect in the key hue lights up in the spot colour, which reads well.
- Sky: a blue sky is chosen only when the key hue is blue.
- Fog: fog greys colours, so far things lose the spot first.
- Skinned characters: chosen like everything else; give a hero a role or variant to make the spot theirs alone.
- Foliage: green leaves get the spot only with a green key hue.
- World text: letters keep their contrast in black and white; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black.
- Dim rooms: it only re-colours and lays no light sheet, so it does not ask for the dim guard.
# Modern flat colour (styleBlock, Fill)
Modern digital comic colouring: clean flat local colour with three value steps of light and shadow and fine tints, crisp darks and no visible print artefacts.
This block starts from: `blacks` (0.05), `cyan` (#00a6e6), `levels` (8), `magenta` (#e6197a), `saturation` (1.15), `soft` (0.05), `valueSteps` (3), `whites` (0.96), `yellow` (#ffe600). It shares one shader, and so every setting, with the other palette blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
The palette is worked out per pixel from the colour this block reads, so it holds still with the picture and adds no marks of its own: nothing slides or crawls. Where the light changes slowly across a surface a tint edge sits on the surface and moves only when the light moves; each step between tints is a short soft ramp, so it never flickers between two tints. Textured surfaces can break into small tint patches; put a flattening fill before it (toonBlocks' celFill) for clean areas. Nothing changes on the clock.
## How it treats content
- Opaque things: printed in the palette's flat tints; deep shadows go solid black, near whites to paper.
- Transparent things (glass, water): printed by the colour seen through them.
- Particles and smoke: printed like everything else; soft gradients turn into a few tint steps.
- Sky: printed in the palette, usually one or two flat tints of cyan.
- Fog: fog greys colours toward the paper, so far things print in paler tints.
- Skinned characters: printed in the palette like everything else, no sliding.
- Foliage: printed in flat tints; dense leaves can go patchy, a flattening fill before it helps.
- World text: letters keep their contrast but take palette colours; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black (solid black ink).
- Dim rooms: not a Tone block, so it does not ask for the dim guard: it only re-colours, it lays no light sheet.
# Newsprint press (Medium)
The printing itself on cheap newsprint, laid over whatever look is underneath: ink spreading into the paper round every mark, dot gain in the middle tones, faded blacks and slightly uneven inking. Stack it last, over any palette, screen, line and paper.
```luau
StyleKit.add("newsprintPress", { id = "press" })
StyleKit.swap("press", "pulpPress") -- heavier, older press
StyleKit.set("press", { fade = 0.4 }) -- greyer blacks
```
Settings: `spread` (0.8 reference px), `gain` (0.35), `fade` (0.25), `fadeInk`, `uneven` (0.25), `unevenPx` (90), `paper`. Siblings: `pulpPress` (heavy), `finePress` (light). All three share one shader and one set of settings.
## What it gives up in motion
Nothing moves on its own. The uneven inking is fixed on the page like a printed sheet, so the picture moves under it.
## How it treats content
It reads only the finished frame, so every kind of content is printed the same way:
- **Opaque surfaces and the sky:** printed like the rest of the picture.
- **Transparent things and particles:** printed as they show in the frame, over what is behind them.
- **Fog:** printed as part of the picture; fogged distance comes out in lighter tints.
- **Skinned characters:** printed like everything else; nothing slides on them, because nothing here is laid on surfaces.
- **Foliage:** printed like everything else; fine leaves stay as fine as they were drawn.
- **World text and labels:** re-inked with the rest; keep text a player must read with `StyleKit.options({ exclude = { ... } })`. Screen UI is drawn after the stack and is never touched.
A full-frame pass of comicBlocks (noir).
# Noir blacks (styleBlock, Fill)
Noir ink: black and white with big solid shadow shapes, small detail merged away so the shadows read as large flat shapes of ink.
This block starts from: `shapes` (0.7), `threshold` (0.3). It shares one shader, and so every setting, with the other noir blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Black shapes come from the light in the picture, read through the stack's soft field so small texture and noise merge into large flat shapes; they hold still with the picture and slide nowhere. A shadow edge moves only when the light or the thing moves, and the black-to-white edge is a short ramp, so it never flickers. Silhouettes stay crisp: where the soft field reaches across onto another surface the pixel's own value is used. Nothing changes on the clock.
## How it treats content
- Opaque things: cut into solid black and white (and a grey band if set) by their light.
- Transparent things (glass, water): cut by the colour seen through them.
- Particles and smoke: bright smoke reads white, dark smoke merges into the blacks.
- Sky: white by default; `skyInk` turns it black for a night page.
- Fog: fog lightens things, so far things go white, which reads as atmosphere.
- Skinned characters: cut like everything else; strong rim light keeps them readable against black.
- Foliage: merges into big shapes; lower `shapes` for more leaf detail.
- World text: dark letters on light boards stay readable; exclude labels on dark boards.
- Black stays black: unlit pixels stay black.
- Dim rooms: a dim room goes mostly black, which is the point of noir; it adds no light.
# Noir heavy shadow (styleBlock, Fill)
Heavy noir: most of the page swallowed by solid black, only the strongest lights cut out of it in white, with big simple shapes and hard edges.
This block starts from: `contrast` (1.5), `edge` (0.02), `shapes` (0.85), `threshold` (0.45). It shares one shader, and so every setting, with the other noir blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Black shapes come from the light in the picture, read through the stack's soft field so small texture and noise merge into large flat shapes; they hold still with the picture and slide nowhere. A shadow edge moves only when the light or the thing moves, and the black-to-white edge is a short ramp, so it never flickers. Silhouettes stay crisp: where the soft field reaches across onto another surface the pixel's own value is used. Nothing changes on the clock.
## How it treats content
- Opaque things: cut into solid black and white (and a grey band if set) by their light.
- Transparent things (glass, water): cut by the colour seen through them.
- Particles and smoke: bright smoke reads white, dark smoke merges into the blacks.
- Sky: white by default; `skyInk` turns it black for a night page.
- Fog: fog lightens things, so far things go white, which reads as atmosphere.
- Skinned characters: cut like everything else; strong rim light keeps them readable against black.
- Foliage: merges into big shapes; lower `shapes` for more leaf detail.
- World text: dark letters on light boards stay readable; exclude labels on dark boards.
- Black stays black: unlit pixels stay black.
- Dim rooms: a dim room goes mostly black, which is the point of noir; it adds no light.
# Noir three-tone (styleBlock, Fill)
Noir ink with a grey middle: solid black shadow shapes, a grey band just above them for a dot or line screen to print, and white lights.
This block starts from: `grey` (0.55), `greyBand` (0.24), `shapes` (0.65), `threshold` (0.22). It shares one shader, and so every setting, with the other noir blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Black shapes come from the light in the picture, read through the stack's soft field so small texture and noise merge into large flat shapes; they hold still with the picture and slide nowhere. A shadow edge moves only when the light or the thing moves, and the black-to-white edge is a short ramp, so it never flickers. Silhouettes stay crisp: where the soft field reaches across onto another surface the pixel's own value is used. Nothing changes on the clock.
## How it treats content
- Opaque things: cut into solid black and white (and a grey band if set) by their light.
- Transparent things (glass, water): cut by the colour seen through them.
- Particles and smoke: bright smoke reads white, dark smoke merges into the blacks.
- Sky: white by default; `skyInk` turns it black for a night page.
- Fog: fog lightens things, so far things go white, which reads as atmosphere.
- Skinned characters: cut like everything else; strong rim light keeps them readable against black.
- Foliage: merges into big shapes; lower `shapes` for more leaf detail.
- World text: dark letters on light boards stay readable; exclude labels on dark boards.
- Black stays black: unlit pixels stay black.
- Dim rooms: a dim room goes mostly black, which is the point of noir; it adds no light.
A full-frame pass of comicBlocks (palette).
A full-frame pass of comicBlocks (plateShift).
# Plate shift (styleBlock, Raster)
Misregistration: the cyan, magenta, yellow and black plates printed slightly out of line with each other, a still offset with coloured fringes on the edges and no jitter.
It shares one shader, and so every setting, with the other plateShift blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Misregistration here is still: each plate is shifted by a fixed offset on the screen, set once, so coloured fringes sit along every edge and move only when the edges move. It never jitters, wobbles or changes on the clock (no flashing). Because the offset is in screen space, the fringe stays the same width at every distance, as on a printed page.
## How it treats content
- Opaque things: coloured fringes along every edge where colours meet.
- Transparent things (glass, water): fringed like the colours seen through them.
- Particles and smoke: soft particles barely show a fringe.
- Sky: a flat sky shows nothing; the horizon edge fringes.
- Fog: soft fog edges barely show a fringe.
- Skinned characters: their silhouettes fringe like everything else.
- Foliage: busy leaves gain many small fringes; keep `amount` low on foliage-heavy scenes.
- World text: small letters fringe and get harder to read; exclude labels a player must read.
- Black stays black: the black plate stays black; an unlit pixel stays black.
- Dim rooms: it moves ink, it adds none, so it does not ask for the dim guard.
# Plate shift, heavy (styleBlock, Raster)
A badly misprinted page: the colour plates several pixels out of line, still, with wide coloured fringes on every edge.
This block starts from: `amount` (2.6). It shares one shader, and so every setting, with the other plateShift blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Misregistration here is still: each plate is shifted by a fixed offset on the screen, set once, so coloured fringes sit along every edge and move only when the edges move. It never jitters, wobbles or changes on the clock (no flashing). Because the offset is in screen space, the fringe stays the same width at every distance, as on a printed page.
## How it treats content
- Opaque things: coloured fringes along every edge where colours meet.
- Transparent things (glass, water): fringed like the colours seen through them.
- Particles and smoke: soft particles barely show a fringe.
- Sky: a flat sky shows nothing; the horizon edge fringes.
- Fog: soft fog edges barely show a fringe.
- Skinned characters: their silhouettes fringe like everything else.
- Foliage: busy leaves gain many small fringes; keep `amount` low on foliage-heavy scenes.
- World text: small letters fringe and get harder to read; exclude labels a player must read.
- Black stays black: the black plate stays black; an unlit pixel stays black.
- Dim rooms: it moves ink, it adds none, so it does not ask for the dim guard.
# Plate shift, subtle (styleBlock, Raster)
A barely-there misregistration: plates half a pixel or so out of line, still, for a printed feel without visible fringes.
This block starts from: `amount` (0.45). It shares one shader, and so every setting, with the other plateShift blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Misregistration here is still: each plate is shifted by a fixed offset on the screen, set once, so coloured fringes sit along every edge and move only when the edges move. It never jitters, wobbles or changes on the clock (no flashing). Because the offset is in screen space, the fringe stays the same width at every distance, as on a printed page.
## How it treats content
- Opaque things: coloured fringes along every edge where colours meet.
- Transparent things (glass, water): fringed like the colours seen through them.
- Particles and smoke: soft particles barely show a fringe.
- Sky: a flat sky shows nothing; the horizon edge fringes.
- Fog: soft fog edges barely show a fringe.
- Skinned characters: their silhouettes fringe like everything else.
- Foliage: busy leaves gain many small fringes; keep `amount` low on foliage-heavy scenes.
- World text: small letters fringe and get harder to read; exclude labels a player must read.
- Black stays black: the black plate stays black; an unlit pixel stays black.
- Dim rooms: it moves ink, it adds none, so it does not ask for the dim guard.
# Pop-art palette (styleBlock, Fill)
Pop-art primaries: every colour pushed to solid ink or none, so a page holds only bold red, yellow, blue, their mixes, black and white.
This block starts from: `blacks` (0.18), `cyan` (#0a7fd8), `levels` (1), `magenta` (#e8143c), `saturation` (1.8), `valueSteps` (0), `whites` (0.86), `yellow` (#ffd400). It shares one shader, and so every setting, with the other palette blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
The palette is worked out per pixel from the colour this block reads, so it holds still with the picture and adds no marks of its own: nothing slides or crawls. Where the light changes slowly across a surface a tint edge sits on the surface and moves only when the light moves; each step between tints is a short soft ramp, so it never flickers between two tints. Textured surfaces can break into small tint patches; put a flattening fill before it (toonBlocks' celFill) for clean areas. Nothing changes on the clock.
## How it treats content
- Opaque things: printed in the palette's flat tints; deep shadows go solid black, near whites to paper.
- Transparent things (glass, water): printed by the colour seen through them.
- Particles and smoke: printed like everything else; soft gradients turn into a few tint steps.
- Sky: printed in the palette, usually one or two flat tints of cyan.
- Fog: fog greys colours toward the paper, so far things print in paler tints.
- Skinned characters: printed in the palette like everything else, no sliding.
- Foliage: printed in flat tints; dense leaves can go patchy, a flattening fill before it helps.
- World text: letters keep their contrast but take palette colours; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black (solid black ink).
- Dim rooms: not a Tone block, so it does not ask for the dim guard: it only re-colours, it lays no light sheet.
The full-frame pass of comicBlocks' newsprint press blocks (Medium): ink spreading into the paper, dot gain in the middle tones, faded blacks and uneven inking across the sheet, all fixed on the page.
# Pulp palette (styleBlock, Fill)
A dull, cheap-ink palette for pulp comics: muddy third tints of faded process inks on newsprint, a couple of flat value steps and heavy blacks.
This block starts from: `blacks` (0.17), `cyan` (#4a8ea0), `levels` (3), `magenta` (#b9505e), `saturation` (0.9), `valueSteps` (2), `whites` (0.88), `yellow` (#e3cc62). It shares one shader, and so every setting, with the other palette blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
The palette is worked out per pixel from the colour this block reads, so it holds still with the picture and adds no marks of its own: nothing slides or crawls. Where the light changes slowly across a surface a tint edge sits on the surface and moves only when the light moves; each step between tints is a short soft ramp, so it never flickers between two tints. Textured surfaces can break into small tint patches; put a flattening fill before it (toonBlocks' celFill) for clean areas. Nothing changes on the clock.
## How it treats content
- Opaque things: printed in the palette's flat tints; deep shadows go solid black, near whites to paper.
- Transparent things (glass, water): printed by the colour seen through them.
- Particles and smoke: printed like everything else; soft gradients turn into a few tint steps.
- Sky: printed in the palette, usually one or two flat tints of cyan.
- Fog: fog greys colours toward the paper, so far things print in paler tints.
- Skinned characters: printed in the palette like everything else, no sliding.
- Foliage: printed in flat tints; dense leaves can go patchy, a flattening fill before it helps.
- World text: letters keep their contrast but take palette colours; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black (solid black ink).
- Dim rooms: not a Tone block, so it does not ask for the dim guard: it only re-colours, it lays no light sheet.
# Pulp press (Medium)
The heavy sibling of `newsprintPress`: an old press on rough pulp, with ink filling in the shadows, faded brown-grey blacks and a strongly mottled inking. Same shader and settings as `newsprintPress`; swap between them with `StyleKit.swap("press", "pulpPress")`.
## What it gives up in motion
Nothing moves on its own; the mottle is fixed on the page.
## How it treats content
It reads only the finished frame, so every kind of content is printed the same way:
- **Opaque surfaces and the sky:** printed like the rest of the picture.
- **Transparent things and particles:** printed as they show in the frame, over what is behind them.
- **Fog:** printed as part of the picture; fogged distance comes out in lighter tints.
- **Skinned characters:** printed like everything else; nothing slides on them, because nothing here is laid on surfaces.
- **Foliage:** printed like everything else; fine leaves stay as fine as they were drawn.
- **World text and labels:** re-inked with the rest; keep text a player must read with `StyleKit.options({ exclude = { ... } })`. Screen UI is drawn after the stack and is never touched.
# Speed lines shader
The shader behind comicBlocks' `speedLines` block: manga focus lines radiating from a point on the screen, tapering to a clear circle. One full-frame pass with no texture reads beyond the frame. See the block's README for its settings.
# Speed lines
Manga focus lines (Medium slot): streaks radiate from a point on the screen and taper to nothing at a clear circle round it, throwing the eye at the action. Each streak's length and weight is redrawn on the held clock's steps (`boil` 1) or kept still (`boil` 0).
```luau
StyleKit.add("speedLines", { id = "speed" }) -- over any look
StyleKit.set("speed", { centre = { 0.5, 0.45, 0, 0 }, inner = 0.3 }) -- aim it, tighten it
StyleKit.setLocalEntry("dash", { block = "speedLines", settings = { inner = 0.25 } }) -- a beat on this machine only (a dash, a heavy hit)
StyleKit.setLocalEntry("dash", nil)
```
The `mangaScreentone` look uses it. `StyleKit.settingsOf("speedLines")` lists every setting.
## What it gives up in motion
The lines are fixed to the screen, not to the world: they do not follow a moving character, they mark the frame. With `boil` 1 they change on each held step (8 a second by default), which reads as hand drawn; use `boil` 0 for a still frame or a calm scene.
## How it treats content
It reads nothing but the frame and draws over everything in it outside the clear circle: opaque and transparent surfaces, particles, the sky and fog, skinned (moving) characters, foliage and world text alike, since the lines belong to the page, not to anything in the scene. Keep the circle over what the player must read, or mask the entry off a group (`StyleKit.setMask`). Screen UI is drawn after the stack and is never touched. Cost: one cheap full-frame pass.
A full-frame pass of comicBlocks (spot).
# Spot colour by hue (styleBlock, Colour)
Black, white and one spot colour chosen by hue: everything in black ink on paper except colours near the key hue (red by default), which print in the spot ink.
This block starts from: `select` (0). It shares one shader, and so every setting, with the other spot blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Which places get the spot is read from the frame as rendered every frame, so it holds still with the picture; the edge of a spot area is a short ramp in hue and saturation, so a colour near the edge of the key hue fades rather than flickers. Nothing slides and nothing changes on the clock.
## How it treats content
- Opaque things: black and white, except those whose colour (or entry variant) is chosen for the spot.
- Transparent things (glass, water): chosen by the colour seen through them.
- Particles and smoke: a fire or a magic effect in the key hue lights up in the spot colour, which reads well.
- Sky: a blue sky is chosen only when the key hue is blue.
- Fog: fog greys colours, so far things lose the spot first.
- Skinned characters: chosen like everything else; give a hero a role or variant to make the spot theirs alone.
- Foliage: green leaves get the spot only with a green key hue.
- World text: letters keep their contrast in black and white; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black.
- Dim rooms: it only re-colours and lays no light sheet, so it does not ask for the dim guard.
# Spot colour on chosen objects (styleBlock, Colour)
Black, white and one spot colour on the objects you choose: everything this entry reaches prints in the spot ink, so give the entry a variant (StyleKit.give an object a variant or role) or a mask, and lay inkMono under the rest.
This block starts from: `select` (1). It shares one shader, and so every setting, with the other spot blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Which places get the spot is read from the frame as rendered every frame, so it holds still with the picture; the edge of a spot area is a short ramp in hue and saturation, so a colour near the edge of the key hue fades rather than flickers. Nothing slides and nothing changes on the clock.
## How it treats content
- Opaque things: black and white, except those whose colour (or entry variant) is chosen for the spot.
- Transparent things (glass, water): chosen by the colour seen through them.
- Particles and smoke: a fire or a magic effect in the key hue lights up in the spot colour, which reads well.
- Sky: a blue sky is chosen only when the key hue is blue.
- Fog: fog greys colours, so far things lose the spot first.
- Skinned characters: chosen like everything else; give a hero a role or variant to make the spot theirs alone.
- Foliage: green leaves get the spot only with a green key hue.
- World text: letters keep their contrast in black and white; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black.
- Dim rooms: it only re-colours and lays no light sheet, so it does not ask for the dim guard.
# Spot colour on vivid colours (styleBlock, Colour)
Black, white and one spot colour on whatever is most vivid: every strongly coloured thing prints in the spot ink (or keeps its own hue), the rest in black and white.
This block starts from: `minSaturation` (0.45), `select` (2). It shares one shader, and so every setting, with the other spot blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
Which places get the spot is read from the frame as rendered every frame, so it holds still with the picture; the edge of a spot area is a short ramp in hue and saturation, so a colour near the edge of the key hue fades rather than flickers. Nothing slides and nothing changes on the clock.
## How it treats content
- Opaque things: black and white, except those whose colour (or entry variant) is chosen for the spot.
- Transparent things (glass, water): chosen by the colour seen through them.
- Particles and smoke: a fire or a magic effect in the key hue lights up in the spot colour, which reads well.
- Sky: a blue sky is chosen only when the key hue is blue.
- Fog: fog greys colours, so far things lose the spot first.
- Skinned characters: chosen like everything else; give a hero a role or variant to make the spot theirs alone.
- Foliage: green leaves get the spot only with a green key hue.
- World text: letters keep their contrast in black and white; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black.
- Dim rooms: it only re-colours and lays no light sheet, so it does not ask for the dim guard.
# Sunday strip palette (styleBlock, Fill)
Bright Sunday newspaper colour: cheerful flat thirds of strong inks, two value steps and clean blacks, as printed on a colour comics section.
This block starts from: `blacks` (0.1), `cyan` (#0f9ad6), `levels` (3), `magenta` (#e2386a), `saturation` (1.35), `valueSteps` (2), `yellow` (#fbe034). It shares one shader, and so every setting, with the other palette blocks of comicBlocks, so it swaps for any of them with `StyleKit.swap(entry, other, { keepSettings = true })`.
## What it gives up in motion
The palette is worked out per pixel from the colour this block reads, so it holds still with the picture and adds no marks of its own: nothing slides or crawls. Where the light changes slowly across a surface a tint edge sits on the surface and moves only when the light moves; each step between tints is a short soft ramp, so it never flickers between two tints. Textured surfaces can break into small tint patches; put a flattening fill before it (toonBlocks' celFill) for clean areas. Nothing changes on the clock.
## How it treats content
- Opaque things: printed in the palette's flat tints; deep shadows go solid black, near whites to paper.
- Transparent things (glass, water): printed by the colour seen through them.
- Particles and smoke: printed like everything else; soft gradients turn into a few tint steps.
- Sky: printed in the palette, usually one or two flat tints of cyan.
- Fog: fog greys colours toward the paper, so far things print in paler tints.
- Skinned characters: printed in the palette like everything else, no sliding.
- Foliage: printed in flat tints; dense leaves can go patchy, a flattening fill before it helps.
- World text: letters keep their contrast but take palette colours; exclude labels whose colour matters.
- Black stays black: unlit pixels stay black (solid black ink).
- Dim rooms: not a Tone block, so it does not ask for the dim guard: it only re-colours, it lays no light sheet.
# Comic noir (styleLook)
Noir comic ink: black and white with big solid shadow shapes, a heavy brush line and a clean white page; small detail falls away into flat black.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("comicNoir")`. Keep your own line with `applyLook("comicNoir", { keep = { "line" } })`.
Blocks: comicBlocks `noirBlacks` (fill, entry `fill`), toonBlocks `toonBrushLine` (line, entry `line`), starterBlocks `plainPaper` (ground, entry `paper`).
This look's entries: `fill`, `line`, `paper`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. It has no `screen`; add one with `StyleKit.add("dotScreen", { id = "screen" })`. `StyleKit.swap("paper", "paperKraft")` changes the paper.
Recipe scene: `comicBlocks.recipes.recipeNoir` (open it in the editor to see this look set up on a small still life).
# Daily newspaper strip (styleLook)
A black and white daily newspaper strip: solid blacks, a grey middle printed as a coarse swollen newspaper dot screen, a pen line and yellowed cheap newsprint.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("dailyStrip")`. Keep your own line with `applyLook("dailyStrip", { keep = { "line" } })`.
Blocks: comicBlocks `noirThreeTone` (fill, entry `fill`), toneScreens `newsprintScreen` (tone, entry `screen`), styleKit `depthLine` (line, entry `line`), paperBlocks `paperNewsprint` (ground, entry `paper`), comicBlocks `newsprintPress` (medium, entry `press`).
This look's entries: `fill`, `screen`, `line`, `paper`, `press`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. Its `screen` is a tone screen, so `StyleKit.swap("screen", "lineScreen")` takes any of toneScreens' 16. `StyleKit.swap("paper", "paperKraft")` changes the paper.
The line is styleKit's `depthLine`, the cheapest clean ink line, so the whole look stays lean. For a bolder comic line swap it: `StyleKit.swap("line", "toonComicLine")` (toonBlocks, about 0.9 ms more on the test machine).
Recipe scene: `comicBlocks.recipes.recipeDailyStrip` (open it in the editor to see this look set up on a small still life).
# Golden-age four colour (styleLook)
A golden-age comic page: flat colour in a small palette of quarter tints, printed as cyan, magenta, yellow and black dot screens that form rosettes, slightly out of register, under a bold black ink line on yellowed newsprint.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("goldenAgeFourColour")`. Keep your own line with `applyLook("goldenAgeFourColour", { keep = { "line" } })`.
Blocks: comicBlocks `goldenAgePalette` (colour, entry `palette`), toneScreens `processFourColour` (colour, entry `screen`), styleKit `depthLine` (line, entry `line`).
This look's entries: `palette`, `screen`, `line`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. Its `screen` is four-colour process, a Colour block: `StyleKit.swap("screen", "processFourColourOnSurfaces")` lays the rosettes on surfaces, and for a tone screen remove it and add one under the same id (`StyleKit.remove("screen")`, then `StyleKit.add("lineScreen", { id = "screen" })`). It has no `paper`; add one with `StyleKit.add("paperKraft", { id = "paper" })`.
Recipe scene: `comicBlocks.recipes.recipeGoldenAge` (open it in the editor to see this look set up on a small still life).
# Manga screentone
Blocks: comicBlocks `noirThreeTone` (fill, entry `fill`), toneScreens `dotScreen` (tone, entry `screen`), toonBlocks `toonPenLine` (line, entry `line`), comicBlocks `speedLines` (medium, entry `speed`), starterBlocks `plainPaper` (ground, entry `paper`).
A black and white manga page: big solid blacks with a grey band that prints as fine screentone dots, a crisp pen line, a white sheet, and focus lines round the edge of the frame aiming the eye at the middle.
```luau
StyleKit.applyLook("mangaScreentone")
StyleKit.remove("speed") -- calm scenes: no focus lines
StyleKit.swap("screen", "lineScreen") -- line tone instead of dots
```
This look's entries: `fill`, `screen`, `line`, `speed`, `paper`. Its `screen` is a tone screen, so `StyleKit.swap("screen", ...)` takes any of toneScreens' 16. Page preset: `ComicPanels.applyPage("mangaAction")` (comicPanels) lays it in a manga panel stack with a sound effect.
# Misprinted pulp (styleLook)
A cheap pulp comic: dull muddy inks, coarse rough four-colour screens swollen with dot gain, plates badly out of register and brown-yellowed newsprint.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("misprintedPulp")`. Keep your own line with `applyLook("misprintedPulp", { keep = { "line" } })`.
Blocks: comicBlocks `pulpPalette` (colour, entry `palette`), toneScreens `processFourColour` (colour, entry `screen`), styleKit `depthLine` (line, entry `line`), comicBlocks `plateShiftHeavy` (raster, entry `register`).
This look's entries: `palette`, `screen`, `line`, `register`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. Its `screen` is four-colour process, a Colour block: `StyleKit.swap("screen", "processFourColourOnSurfaces")` lays the rosettes on surfaces, and for a tone screen remove it and add one under the same id (`StyleKit.remove("screen")`, then `StyleKit.add("lineScreen", { id = "screen" })`). It has no `paper`; add one with `StyleKit.add("paperKraft", { id = "paper" })`.
Recipe scene: `comicBlocks.recipes.recipeMisprintedPulp` (open it in the editor to see this look set up on a small still life).
# Modern flat colour (styleLook)
A modern digital comic: clean flat local colour with three crisp value steps, fine tints, a confident comic ink line and no print artefacts.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("modernFlatColour")`. Keep your own line with `applyLook("modernFlatColour", { keep = { "line" } })`.
Blocks: comicBlocks `modernFlatPalette` (colour, entry `palette`), styleKit `depthLine` (line, entry `line`).
This look's entries: `palette`, `line`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. It has no `screen`; add one with `StyleKit.add("dotScreen", { id = "screen" })`. It has no `paper`; add one with `StyleKit.add("paperKraft", { id = "paper" })`.
The line is styleKit's `depthLine`, the cheapest clean ink line, so the whole look stays lean. For a bolder comic line swap it: `StyleKit.swap("line", "toonComicLine")` (toonBlocks, about 0.9 ms more on the test machine).
Recipe scene: `comicBlocks.recipes.recipeModernFlat` (open it in the editor to see this look set up on a small still life).
# One-colour spot (styleLook)
Black, white and one spot colour: noir blacks, a dot screen in the greys, and red picked out wherever the scene is red, under a comic ink line.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("oneColourSpot")`. Keep your own line with `applyLook("oneColourSpot", { keep = { "line" } })`.
Blocks: comicBlocks `noirThreeTone` (fill, entry `fill`), toneScreens `dotScreen` (tone, entry `screen`), styleKit `depthLine` (line, entry `line`), comicBlocks `spotColourByHue` (colour, entry `spot`), starterBlocks `plainPaper` (ground, entry `paper`).
This look's entries: `fill`, `screen`, `line`, `spot`, `paper`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. Its `screen` is a tone screen, so `StyleKit.swap("screen", "lineScreen")` takes any of toneScreens' 16. `StyleKit.swap("paper", "paperKraft")` changes the paper.
The line is styleKit's `depthLine`, the cheapest clean ink line, so the whole look stays lean. For a bolder comic line swap it: `StyleKit.swap("line", "toonComicLine")` (toonBlocks, about 0.9 ms more on the test machine).
Recipe scene: `comicBlocks.recipes.recipeOneColourSpot` (open it in the editor to see this look set up on a small still life).
# Pop-art dots (styleLook)
Pop art: bold primary flat colour, big even Ben-Day dots in the middle tones, a heavy poster outline on a white page.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("popArtDots")`. Keep your own line with `applyLook("popArtDots", { keep = { "line" } })`.
Blocks: comicBlocks `popArtPalette` (colour, entry `palette`), toneScreens `benDayTint` (tone, entry `screen`), toonBlocks `toonPosterLine` (line, entry `line`), starterBlocks `plainPaper` (ground, entry `paper`).
This look's entries: `palette`, `screen`, `line`, `paper`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. Its `screen` is a tone screen, so `StyleKit.swap("screen", "lineScreen")` takes any of toneScreens' 16. `StyleKit.swap("paper", "paperKraft")` changes the paper.
Recipe scene: `comicBlocks.recipes.recipePopArt` (open it in the editor to see this look set up on a small still life).
# Pulp magazine cover
Blocks: comicBlocks `pulpPalette` (colour, entry `palette`), toneScreens `processFourColour` (colour, entry `screen`), styleKit `depthLine` (line, entry `line`), comicBlocks `plateShiftSubtle` (raster, entry `register`), comicBlocks `pulpPress` (medium, entry `press`).
The painted-cover energy of a pulp magazine printed cheaply: saturated reds, yellows and blues snapped to a few tints, printed as coarse rosettes on warm paper, deep spotted blacks, a heavy line and ink spreading into the sheet.
```luau
StyleKit.applyLook("pulpCover")
StyleKit.set("palette", { saturation = 1.2 }) -- a little calmer
```
This look's entries: `palette`, `screen`, `line`, `register`, `press`. Its `screen` is four-colour process, a Colour block: `StyleKit.swap("screen", "processFourColourOnSurfaces")` lays the rosettes on surfaces, and for a tone screen remove it and add one under the same id. It has no `paper`; add one with `StyleKit.add("paperKraft", { id = "paper" })`. Page preset: `ComicPanels.applyPage("pulpCover")` (comicPanels) adds the cover layout, a red masthead and a tagline.
# Sunday strip (styleLook)
A Sunday newspaper colour strip: cheerful flat colour in a few strong tints, a coarse newspaper dot screen in the shadows, a comic ink line, yellowed cheap newsprint with ink spreading into it and plates a touch out of register.
Apply it with one call: `require("~styleKit.StyleKit").applyLook("sundayStrip")`. Keep your own line with `applyLook("sundayStrip", { keep = { "line" } })`.
Blocks: comicBlocks `sundayPalette` (colour, entry `palette`), toneScreens `newsprintScreen` (tone, entry `screen`), styleKit `depthLine` (line, entry `line`), paperBlocks `paperNewsprint` (ground, entry `paper`), comicBlocks `plateShiftSubtle` (raster, entry `register`), comicBlocks `newsprintPress` (medium, entry `press`).
This look's entries: `palette`, `screen`, `line`, `paper`, `register`, `press`. Every comicBlocks look uses the same entry names, so a call written for one works on every look that has that entry. Its `screen` is a tone screen, so `StyleKit.swap("screen", "lineScreen")` takes any of toneScreens' 16. `StyleKit.swap("paper", "paperKraft")` changes the paper.
The line is styleKit's `depthLine`, the cheapest clean ink line, so the whole look stays lean. For a bolder comic line swap it: `StyleKit.swap("line", "toonComicLine")` (toonBlocks, about 0.9 ms more on the test machine).
Recipe scene: `comicBlocks.recipes.recipeSundayStrip` (open it in the editor to see this look set up on a small still life).
# Two-colour spot print
Blocks: comicBlocks `duotoneRed` (colour, entry `palette`), toneScreens `dotScreen` (tone, entry `screen`), styleKit `depthLine` (line, entry `line`), paperBlocks `paperNewsprint` (ground, entry `paper`), comicBlocks `finePress` (medium, entry `press`).
The whole page printed in black and one spot colour on cream newsprint: `duotoneRed` (Colour) carries the middle tones and shadows in red, `dotScreen` (Tone) lays round dots in the darker tones, styleKit's `depthLine` inks the edges, `paperNewsprint` (Ground) is the sheet and `finePress` (Medium) prints it.
```luau
StyleKit.applyLook("twoColourSpotPrint")
StyleKit.swap("palette", "duotoneBlue") -- the same print in blue
```
Recipe scene: `comicBlocks.recipes.recipeTwoColourSpot` (open it in the editor to see this look set up on a small still life).
# RecipeStage
Builds one comicBlocks recipe scene: a small still life in late afternoon sun (a red ball, a gold ring, a brushed metal drum, a white block, a cone, a patch of grass and a wall that throws big shadow shapes), a recipe board naming every block of the look by slot and the one call that applies it (left out of the stack so it reads as written), the look's own stack on a synced `StyleStack`, a `RecipeView` camera framing it, and the default player.
Every recipe scene under `recipes/` calls it from its `build.luau`:
```luau
require("~comicBlocks.recipes.RecipeStage").build("comicNoir")
```
It needs only styleKit, comicBlocks and the looks' own packages (toneScreens, toonBlocks, paperBlocks) and the engine's built-in meshes and materials.
# Daily newspaper strip recipe
A black and white daily newspaper strip: solid blacks, a grey middle printed as a coarse swollen newspaper dot screen, a pen line and yellowed cheap newsprint.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| fill | `fill` | `noirThreeTone` | `grey = 0.6`, `threshold = 0.18` |
| tone | `screen` | `newsprintScreen` | `dark = 0.3`, `flatten = 0`, `light = 0.7`, `maxCover = 0.6` |
| line | `line` | `depthLine` | `width = 1.5` |
| ground | `paper` | `paperNewsprint` | `tint = #ece0bf` |
| medium | `press` | `newsprintPress` | `fade = 0.3` |
One call puts the same look on any scene: `StyleKit.applyLook("dailyStrip")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# Golden-age four colour recipe
A golden-age comic page: flat colour in a small palette of quarter tints, printed as cyan, magenta, yellow and black dot screens that form rosettes, slightly out of register, under a bold black ink line on yellowed newsprint.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| colour | `palette` | `goldenAgePalette` | block defaults |
| colour | `screen` | `processFourColour` | `blackGen = 0.4`, `cellPx = 6`, `cyan = #1a94c8`, `gain = 0.35`, `levels = 4`, `magenta = #d6336e`, `offsetCM = [1.2, 0.3, -0.5, -1]`, `offsetYK = [-0.8, 0.7, 0, 0]`, `paper = #f0e3c0`, `rough = 0.35`, `yellow = #f7d93a` |
| line | `line` | `depthLine` | `width = 1.7` |
One call puts the same look on any scene: `StyleKit.applyLook("goldenAgeFourColour")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# Misprinted pulp recipe
A cheap pulp comic: dull muddy inks, coarse rough four-colour screens swollen with dot gain, plates badly out of register and brown-yellowed newsprint.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| colour | `palette` | `pulpPalette` | block defaults |
| colour | `screen` | `processFourColour` | `blackGen = 0.2`, `cellPx = 8`, `cyan = #4a8ea0`, `gain = 0.55`, `levels = 3`, `magenta = #b9505e`, `paper = #e6d3a6`, `rough = 0.6`, `yellow = #e3cc62` |
| line | `line` | `depthLine` | `width = 1.9` |
| raster | `register` | `plateShiftHeavy` | block defaults |
One call puts the same look on any scene: `StyleKit.applyLook("misprintedPulp")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# Modern flat colour recipe
A modern digital comic: clean flat local colour with three crisp value steps, fine tints, a confident comic ink line and no print artefacts.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| colour | `palette` | `modernFlatPalette` | block defaults |
| line | `line` | `depthLine` | `width = 1.6` |
One call puts the same look on any scene: `StyleKit.applyLook("modernFlatColour")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# Comic noir recipe
Noir comic ink: black and white with big solid shadow shapes, a heavy brush line and a clean white page; small detail falls away into flat black.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| fill | `fill` | `noirBlacks` | block defaults |
| line | `line` | `toonBrushLine` | block defaults |
| ground | `paper` | `plainPaper` | block defaults |
One call puts the same look on any scene: `StyleKit.applyLook("comicNoir")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# One-colour spot recipe
Black, white and one spot colour: noir blacks, a dot screen in the greys, and red picked out wherever the scene is red, under a comic ink line.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| fill | `fill` | `noirThreeTone` | block defaults |
| tone | `screen` | `dotScreen` | `dark = 0.35`, `flatten = 0`, `light = 0.75`, `maxCover = 0.55` |
| line | `line` | `depthLine` | `width = 1.7` |
| colour | `spot` | `spotColourByHue` | block defaults |
| ground | `paper` | `plainPaper` | block defaults |
One call puts the same look on any scene: `StyleKit.applyLook("oneColourSpot")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# Pop-art dots recipe
Pop art: bold primary flat colour, big even Ben-Day dots in the middle tones, a heavy poster outline on a white page.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| colour | `palette` | `popArtPalette` | block defaults |
| tone | `screen` | `benDayTint` | `cellPx = 13`, `dark = 0.35`, `flatten = 1`, `keepColour = 0.8`, `levels = 2`, `light = 0.95`, `maxCover = 0.55`, `print = 0.35` |
| line | `line` | `toonPosterLine` | block defaults |
| ground | `paper` | `plainPaper` | block defaults |
One call puts the same look on any scene: `StyleKit.applyLook("popArtDots")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# Sunday strip recipe
A Sunday newspaper colour strip: cheerful flat colour in a few strong tints, a coarse newspaper dot screen in the shadows, a comic ink line, yellowed cheap newsprint with ink spreading into it and plates a touch out of register.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| colour | `palette` | `sundayPalette` | block defaults |
| tone | `screen` | `newsprintScreen` | `dark = 0.12`, `flatten = 0.8`, `light = 0.55`, `maxCover = 0.75` |
| line | `line` | `depthLine` | `width = 1.8` |
| ground | `paper` | `paperNewsprint` | `thirst = 0.9`, `tint = #f1e4bd` |
| raster | `register` | `plateShiftSubtle` | block defaults |
| medium | `press` | `newsprintPress` | block defaults |
One call puts the same look on any scene: `StyleKit.applyLook("sundayStrip")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# Two-colour spot print recipe
A cheap two-colour comic: the whole page printed in black and one spot red on cream newsprint, the red carrying the middle tones and shadows, round dots in the darker tones, a comic ink line and a light press.
Open this scene to see the look on a small sunlit still life (a red ball, a gold ring, a metal drum, a white block, a cone and a wall throwing big shadow shapes) beside a board naming every block. Press Play to walk round it and watch the look in motion.
| Slot | Entry | Block | Settings |
|---|---|---|---|
| colour | `palette` | `duotoneRed` | block defaults |
| tone | `screen` | `dotScreen` | `dark = 0.2`, `flatten = 0.6`, `light = 0.6`, `maxCover = 0.5` |
| line | `line` | `depthLine` | `width = 1.7` |
| ground | `paper` | `paperNewsprint` | `thirst = 0.6`, `tint = #f2e8cf` |
| medium | `press` | `finePress` | block defaults |
One call puts the same look on any scene: `StyleKit.applyLook("twoColourSpotPrint")`. Change one part with `StyleKit.swap(entry, block)` or `StyleKit.set(entry, { ... })`.
# comicBlocks tests
Checks the package against styleKit's block rules and against what its docs promise, partly on the presented frame of a small set the suite builds itself (a white wall, a row of red boxes, a floor and a camera of its own), since the test runner empties the scene.
- **Rules:** all twenty-two blocks are installed from comicBlocks, pass `StyleKit.checkBlock` and sit in their slots: every colour choice in Colour (palettes and duotones as chain blocks), spot colour in Colour, plate shift in Raster, speed lines in Medium.
- **Works after a plain install:** every block each of the eleven looks names ships in a package an install of comicBlocks brings (comicBlocks, toneScreens, styleKit, toonBlocks, paperBlocks, starterBlocks).
- **One change:** every look applies in one `StyleKit.applyLook`, uses only the shared entry names (`fill`, `palette`, `screen`, `line`, `paper`, `spot`, `register`, `press`, `speed`), and `keep = { "line" }` holds a line across a look change.
- **Noir and spot colour on the frame:** noir takes the red boxes to black and white ink (under a third of their plain chroma); spot colour by hue keeps them red under a black-and-white page.
- **Still misregistration:** under the heaviest plate shift, two settled frames a second apart match.
- **Clean removal:** golden age, noir and pop art each change the frame, and a clear puts it back within 0.5 of 255.
The scene's shared stack, the viewport camera and the test set are put back after each test. Run with `zero tests run comicBlocksTests` or `asset.resolve("comicBlocksTests", "testSuite"):run()`. It takes about a minute.
## Known limits
The tests judge regions by mean colour; they do not grade how a look reads at a glance, which the showcase and the package README's captures do. The `comicWorld` workflow is not run here.
# comicWorld
Turn an existing world, scene or installed kit into a comic book look with comicBlocks, toneScreens and comicPanels, without destroying anything.
## What it does
1. **Survey.** Reads what is there before changing anything: the scene, the style stack now, the lights and whether they change over time, the screen UI, particles, the player and other characters, world labels, transparent things, toon or outlined objects, colours that carry gameplay meaning, how fast the camera moves, and which comic packages are installed.
2. **Record.** Saves the stack exactly as `StyleKit.describe()` reports it (entries and options) and `ComicPanels.state()`, and the unstyled presented frame under `/zero/source/tmp/comic/<subject>/`, so everything can be put back.
3. **Pick.** Turns the asked look (or a proposed one) into one of the eleven comic looks: `goldenAgeFourColour`, `comicNoir`, `sundayStrip`, `dailyStrip`, `modernFlatColour`, `oneColourSpot`, `popArtDots`, `misprintedPulp`, `twoColourSpotPrint`, `mangaScreentone`, `pulpCover`; chooses page screens (fast camera) or screens on surfaces (slow camera) and any swaps.
4. **Apply.** One `StyleKit.applyLook` call, keeping the existing Line entries when `keepLine` is set (and the Medium slot when panels are asked for), then up to three rounds of tuning against presented frames with `StyleKit.set`.
5. **Panels.** Only when `panels` names a layout: `ComicPanels.setLayout(layout, { cameras })` and `ComicPanels.matchLook()`, checked with `ComicPanels.state()` and a presented capture.
6. **Readability.** Excludes world labels, gives the player and enemies roles, groups and masks characters and toon objects, keeps gameplay colours apart (spot hue, masks or exclusion), checks the UI, that black stays black and that nothing flashes faster than 3 Hz.
7. **Measure.** The Lookbook's numbers against the stack from before when lookbookKit is installed, or presented frames before and after a pan; the GPU passes from `zero profiler gpu` (rows labelled `post.sk.`) and the whole frame from `zero profiler cost`; the low quality tier.
8. **Report.** Answers with the look, the stack before and after, the tuning, the panels, every exclusion, group, mask and role, the checks, the numbers, the problems left, and the calls that undo it all: `StyleKit.load(before.entries, { ... })` for the old stack, `StyleKit.clear()`, `ComicPanels.off()`, clearing exclusions and groups, and `StyleKit.clearChannel(id)` for each role.
It is non-destructive: the comic packages edit no material and this run changes none. The look comes off with `StyleKit.clear()` (or by deleting the `StyleStack` entity) and the panels with `ComicPanels.off()`.
## What it needs
comicBlocks installed (it brings styleKit, toneScreens, toonBlocks, paperBlocks and starterBlocks; inkBlocks is optional), and comicPanels when panels are asked for. The motion check uses lookbookKit when the world has it and falls back to presented frames in a pan when it does not.
## Starting it
zero workflow start --name comicWorld --args '{"subject":"main","look":"golden age with heavy dots"}'
zero workflow start --name comicWorld --args '{"look":"comicNoir","keepLine":true}'
zero workflow start --name comicWorld --args '{"look":"sunday strip","panels":"several:threeTier"}'
- `subject`: the world, a scene name or an installed kit (default: the loaded scene).
- `look`: the comic look in the asker's words or a look id (default: the run proposes one).
- `keepLine`: `true` keeps the Line entries already in the stack (default `false`).
- `panels`: a ComicPanels layout id for one camera through the panels, or `several:<layout>` for per-player extra cameras (default: no panels).
## Known limits
- Extra panel views get the panel page's own print treatment, not the look's blocks: the stack runs only on the presented frame (styleKit Known limit #17427).
- Installing packages with several dependencies can take a while (#21420).
- The web build was not checked from here (#20946).
# toneScreens
Halftone and tone screens for styleKit: the dots and lines of printed pictures as stackable Tone blocks. Round dots, flat Ben-Day tints, square, diamond and chain dots, line and cross-line screens and a coarse newspaper screen, each in two forms: a **page screen** that holds still on the screen like a printed page, and a **screen on surfaces** that stays on things as the camera moves. Four-colour process (CMYK) plates separate the picture into cyan, magenta, yellow and black dot screens that form rosettes and can be printed out of register.
- Dot size really follows tone: the inked share of each cell equals the coverage the picture asks for.
- Screens never shimmer: where a screen would get too fine to draw, it melts into its flat tone first.
- Every screen block shares one shader and one set of settings, so any screen swaps for any other in one change.
- The screens are also a pure-math shader module (`shaders/halftone.shaderModule`) that any material or package can include.
The package depends on styleKit alone. Nothing in it is comic specific: it serves comic looks (comicBlocks builds on it), manga screentone, printed posters, newspaper photos and engravings alike.
Version 1.0.10. Needs styleKit 1.8.3. 1.0.10 fixes Ben-Day tints printing more than `maxCover`: the tints (`levels`) were even steps of the whole 0 to 1 range, so with two tints every middle tone jumped to half cover, where round dots touch in a hard black-and-white checker, and the darkest tint printed solid whatever `maxCover` said. They are now even steps of 0 to `maxCover`, so Ben-Day dots stay apart. Screens with `levels` 0 and screens with `maxCover` 1 print exactly as before. The examples that name toonBlocks, paperBlocks, starterBlocks or inkBlocks blocks need that Cookbook package installed (comicBlocks brings all but inkBlocks).
Published first as `halftoneScreens` 1.0.0; the same blocks, settings and shader module ship here under the name toneScreens, so a world on the old name swaps the install and changes nothing else (block ids are the same; a shader that includes the module includes `~toneScreens.shaders.halftone`).
## Install
Search ZeroMind for **toneScreens** and install the package from the ZeroMind panel (or with `zeromind.install` and its guid). Installing it registers every block with no code: they show in `StyleKit.blocks({ slot = "tone" })` at once.
## Quick start
```luau
local StyleKit = require("~styleKit.StyleKit")
StyleKit.add("dotScreen", { id = "screen" }) -- round dots, still on the page
StyleKit.swap("screen", "lineScreen") -- a line screen instead: one change
StyleKit.swap("screen", "dotOnSurfaces") -- dots that stay on things as the camera moves
StyleKit.set("screen", { cellPx = 10, angle = 30 }) -- coarser, at another angle
StyleKit.remove("screen") -- four-colour process is a Colour block, not a Tone one,
StyleKit.add("processFourColour", { id = "screen" }) -- so it replaces a tone screen by remove and add: plates and rosettes
StyleKit.set("screen", { offsetCM = { 1.5, 0, 0, -1.2 } }) -- print it a little out of register
StyleKit.remove("screen") -- the frame as it was
```
From the shell: `zero styleKit add dotScreen`, `zero styleKit swap screen lineScreen`, `zero styleKit set screen cellPx 10`.
`add` appends a new entry every time it runs; for setup code that may run again use `StyleKit.load` (it replaces the whole stack) or check `StyleKit.describe()` first.
## The blocks
Every block is in the Tone slot. Page screens hold still on the screen; the `...OnSurfaces` form of each lays the same screen on the surfaces of things.
| Block | Slot | What it does | Starts from |
|---|---|---|---|
| `dotScreen` | Tone | Round halftone dots on the page: dot size follows darkness, dots touch in a checker at half tone and open into white holes in the darks. | `shape` 0, `cellPx` 7, `angle` 45 |
| `dotOnSurfaces` | Tone | The round dot screen laid on surfaces, staying on things as the camera moves. | `shape` 0, `cellPx` 8, `angle` 45 |
| `benDayTint` | Tone | Flat, even Ben-Day tints on the page: each area is one even dot size picked from a few mechanical tints. | `shape` 0, `cellPx` 6, `levels` 3, `flatten` 0.85, `gamma` 0.8, `maxCover` 0.6 |
| `benDayOnSurfaces` | Tone | The flat Ben-Day tints laid on surfaces. | `cellPx` 7, `levels` 3, `flatten` 0.85, `gamma` 0.8, `maxCover` 0.6 |
| `squareDotScreen` | Tone | Square dots that grow with darkness until they close into solid ink, on the page. | `shape` 1, `cellPx` 7, `angle` 45 |
| `squareDotOnSurfaces` | Tone | The square dot screen on surfaces. | `shape` 1, `cellPx` 8 |
| `diamondDotScreen` | Tone | Diamond dots that meet as an exact checkerboard at half tone, on the page. | `shape` 2, `cellPx` 7, `angle` 0 |
| `diamondDotOnSurfaces` | Tone | The diamond dot screen on surfaces. | `shape` 2, `cellPx` 8, `angle` 0 |
| `chainDotScreen` | Tone | Chain (elliptical) dots that link into chains in the middle tones, for smooth skin and sky gradients, on the page. | `shape` 3, `cellPx` 7 |
| `chainDotOnSurfaces` | Tone | The chain dot screen on surfaces. | `shape` 3, `cellPx` 8 |
| `lineScreen` | Tone | Parallel lines that thicken with darkness, like a mezzotint or line-screen print, on the page. | `shape` 4, `cellPx` 6, `angle` 30 |
| `lineOnSurfaces` | Tone | The line screen on surfaces. | `shape` 4, `cellPx` 7, `angle` 30 |
| `crossLineScreen` | Tone | A grid of crossed lines that thicken with darkness, on the page. | `shape` 5, `cellPx` 7 |
| `crossLineOnSurfaces` | Tone | The cross-line screen on surfaces. | `shape` 5, `cellPx` 8 |
| `newsprintScreen` | Tone | A coarse newspaper halftone: big round dots at a low ruling, swollen by dot gain, with ragged edges, on the page. | `cellPx` 12, `gain` 0.55, `rough` 0.6, `maxCover` 0.9, `flatten` 0.7 |
| `newsprintOnSurfaces` | Tone | The coarse newspaper screen on surfaces. | `cellPx` 13, `gain` 0.55, `rough` 0.6, `maxCover` 0.9, `flatten` 0.7 |
| `processFourColour` | Colour | Four-colour process: the picture separated into cyan, magenta, yellow and black plates, each an angled dot screen, forming rosettes; plates can be printed out of register. Page screens. | `cellPx` 6, `angles` 15/75/0/45 |
| `processFourColourOnSurfaces` | Colour | Four-colour process with the plates laid on surfaces. | `cellPx` 7 |
Each block's own README (`StyleKit.block(id).path .. "/README.md"`) says what it gives up in motion and how it treats opaque things, transparent things, particles, sky, fog, skinned characters, foliage and world text.
## The shared settings
### Screen blocks (every block except the two process blocks)
All sixteen screen blocks draw through `blocks/screen.shader` and take the same settings. The block only changes the defaults.
| Setting | Range (default) | What it does |
|---|---|---|
| `shape` | 0 to 5 (0) | 0 round, 1 square, 2 diamond, 3 chain, 4 line, 5 cross-line. |
| `onSurfaces` | 0 or 1 (0) | 0 a page screen that holds still on the screen; 1 a screen laid on the surfaces. |
| `cellPx` | 3 to 48 (7) | Screen pitch in reference pixels (1080p). A screen on surfaces keeps about this size at any distance. |
| `cellCm` | 0 to 200 (0) | On surfaces only: above 0 sizes the screen in centimetres on things, so it shrinks with distance and melts into flat tone far away. |
| `angle` | -90 to 180 (45) | Screen angle in degrees. 45 is the classic single-screen angle; line screens read best at 30 to 60. |
| `ink` | colour (near black) | The ink colour of the dots. |
| `amount` | 0 to 1 (1) | How strongly the dots print. |
| `light` | 0 to 1 (0.88) | Brightness above which no ink prints. |
| `dark` | 0 to 1 (0.08) | Brightness below which the screen prints its fullest cover. |
| `gamma` | 0.2 to 4 (1) | Below 1 more dots in the middle tones, above 1 fewer. |
| `maxCover` | 0 to 1 (0.85) | The most of a cell ink covers in the darkest places (1 prints solid). |
| `levels` | 0 to 8 (0) | Ben-Day tints: above 0 snaps tone to this many flat, even tints. 0 keeps tone continuous. | Since 1.0.10 the tints are even steps of 0 to `maxCover`, so the darkest tint is `maxCover`.
| `gain` | 0 to 1 (0) | Dot gain: ink spreading into the paper, most in the middle tones. |
| `rough` | 0 to 1 (0) | Ragged dot edges from the paper grain and a fine stable noise. |
| `flatten` | 0 to 1 (0.6) | How much of the picture's own shading is lifted out so the dots carry the shade. |
| `print` | 0 to 1 (0) | 0 lays dots over the picture; 1 rebuilds the picture as one ink on blank paper. |
| `keepColour` | 0 to 1 (0) | 0 prints the ink colour; 1 prints each dot in the picture's own colour (coloured dots). |
| `sky` | 0 to 1 (1) | How much the screen prints on the sky. 0 keeps a clean sky. |
### Process blocks (`processFourColour`, `processFourColourOnSurfaces`)
Both draw through `blocks/process.shader`.
| Setting | Range (default) | What it does |
|---|---|---|
| `onSurfaces` | 0 or 1 (0) | Page screens or screens on surfaces. |
| `cellPx` | 3 to 48 (6) | Screen pitch of every plate, reference pixels. |
| `angles` | four degrees (15, 75, 0, 45) | Cyan, magenta, yellow and black plate angles. 30 degrees apart makes small round rosettes. |
| `cyan`, `magenta`, `yellow`, `black` | colours | The process inks. |
| `blackGen` | 0 to 1 (0.6) | How much grey moves into the black plate: 0 muddy three-colour darks, 1 crisp black darks. |
| `levels` | 0 to 8 (0) | Above 0 snaps each plate to this many flat tints (4 gives 0, 25, 50, 75 and 100 percent). |
| `gain` | 0 to 1 (0.15) | Dot gain. |
| `rough` | 0 to 1 (0.15) | Ragged dot edges. |
| `offsetCM` | float4 (0) | Misregistration of the cyan (x, y) and magenta (z, w) plates, reference pixels. A still offset, never a jitter. |
| `offsetYK` | float4 (0) | Misregistration of the yellow (x, y) and black (z, w) plates. |
| `density` | 0.3 to 1.5 (1) | How heavily the colour plates are inked. |
| `sky` | 0 to 1 (1) | How much the plates print on the sky. |
`StyleKit.settingsOf(id)` lists any block's settings with docs, defaults and ranges.
## Swapping
Any tone screen swaps for any other tone screen with one call, and swapping back restores the settings the old block had:
```luau
StyleKit.add("dotScreen", { id = "screen" }) -- a screen to start from
StyleKit.swap("screen", "chainDotScreen") -- the new block's own defaults
StyleKit.swap("screen", "crossLineScreen", { keepSettings = true }) -- carry your tuning (cellPx, light, dark, ink...) across
StyleKit.swap("screen", "dotOnSurfaces", { keepSettings = true }) -- page screen to surface screen, same tuning
```
Because every screen is the same shader, `StyleKit.set("screen", { shape = 2 })` or `{ onSurfaces = 1 }` also changes the screen in place; swapping blocks is the readable way, since `describe()` then names what is drawn. The process blocks (`processFourColour`, `processFourColourOnSurfaces`) are Colour blocks, not Tone, so a tone screen and a process block do not swap for each other (the swap is refused, naming both slots): `StyleKit.remove("screen")` and then `StyleKit.add` the other under the same id. The two process blocks swap for each other.
### Page screen or screen on surfaces?
- **Page screen** (`dotScreen`, `lineScreen`, ...): the dots never move, the picture moves under them. Nothing crawls or shimmers. This is how a printed page behaves, and it is the safe default for a fast camera.
- **Screen on surfaces** (`dotOnSurfaces`, ...): the dots stick to walls and floors and keep their size at any distance, so a pan carries them with the world. They slide on moving characters (the marks come from world position), and transparent things and particles take the screen of the surface behind them. Set `cellCm` above 0 for dots sized in the world that shrink with distance.
## Stacking with the Style Cookbook
A screen is the Tone slot: it sits after Fill (flat colour, washes, noir shapes) and before Line, Colour and Ground. Because the first Ground block publishes the shared paper, a screen's `rough` reads that paper's grain, so dots break on the same tooth the lines do.
```luau
local StyleKit = require("~styleKit.StyleKit")
-- Four-colour dots on newsprint under a bold comic line
StyleKit.load({
{ id = "fill", block = "celFill" }, -- toonBlocks: flat cel colour
{ id = "screen", block = "processFourColour", settings = { cellPx = 7, levels = 4, gain = 0.3 } },
{ id = "line", block = "toonComicLine" }, -- toonBlocks
{ id = "paper", block = "paperNewsprint" }, -- paperBlocks
}, { holdRate = 8 })
-- A screentone page: black and white, line screen in the greys, pen line, plain paper
StyleKit.load({
{ id = "screen", block = "lineScreen", settings = { cellPx = 5, angle = 45, flatten = 0.9 } },
{ id = "line", block = "inkPenLine" }, -- inkBlocks (optional: install it yourself)
{ id = "paper", block = "plainPaper" }, -- starterBlocks
{ id = "mono", block = "duotone" }, -- styleKit
})
-- Engraving: cross-line screen on surfaces over an ink wash
StyleKit.load({
{ id = "wash", block = "inkWash" }, -- inkBlocks (optional: install it yourself)
{ id = "screen", block = "crossLineOnSurfaces", settings = { cellPx = 6, amount = 0.7 } },
{ id = "line", block = "inkNibLine" }, -- inkBlocks (optional: install it yourself)
{ id = "paper", block = "paperParchment" }, -- paperBlocks
})
```
Two screens can share the Tone slot: the second is laid over the first by its strength and mask, for example a `dotScreen` everywhere and a `lineScreen` only in the distance with `StyleKit.setMask("far", { kind = "depth", near = 20, far = 1000, soft = 0.4 })`.
comicBlocks' looks are built on these screens and name the screen entry `screen`. In `sundayStrip`, `dailyStrip`, `popArtDots`, `oneColourSpot` and `twoColourSpotPrint` it is a tone screen, so `StyleKit.swap("screen", ...)` takes any of the 16 here. In `goldenAgeFourColour` and `misprintedPulp` it is four-colour process (Colour slot): it swaps only for `processFourColourOnSurfaces`, and a tone screen goes in by `StyleKit.remove("screen")` then `StyleKit.add("<screen>", { id = "screen" })`.
## Using the shader module
Any shader can draw the same screens:
```wgsl
#include "~toneScreens.shaders.halftone"
// coverage of a round 45 degree screen at screen position px, for a tone of 0.4
let c = ht_tone(luma, 0.88, 0.08, 1.0, 0.85);
let ink = ht_cover(px / cellPx, radians(45.0), 0, c, aa, 0.0, 0.0);
```
| Function | What it gives |
|---|---|
| `ht_cover(p, angle, shape, c, aa, rough, n)` | Ink coverage 0..1 at `p` (in cells) for wanted coverage `c`, antialiased over `aa` cells. |
| `ht_sd(q, shape, c)` | Signed distance to the ink edge, for blending two screens crisply. |
| `ht_rotate(p, a)` | Rotate a position into a screen's axes. |
| `ht_tone(luma, light, dark, gamma, maxCover)` | Wanted coverage from brightness. |
| `ht_tint(c, levels, soft)` | Snap a tone to a few even Ben-Day tints. |
| `ht_gain(c, gain)` | Dot gain. |
| `ht_cmyk(rgb, blackGen)` | Four-colour separation with grey component replacement. |
| `ht_lift(rgb, value)` | A colour at a lighter value with its hue kept. |
| `ht_melt(aa)` | How far a screen melts into flat tone at this cell size. |
| `ht_noise(p)`, `ht_hash(p)` | Small stable noise for ragged edges. |
The module has no bindings and depends on nothing, not even styleKit. Its README lists the same table.
## Multiplayer
The screens are entries in the scene's style stack, which lives on the synced `StyleStack` entity: every player sees the same screen with the same settings, and it is saved with the scene. The blocks keep no state of their own and change nothing on the clock. `StyleKit.setLocal(entry, settings)` lays settings over an entry on one machine only (for example a coarser screen for one player's accessibility setting), and `StyleKit.setLocalEntry(id, entry)` adds a whole local entry for a short effect.
## Quality and cost
Each screen block is one full-frame pass that reads the frame, depth, normals and the ground. A process block is also one pass: the four plates are drawn in the same pass. Screens on surfaces cost a little more than page screens (they reconstruct the surface position from depth). Larger `cellPx` costs nothing more. On the low tier styleKit draws the stack at its low settings; `StyleKit.setQuality("low")` shows what a phone sees and `StyleKit.timings()` gives milliseconds per pass.
### Measured cost
**How it was measured.** 14 November 2026, native desktop app on engine @builtin fbf1751, in the showcase's busy desert (desertKit's oasis valley with its terrain, palms and props, plus 2,500 extra lit boxes and balls in front of the camera from `showcase/LookCost`), drawn at exactly **1920 x 1080** (`viewport.setSize`). Only the engine's own frame cost, never wall clock (this machine was busy with other engines and builds the whole time):
- **GPU, stack passes:** every pass the look adds (its blocks plus styleKit's shared capture, prep, soft field and dim guard) from GPU timestamp queries, the median of each over 150 frames, summed. Repeated runs agree to 0.01 ms.
- **GPU, whole frame:** the engine's own GPU time per frame (`zero profiler cost`, drm_fdinfo) with the look on minus with it off, alternated many times: 25 short rounds plus 5 steady rounds (3 s settle, 8 s windows) for the default look, 15 for the heaviest. This is what a person timing "look off, look on" sees; it is a little above the passes because switching a look on also turns on the frame copies the passes read.
- **Engine-thread CPU:** the engine thread's own CPU time per frame (thread clock, not wall clock; the per-frame median, which ignores the spikes other processes cause), look on minus off, in the same steady rounds. A plain frame of this busy scene costs about 40 ms of engine-thread CPU on this development build, and single readings swing by ±2 to 4 ms, so a change smaller than about 1 ms cannot be told from noise. styleKit's own script work per frame is given beside it.
**Each screen at 1920 x 1080 in the busy scene** (stack pass alone): `dotScreen` and `benDayTint` 0.05 ms, `newsprintScreen` 0.05, `processFourColour` 0.13 (four plates in one pass), and every Tone block shares styleKit's dim guard (two passes, 0.08 ms, once for the whole stack). The screens on surfaces add their steady surface read. None of them adds measurable engine-thread CPU. Whole looks built from these, with whole-frame GPU and CPU, are in comicBlocks' README.
**Web: not measured.** The browser build could not be run from this engine (it runs natively and starts only native clients). The screens are the same WGSL on WebGPU, so on the same graphics card their GPU cost should be close to the numbers above; measure your target with `require("showcase.LookCost")` in the browser build.
## Known limits
- **Page screens hold still while the picture moves under them.** That is how print behaves; in a fast pan the eye reads it as a screen in front of the world. Use the `...OnSurfaces` form when the dots should travel with the world.
- **Screens on surfaces slide on moving characters.** The marks come from world position. Keep a character crisp with a group mask (`StyleKit.options({ groups = { { playerId } } })`, then `StyleKit.setMask("screen", { kind = "group", group = 1, invert = true })`).
- **Transparent things and particles are not in the depth**, so a screen on surfaces gives them the screen of the surface behind. Page screens are not affected.
- **Fine contrasty detail can beat against a fine screen.** Raise `cellPx` if it does.
- **World text collects ink.** Exclude labels a player must read: `StyleKit.options({ exclude = { labelId } })`.
- **Offscreen captures and render-to-texture cameras do not draw the stack** (styleKit's Known limits, #17427). Look at a screen with a presented capture.
- **The `dotOnSurfaces` block summary says it "holds still on the screen like a printed page"**; it is the on-surfaces form and stays on things as the camera moves (its `gives` line and README are right).
## Tests
The package ships `tests/toneScreensTests.testSuite`: every screen passes styleKit's block check in the Tone slot, every page screen has a screen on surfaces with the same settings, any screen swaps for any other in one change, and on the presented frame dot coverage follows tone, a still camera gives a still screen (four-colour misregistration included) and removing a screen puts the frame back exactly. Run it with `zero tests run toneScreensTests`. 6 of 6 pass in the world it ships from.
## Removing it
`StyleKit.remove("screen")` takes one screen off; `StyleKit.clear()` takes the whole look off. The package edits no material, so nothing else needs putting back.