Repository navigation
Shadows under anti-aliasing: the marks moved toward the camera - #51
Merged
Merged
Conversation
With anti-aliasing the shadow work target's shared depth is resolved from one sample point off each pixel's centre; on sloping ground that lies nearer than the mark's centre depth and every mark failed the depth test, so the character shadows vanished (4x). Under anti-aliasing the marks now take Material::depthOffset (slope 1, units 1); without it nothing changes. BozoEngine: local branch dc/msaa-decal-offset (8ee365b), not pushed yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Character shadows vanished with the engine's anti-aliasing on (Video tab; seen at 4x in Norune). They show again at 2x, 4x and 8x.
Engine pin:
d04e9d8, BozoEnginemasterwith TheBozos/BozoEngine#135 merged (and #136, a reference-checker change for the log host only). On it: build, 137/137 suites, save states load back identically, and the end-of-run RAM is byte-identical to36991be.Cause: DC draws its shadow marks into a work target that shares the frame's depth, depth-tested against the ground. With anti-aliasing, that depth is resolved from one sample point off each pixel's centre. On sloping ground it lies nearer than the mark's centre depth, so every mark failed.
Change: while anti-aliasing is on (
Renderer::antiAliasing() >= 2), the marks take the engine's newMaterial::depthOffsetSlope/depthOffsetUnits(1, 1), which moves them toward the camera by up to a pixel's depth slope. Without anti-aliasing nothing changes, as on the GS.Checked:
🤖 Generated with Claude Code