Skip to content

V3: Outline layer - #188

Merged
git-chad merged 114 commits into
git-chad/shader-lab-v3-planfrom
git-chad/v3-outline
Oct 1, 2026
Merged

git-chad merged 114 commits into
git-chad/shader-lab-v3-planfrom
git-chad/v3-outline

Conversation

@git-chad

Copy link
Copy Markdown
Collaborator

Stacked on #187. Part of the V3 stack (parent #150); nothing merges to main until the plan is complete.

What

A new Outline layer (Core, after Annotations), for the scalloped cloud outline in reference 34.

  • Distance field: jump flood, an exact GPU distance transform. Pass count grows with log2 of the reach, which is capped at 512 px.
    • The seed texture keeps both the nearest boundary pixel and the nearest sparse boundary pixel (one every Spacing), which draws the scallops and dashes.
  • Outline source: Cutout (alpha), Dark shapes, or Light shapes, with a Threshold.
  • Style: Solid, Double, Dashed, or Scalloped (a union of circles along the contour).
  • Controls: Offset (negative draws inside), Width, Rings with Ring Gap, and Spacing.
  • Color: line color, fill between the shape and its outline, and Show Image (off keeps only the line).
  • Styles: Stroke, Cloud, Sticker, Contour Rings, Cut Line, Double.

Tests

bun run check passes. outline.mjs adds 79 checks, all passing:

  • The outline sits at the offset with a clear gap before it.
  • Rings repeat outward, and a negative offset draws inside.
  • Fill, line-only mode, and the scalloped cloud bulge.
  • Dashes break the line, and dark shapes can be outlined.
  • Editor/runtime parity, history, duplication, save/reopen and export.

The full bun run test:composition suite wasn't run.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shader-lab Ready Ready Preview Oct 1, 2026 2:04pm UTC

@greptile-apps

greptile-apps Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 2/5

[Medium risk] Adds a new outline effect layer to the rendering pipeline.

The PR is not safe to merge until the outline rendering failures are addressed.

Summary

Adds an Outline effect layer with GPU distance-field rendering, editor controls and presets, runtime export support, and composition tests.

  • Small shapes can lose dashed or scalloped styling.
  • Valid large-offset ring settings can exceed the flood reach; negative scalloped offsets do not draw inside.
  • The duplication test does not exercise its intended mutation.

Reviews (1) · Last reviewed commit: "Add an Outline layer: solid, double, das..."

Comment thread src/renderer/outline-pass.ts Outdated
Comment thread src/renderer/outline-pass.ts
Comment thread src/renderer/outline-pass.ts Outdated
Comment thread tests/composition/outline.mjs
…roup failures

Media load callbacks now ignore replaced or removed passes and pending loads are cleared on disposal. Strict-mode pass failures are reported once at the originating pass instead of at every group boundary.
Publishing now drops every descendant of a hidden group and clears the
parentId of any retained layer (the audio source) whose parent was removed,
so the published scene passes hierarchy validation on reopen.
Cap the neighbor row and column search to two cells each side so the
worst-case cellAt count per fragment is 25 instead of unbounded in the
packed minimum-size, maximum-stroke configuration. Mirrored in the
runtime package.
… duplicate test

- Extend the gaussian pyramid to 10 levels so radii up to 400 document pixels keep increasing (app and SDK copies)
- Add a oneOf visibility condition and gate Focus, Focus Range and Center to the modes that read them
- Make the duplicate independence test change a real parameter
Add Mask Feather parameter definition for brush masks so the timeline shows the user-facing label. Update the manual QA Limits paragraph to match the Feather and keyframe contract.
Derive output alpha from the red, green and blue samples so displaced
fringes survive at transparent edges. Skip the blur pyramid when distance
and frost are both zero, in the app and runtime copies.
…est, video benchmark

- Image background keeps the input alpha instead of forcing opaque (editor and runtime passes)
- Duplication check edits the real mode param and asserts both layers
- Add a --dots scenario set (graph, blobs, plexus) to the effect video benchmark
…trols

Mesh drift is scaled to keep each point inside its cell, and each quad
splits along whichever diagonal is interior. Dot and link controls that
Mesh ignores are hidden, via a new oneOf visibility condition.
… style paper, duplicate test

- Un-premultiply ink color in transparent-paper output so alpha coverage is not applied twice (app and SDK pass)
- Show Angle for hatch and squiggle (new oneOf visibility condition); show Cross Angle only in hatch
- Plotter styles also set paper to color
- Duplication test now edits the real mode param and checks both layers
- Scale transparent-paper toner by input alpha so empty pixels stay clear
- Mix Amount in premultiplied space so partial amounts do not darken toner
- Skip the blur pyramid when Amount is zero
- Update a real parameter in the duplicate-independence check
- Mirror the pass changes into the React runtime
…ate test

Seed small shapes at their top-left tip so Cut Line and Cloud style them.
Raise the flood reach cap to 4096 so distant rings survive.
Let Scalloped draw inside for negative offsets.
Make the duplicate-independence check update a real parameter.
@git-chad
git-chad force-pushed the git-chad/v3-photocopy branch from a2e17e1 to 0d565d7 Compare October 1, 2026 14:03
@git-chad
git-chad force-pushed the git-chad/v3-outline branch from 4150019 to f9738ee Compare October 1, 2026 14:03
@git-chad
git-chad changed the base branch from git-chad/v3-photocopy to git-chad/shader-lab-v3-plan October 1, 2026 15:14
@git-chad
git-chad merged commit f9738ee into git-chad/shader-lab-v3-plan Oct 1, 2026
4 of 5 checks passed

This branch was successfully deployed

1 active deployment
Preview — f9738ee6 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant