fix(bake): stop coarse lines double-drawing across bands#12
Merged
Conversation
Cross-band best-available suppression used one whole-tile (centre + 4 corners) test for every non-point prim. That relaxation exists so opaque area FILLS don't get seam holes — a finer fill is drawn on top and occludes the coarse one. But LINES don't occlude: each per-band archive is a separate client source with no maxzoom cap on the fine bands, so a coarse line kept in any partially-covered seam tile draws twice — the finer band redraws the same RESARE/CTNARE boundary, depth contour or coastline beside it (the reported doubled restricted-area outline at the approach/harbor overlap zoom). Split the suppression by geometry: lines suppress by the tile centre (yield only where the centre has no finer cell); fills keep the 5-corner whole-tile test. Fills are unchanged; line double-draw drops to at most ~1-tile seam slivers where the finer cell genuinely has no data. Add TestCrossBandLineNoDoubleDraw (real US4MD81M+US5MD1MC pair): asserts no tile carrying a line in both bands has its centre covered by a finer cell — fails on the old code (interior double-draws), passes now. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Cross-band best-available suppression used one whole-tile (centre + 4 corners) test for every non-point prim. That relaxation exists so opaque area FILLS don't get seam holes — a finer fill is drawn on top and occludes the coarse one. But LINES don't occlude: each per-band archive is a separate client source with no maxzoom cap on the fine bands, so a coarse line kept in any partially-covered seam tile draws twice — the finer band redraws the same RESARE/CTNARE boundary, depth contour or coastline beside it (the reported doubled restricted-area outline at the approach/harbor overlap zoom).
Split the suppression by geometry: lines suppress by the tile centre (yield only where the centre has no finer cell); fills keep the 5-corner whole-tile test. Fills are unchanged; line double-draw drops to at most ~1-tile seam slivers where the finer cell genuinely has no data.
Add TestCrossBandLineNoDoubleDraw (real US4MD81M+US5MD1MC pair): asserts no tile carrying a line in both bands has its centre covered by a finer cell — fails on the old code (interior double-draws), passes now.