Skip to content

V3: Feather for brush masks - #182

Merged
git-chad merged 95 commits into
git-chad/shader-lab-v3-planfrom
git-chad/v3-brush-feather
Oct 1, 2026
Merged

git-chad merged 95 commits into
git-chad/shader-lab-v3-planfrom
git-chad/v3-brush-feather

Conversation

@git-chad

Copy link
Copy Markdown
Collaborator

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

What

Requested by the user: brush masks now have Feather.

  • The mask panel shows the Feather slider for Brush (0 to 0.25, same range as Ellipse and Rectangle).
  • The painted mask is sampled on the GPU with a center tap plus three rings (6, 10 and 14 taps) scaled by Feather. The edge fades outward smoothly and stays keyframable, with no CPU re-blur of the paint texture.
  • Feather 0 keeps a hard painted edge.

Brush masks saved before this keep their default Feather of 0.01, which softens their edge very slightly.

Tests

bun run check passes, and the full bun run test:composition suite passes. layer-masks.mjs adds four cases (151 total):

  • Feather 0 keeps a hard edge.
  • Feather 0.12 fades the stroke edge monotonically outward.
  • Far outside the stroke stays untouched.
  • Editor/runtime parity.

The existing brush and Cells paint parity checks still pass.

🤖 Generated with Claude Code

@vercel

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

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The implementation appears safe to merge, with only non-blocking timeline-label and manual-documentation cleanup needed.

Summary

This PR adds keyframable GPU feathering to Brush masks in both the editor and React SDK renderers, exposes the control in the mask panel, and adds automated and manual coverage.

  • Uses a center sample and three weighted sampling rings while preserving a hard edge at Feather 0.
  • Keeps editor and runtime renderer implementations aligned.
  • Adds composition checks for hard edges, soft falloff, unaffected distant pixels, and editor/runtime parity.
  • Leaves two documentation/UI metadata inconsistencies to address.

Reviews (1) · Last reviewed commit: "Add Feather to brush masks"

Comment thread src/components/editor/layer-mask-section.tsx
Comment thread tests/composition/LAYER-MASKS-MANUAL-QA.md
…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.
…fect

Add DotGridPass to the editor and SDK inner-effect factories and to the SDK inner-effect allowlist.
Seed is now part of ErosionStyleValues, so changing it flips the style to Custom and applying a style restores its seed.
…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.
@git-chad
git-chad force-pushed the git-chad/v3-brush-feather branch from 2a3f6b0 to bf01183 Compare October 1, 2026 14:03
@git-chad
git-chad changed the base branch from git-chad/v3-blur to git-chad/shader-lab-v3-plan October 1, 2026 15:14
@git-chad
git-chad merged commit bf01183 into git-chad/shader-lab-v3-plan Oct 1, 2026
5 checks passed

This branch was successfully deployed

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