Repository navigation
Blend National echo edges instead of squaring them off - #23
Merged
Merged
Conversation
Smooth mode fell back to a hard nearest-cell block whenever any of the four sample neighbors was missing or no-coverage, so every echo boundary rendered as a row of flat 1 km squares against a smoothly interpolated interior. The renderer now weights only the valid neighbors and renormalizes: an invalid cell still contributes no value at any weight, but it no longer collapses the fragment. The surviving weight is the fragment's coverage and scales palette opacity by its square root, so the outermost half-cell ring fades rather than terminating in a square while a lone valid corner stays visible at half opacity. Display-only and Smooth-only: the painted footprint is unchanged because an invalid nearest cell already paints nothing, Native stays exact nearest sampling at full opacity, and interrogation is untouched in both modes. sampling.ts mirrors the shader contract for unit tests; docs/25 records the edge behavior and states plainly that neither mode adds resolution to a 1 km mosaic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Owner-reported: at close zoom the national mosaic looks blocky with mushy interiors. Root cause in
Smooth: the shader bilinearly blended the four neighbors of a sample, but if any of them was missing or no-coverage it fell back to a hard nearest-cell block — so every echo boundary drew as a row of flat 1 km squares while the interior stayed smooth.Now the renderer weights only the valid neighbors and renormalizes. An invalid cell still contributes no value at any weight (
Smoothnever bridges an invalid status), but it no longer collapses the fragment. The surviving weight is the fragment's coverage and scales palette opacity by its square root, so the outermost half-cell ring fades instead of terminating in a square, while a lone valid corner still renders at half opacity and never vanishes.Strictly display-only and
Smooth-only:Nativeremains exact nearest-cell sampling at full opacity;src/national-radar/sampling.tsis the shader's testable mirror and was updated in lockstep;docs/25records the edge contract.Honest scope
This does not add resolution. MRMS CONUS is a 0.01° (~1 km) grid, so past roughly zoom 9 each measured cell covers many screen pixels and stays individually visible — that is the data, not the renderer. Close-range structure is the selected-site Level II product's job (250 m gates). The doc now says so explicitly.
Validation
npm run verifygreen: 318 frontend tests (sampling suite rewritten: renormalized weighting, sentinel codes provably excluded, edge softening, lone-corner floor, fade bounds), build, rustfmt, clippy, 134 Rust tests, cargo check. No Rust changes.🤖 Generated with Claude Code