Skip to content

The 3D pair, and the modes every other filter was missing - #69

Merged
IAmJSD merged 1 commit into
mainfrom
t3code/filter-parity
Aug 29, 2026
Merged

The 3D pair, and the modes every other filter was missing#69
IAmJSD merged 1 commit into
mainfrom
t3code/filter-parity

Conversation

@IAmJSD

@IAmJSD IAmJSD commented Aug 29, 2026

Copy link
Copy Markdown
Member

Two filters and a parity pass: 129 → 131, and the dialogs now match Photoshop's as well as the menu does.

Filter ▸ 3D

Generate Bump Map and Generate Normal Map — the two Adobe kept when they took 3D out, because texture artists kept using them. A bump map is how high each point is; a normal map is the same field differentiated and packed into RGB, so a flat surface comes out the familiar lavender, which is (0, 0, 1) written down. Both use a Sobel gradient rather than two-tap differences, or every edge that is not axis-aligned comes out stair-stepped.

The parity pass

Every filter that predates this work was opened next to its Photoshop dialog and the missing controls added:

filter what it grew
Add Noise Gaussian distribution alongside uniform
Lens Blur seven iris shapes, blade curvature, rotation, specular threshold, noise
Smart Sharpen Remove: Gaussian / Lens / Motion Blur, with an angle
Reduce Noise colour-noise reduction, Sharpen Details, Remove JPEG Artifact
Mezzotint its ten screens (dots, lines, strokes)
Color Halftone four adjustable screen angles
Lens Flare four lens types, each with its own ghost pattern
Fibers a randomiser
Extrude pyramids, level-vs-random depth, solid front faces
Tiles what fills the gaps
Diffuse darken only, lighten only, anisotropic
Wind blast and stagger
Trace Contour lower and upper edge
Glowing Edges smoothness
Oil Paint bristle detail, shine, lighting angle
Wave several generators, triangle and square, both scales
ZigZag around centre / out from centre / pond ripples
Spherize horizontal-only and vertical-only
Shear, Displace undefined-area handling
Maximum, Minimum squareness against roundness
Offset all three edge behaviours
Radial Blur a real method choice, quality, and a centre
Polar Coordinates a direction that reads as one

Some of these are more than a slider. Smart Sharpen subtracts the blur it is actually trying to undo — sharpening against a Gaussian when the softness came from motion puts halos across the direction of travel. Reduce Noise's colour stage rebuilds each channel from the pixel's own luminance plus smoothed chroma, which is why chroma can be smoothed hard without the picture going soft. Lens Blur's round iris at the standard threshold still goes through schist_fx, and therefore the GPU; a shaped one is a different kernel and runs in the filter.

Two test fixes fell out

  • The GPU wiring test built its filter values from a bare list, so a filter that grew a parameter was handed a zero for it — and zero is a setting, not "unset". Lens Blur's specular threshold at zero meant it stopped taking the GPU path. It now starts from the filter's own defaults.
  • The neural tests that repoint SCHIST_MODEL_DIR now hold a lock against the two that read it. The harness runs them on threads and the environment is process-wide, so the install test could move the directory out from under a model another test had already decided was installed — about one workspace run in twenty, under load.

Checked

Property tests over all 131, menu cross-check, full workspace suite green (99 binaries), clippy and rustfmt clean, every changed filter eyeballed on a photograph, and the app driven headlessly to confirm the 3D group lands at the top of the Filter menu where Photoshop puts it.

With this, the deliberate gaps are the ones a filter cannot close: no foreground and background colours, so the Sketch group draws black on white; no file picker, so Displace uses a noise field rather than a map file; no canvas widgets, so blur pins are position sliders and Flame rises from the bottom of the selection. Those are in the README.

🤖 Generated with Claude Code

Two filters and a parity pass. 129 to 131, and the dialogs now match
Photoshop's as well as the menu does.

**Filter ▸ 3D**: Generate Bump Map and Generate Normal Map, the two
Adobe kept when they took 3D out, because texture artists kept using
them. A bump map is how high each point is; a normal map is which way it
faces, which is the same field differentiated and packed into RGB.

**The parity pass.** Every filter that predates this work was checked
against its Photoshop dialog, and the missing controls added:

* Add Noise grows Gaussian distribution -- three samples averaged, which
  is the bell the central limit theorem promises -- alongside uniform.
* Lens Blur grows the iris: seven aperture shapes, blade curvature,
  rotation, a specular threshold and noise. A round iris at the standard
  threshold still goes through `schist_fx`, and therefore the GPU; a
  shaped one is a different kernel and runs in the filter.
* Smart Sharpen grows Remove -- Gaussian, Lens or Motion Blur, with an
  angle. Sharpening against a Gaussian when the softness came from motion
  puts halos across the direction of travel; sharpening against the
  motion does not.
* Reduce Noise grows colour-noise reduction (chroma smoothed against the
  pixel's own luminance, which is why it can be smoothed hard), Sharpen
  Details and Remove JPEG Artifact.
* Mezzotint grows its ten screens, Colour Halftone its four adjustable
  screen angles, Lens Flare its four lens types, Fibers its randomiser.
* Extrude grows pyramids, level-versus-random depth and solid front
  faces; Tiles what fills the gaps; Diffuse its darken, lighten and
  anisotropic modes; Wind blast and stagger; Trace Contour lower and
  upper; Glowing Edges smoothness; Oil Paint bristle detail and lighting.
* Wave grows several generators, triangle and square shapes and the two
  scales; ZigZag its three styles; Spherize its two axis modes; Shear and
  Displace their undefined-area handling; Maximum and Minimum squareness
  against roundness; Offset all three edge behaviours; Radial Blur a
  proper method choice, a quality setting and a centre; Polar Coordinates
  a direction that reads as one.

Two test fixes fall out of it. The GPU wiring test built its filter
values from a bare list, so a filter that grew a parameter was handed a
zero for it -- and zero is a setting, not "unset"; it now starts from the
filter's own defaults. And the neural tests that repoint
`SCHIST_MODEL_DIR` now hold a lock against the two that read it, because
the harness runs them on threads and the environment is process-wide: it
failed about one run in twenty under load.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@IAmJSD
IAmJSD merged commit eacd59d into main Aug 29, 2026
3 checks passed
@IAmJSD
IAmJSD deleted the t3code/filter-parity branch August 29, 2026 12:38
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