mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-08 03:40:28 +00:00
* M3: glass bends with the reference tool's thick-lens profile and splits its colours over 8 steps (#1885) The backdrop bends most a 1-unit bevel in from the edge, falls off as the 3.5th power of the way out of the curve to nothing `depth` further in, and moves a fifth as much on the bevel itself (it fell off as the square of the way in from the very edge). Dispersion samples each channel at 8 steps along the bend with a triangular window, red moving furthest and blue least (it was three samples, blue furthest), as far apart as the reference tool's: at 100% red and blue move 0.16 of the bend apart (`Glass::DISPERSION_SPREAD`). `Glass::max_bend` bounds red's furthest step, so the backdrop read around a pane covers every sample, and the field margin covers the bevel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M3: glass's bend stays within `max_bend`, checked on a single bright pixel too (#1885) Review follow-up: the bend reaches `depth` × `refraction` a bevel in from the edge, so `Glass::max_bend` drops its 0.999 and bounds it, as a test now checks for several refractions. A single white pixel on black pins the dispersion's triangular window, which a ramp and a flat backdrop can't tell from one centred sample. The parity assessment records the bend, the dispersion and how they were measured against the reference tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M3: glass's flat inside skips the bend's curve, and full dispersion stays within `max_bend` (#1885) Review follow-up: `bend_at` returns 0 straight away past `depth` + the bevel, where the curve and the bevel's easing are both 0, instead of working out a power of 0 for every pixel of a pane's flat inside. A test moves one white pixel along a row under every bend of the profile at full dispersion and checks that no channel ever reads it further out than `Glass::max_bend`, which sizes the backdrop read around a pane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Oleksii Sukholita <oleksii.sukholita@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>