fix(sky): seamless night-sky star lattice — no face seams, no flare, round pixel-exact stars
The first night-sky gate (2026-08-23 screenshot) showed three defects:
glowing beams along the cube-face boundaries (fwidth blowup where
adjacent pixels land on different faces lights every neighbourhood star
solid), diffraction-spiked standouts the user rejects ('that is in a
photo only, not in real sky'), and ellipse-stretched stars from scalar
length(fwidth) sizing at oblique view angles.
One rewrite removes all three: stars now live on a seamless 3D lattice
over the unit sphere (no faces, so no seams by construction), each star
resolved through an exact tangent-plane -> screen-pixel 2x2 solve of
the direction derivatives (perfectly round, true pixel sizing at every
view angle, sharper cores), spikes deleted in favour of a soft round
halo on the bright tiers. Guard test updated to pin the new anchors and
forbid both fwidth-face grids and spikes; sky.frag.spv re-pinned.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
508cefdeb1
commit
b8cfee6d08
5 changed files with 58 additions and 46 deletions
|
|
@ -23,8 +23,14 @@ public sealed class EnhancedNightSkyRuleTests
|
|||
Assert.Contains("if (uParamA > 0.5)", code, StringComparison.Ordinal);
|
||||
Assert.Contains("nightSky(normalize(vDir), uint(uParamB))", code, StringComparison.Ordinal);
|
||||
// Screen-pixel star sizing is the reason this exists — the stretched
|
||||
// texture flaw must not creep back in via a fixed-size grid.
|
||||
Assert.Contains("fwidth(g)", code, StringComparison.Ordinal);
|
||||
// texture flaw must not creep back in via a fixed-size grid, and the
|
||||
// cube-face fwidth seams must not return (the 2026-08-23 gate's
|
||||
// glowing "Y"): the crispness anchor is the seamless 3D-lattice
|
||||
// tangent-plane solve on the direction derivatives.
|
||||
Assert.Contains("dFdx(dir)", code, StringComparison.Ordinal);
|
||||
Assert.DoesNotContain("fwidth(g)", code, StringComparison.Ordinal);
|
||||
// No diffraction spikes — user-directed: flare is photographic.
|
||||
Assert.DoesNotContain("spike", code, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue