fix(shadow): kill cast/self-shadow holes on imported meshes + shadow-parity bench tooling#70
Merged
Merged
Conversation
…uette-reliability gate + double-sided fallback
…U, rotation-correct occluder attribution
…o kill camera-dependent floor-shadow holes
…aceted meshes keep real self-shadows
…ith play/pause, speed, and scrub
…eep self-shadows from light-back-facing occluders
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 a family of cast-shadow and self-shadow holes on imported (non-watertight / faceted) meshes, and adds shadow-debugging tooling to the bench. All shadow fixes live in
packages/core(shared by vanilla/React/Vue) plus the vanilla/React/Vue caster glue; the tooling is bench-only.The work was driven by a new shadow-mask parity oracle (below): it reduces both engines to a binary "in shadow?" mask and reports a single
shadowIoUper view, so each fix was validated against three.js as ground truth rather than by eyeballing.Shadow fixes (
packages/core+ renderer glue)fill-rule: nonzero.Measured (shadow-mask oracle, IoU = shape parity, 1.0 = perfect)
Bench tooling (
bench/)shadow-oracle.html): captures the real compositor (Playwright screenshot / tab-capture) instead ofhtml-to-image, which silently dropped ~99.5% of the 3D-transformed shadow SVGs. Diffs across all meshes with per-polygon attribution.shadowIoU, missing/extra pixel counts, rotation-correct occluder attribution. Headless drivers:bench/scripts/shadow-mask-verdict.mjs,shadow-oracle-verdict.mjs.t∈[0,2π)(sin/cos/…), with play/pause, speed, and scrub.Tests & build
pnpm testgreen (core 1075, polycss 747, react 435, vue 434, fonts 45) andpnpm build(packages + website) green.AGENTS.mdupdated to reflect the new shadow caster rules.