feat(background): add the edges density ramp to pixel_grid - #205
Merged
Conversation
pixel_grid shipped with `radial` — dense at the centre, thinning outwards.
Measuring the reference texture showed the opposite is what a background
actually needs: across the tenths of a band clear of its window, density runs
10.9 · 6.5 · 0.8 · 0.2 · 0.2 · 0.2 · 0.2 · 0.9 · 7.8 · 8.8 %
heavy at both edges, effectively empty through the middle 60 %. That is a
vignette, and it is what keeps the texture off whatever sits in the centre —
here a terminal window. None of the five existing ramps can express it: the
one-way ramps are monotonic and `radial` is its exact inverse.
`Edges` is that inverse, asserted as such in the test rather than described:
`radial(p) + edges(p) == 1` at every sampled point.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #204.
What
pixel_gridshipped withradial— dense at the centre, thinning outwards. Porting it onto a real piece showed the opposite is what a background usually needs.Measured on the reference texture, in a horizontal band clear of its window, cell density across the tenths of the frame:
Heavy at both edges, effectively empty through the middle 60 %. A vignette — which is what keeps the texture off whatever sits in the centre (here, a terminal window). None of the five existing ramps can express it: the one-way ramps are monotonic, and
radialis exactly backwards.I had first read the texture as "denser toward the right" from two crops, and built the demo on that. Two crops from opposite sides of the frame both look like a one-way ramp; only measuring the whole width shows the symmetry.
How
One arm, and the test asserts the relationship rather than describing it:
plus the vignette's own shape — zero at the centre, ~1 at both left and right edges.
Docs
SKILL.md's ramp row now says whatedgesis for, and thatradialis its inverse.cargo test --workspacegreen,cargo fmt --checkandcargo clippy --all-targets -- -D warningsclean.