fix: remove the hard seam across the sky at the far scenery crest - #21
Merged
Conversation
The horizon glow ramped up to full alpha and then its rect simply ended at sceneryFarCrestY, while the inter-plane haze started at alpha 55 on that same line. Both edges landed on one row, drawing a straight line right across the sky — on the beach scene at the sailboat mast top (SEA_HORIZON - 0.078). The glow now fills past the crest (CLAMP holds the end color, and the silhouettes cover it) and the haze ramps in from above the crest instead of appearing at full strength on it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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.
The bug
A straight horizontal line ran across the whole sky, well above the water — on the beach scene it sat at
SEA_HORIZON - 0.078(the sailboat's mast top), i.e. exactly atsceneryFarCrestY.Two bands both terminated hard on that one row:
drawHorizonGlowramped alpha0 → 95and then its rect just stopped at the crest, dropping back to 0 in a single pixel.drawInterPlaneHazestarted at alpha 55 on that same line, with nothing above it.The fix
TileMode.CLAMPholds the end color and the silhouettes cover it — so the band never ends on a visible edge.0 → 55 → 0) instead of appearing at full strength on it.Both scene planes still read the same; only the discontinuity is gone.
Verification
Rendered BEACH/DUSK at 1680×1050 on an emulator via a throwaway instrumentation harness that logs the sharpest row-to-row luminance steps in a clean sky column, at
mainand with this change:What's left is the shoreline/reflection ramp at
SEA_HORIZON, a genuine edge spread over ~10 rows rather than a 1px step.compileDebugKotlinand the unit tests pass.🤖 Generated with Claude Code