Skip to content

V3: Plotter rework (hatch, flow, contour, squiggle, spiral, stipple) - #186

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

git-chad merged 107 commits into
git-chad/shader-lab-v3-planfrom
git-chad/v3-plotter

Conversation

@git-chad

Copy link
Copy Markdown
Collaborator

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

What

A rebuild of Plotter as a pen-plotter drawing. The user tested it and accepted it.

  • Modes:
    • Hatch: crosshatch layers by tone.
    • Flow: dense lines following the forms (reference 33).
    • Contour: smooth tone contours (reference 32).
    • Squiggle: rows that wave in the dark areas.
    • Spiral: one continuous spiral that thickens with tone.
    • Stipple: dots by density (reference 32).
  • Pen: width, pressure, wobble, ink bleed; color from ink, source, or three pens.
  • Paper: color with grain, or transparent.
  • Styles: Crosshatch (default), Three Pens, Flow Lines, Contour, Squiggle, Spiral, Stipple.
  • Uses the shared blur pyramid for a smooth tone field, and runs in the transform role so transparent paper works.
  • The original parameters and their defaults are kept, so saved plotter layers still open.

Also saves references 32 to 34 in the visual references guide.

Tests

bun run check passes. plotter.mjs adds 106 checks, all passing:

  • Blank paper stays blank, and every mode draws strokes.
  • Hatch line coverage, crosshatch, and tone.
  • Pressure, wobble, and squiggle amplitude.
  • Three pens and transparent paper.
  • Legacy defaults are unchanged.
  • Editor/runtime parity, history, duplication, save/reopen and export.

The full bun run test:composition suite was started but not completed before pushing, at the user's request.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 24, 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 24, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR should not merge until transparent stroke compositing is corrected.

Summary

The PR rebuilds Plotter with six drawing modes, pen and paper settings, presets, matching editor and SDK passes, and composition tests.

  • Transparent strokes are composited with coverage twice, weakening their edges.
  • Some mode-specific controls and preset paper behavior do not match the rendered settings.
  • The duplication test does not exercise a real Plotter parameter.

Reviews (1) · Last reviewed commit: "Rework Plotter into a pen plotter: hatch..."

Comment thread src/renderer/plotter-pass.ts
Comment thread src/lib/editor/config/layer-registry.ts Outdated
Comment thread src/lib/editor/config/plotter-styles.ts
Comment thread tests/composition/plotter.mjs
@git-chad git-chad mentioned this pull request Sep 27, 2026
…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.
…e on buttons

Clear the active paint layer when the layer stops being paintable (selection,
mode, visibility or lock change) so Paint never resumes without Edit Paint.
Only preventDefault on Space for non-interactive targets so focused buttons
and links still activate.
…note

Relief now outputs the sampled source alpha (editor and runtime) instead of forcing 1. The preset note is deduplicated and states that Height From and Amount are not part of a style.
Divide the ray and core light by its coverage before blending with the
source so glow over transparent or translucent pixels is not darkened by
being treated as premultiplied. Applied to the runtime mirror too.
…ansforms

Allow shared hard edges for polygons when rotation step and jitter are zero.
Derive extended outlines from the outermost band's offset and rotation via a
shared bandLocal helper, in both the app and runtime copies.
… 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
@git-chad
git-chad force-pushed the git-chad/v3-plotter branch from 22b32c4 to b6eb17f Compare October 1, 2026 14:03
@git-chad
git-chad force-pushed the git-chad/v3-dots-mesh branch from 575c221 to 297b5d3 Compare October 1, 2026 14:53
@git-chad
git-chad changed the base branch from git-chad/v3-dots-mesh to git-chad/shader-lab-v3-plan October 1, 2026 15:14
@git-chad
git-chad merged commit b6eb17f into git-chad/shader-lab-v3-plan Oct 1, 2026
4 of 5 checks passed

This branch was successfully deployed

1 active deployment
Preview — b6eb17fa 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