fix: hide seam between drawPinnedCorners' two independently-warped triangles - #176
Merged
Conversation
…iangles drawPinnedCornersTo() splits a corner-pinned quad into two triangles and warps each one independently via its own DrawTransformedObject pipeline. Their shared diagonal edge gets rounded slightly differently by each triangle's own warp, leaving a visible seam along the diagonal - the same class of fractional-pixel-rounding seam already documented for SceneObjectPlane/SceneObjectSkybox. Fix: pad each triangle's copy of the two shared-edge points outward, away from that triangle's own apex corner, by a couple pixels (padPointAwayFrom()/pinnedCornersSeamPadding) so the two triangles overlap by a hair instead of abutting exactly - same seamPadding pattern already used elsewhere. Verified visually on real hardware via examples/rendererTest's CornerPinGridTest demo (issue #110's suspected repro area): the diagonal line is gone from every tile in the grid at padding=2px, with no visible distortion to the outer silhouette. Fixes #110 Co-Authored-By: Claude Sonnet 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
Fixes #110.
drawPinnedCornersTo()splits a corner-pinned quad into two triangles and warps each independently via its ownDrawTransformedObjectpipeline. Their shared diagonal edge rounds slightly differently between the two, leaving a visible seam — the same class of fractional-pixel-rounding seam already documented (and fixed with a padding trick) forSceneObjectPlane/SceneObjectSkybox.Fix
Added
Renderer.padPointAwayFrom()and nudge each triangle's copy of the two shared-diagonal points outward (away from that triangle's own apex corner) bypinnedCornersSeamPadding(2px), so the two independently-rasterized triangles overlap by a hair instead of abutting exactly.Verification
npm run check— lint, validate, and headless tests all pass (862 tests).examples/rendererTestto a real Roku and ran thecorner-pin-griddemo (CornerPinGridTest, the issue's suggested repro) before/after:Scoped to the two-triangle-split path used by default (unaffected:
splitIntoFour, a separate 4-triangle option not exercised by this demo — worth a follow-up if it turns out to have the same class of seam).🤖 Generated with Claude Code