Background scene: phacelleGradBound 6.3 -> 7.0 from Libby's measured sup

Libby measured sup |grad| 6.63 at |side| = 1.5, n = 0 (CultLib PR #1 head
990521b3); 7.0 adds margin. The shader passes roughness 0 as a literal, so no
1/(1-n) factor is needed; the comment records it. Pass 1 under SwiftShader:
terrain 288.8 ms vs 287.5 at 960x540 level 0, 75.3 vs 75.7 at level 3 (noise).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Nibu 2026-11-01 06:37:01 +00:00
commit b2d6d32cc4
2 changed files with 9 additions and 9 deletions

View file

@ -38,10 +38,9 @@ computed from `SNOISE_LIPSCHITZ` (CultMath's constant for `snoise`) in `world.ts
envelope (fbm plus the erosion amplitude) the step uses the envelope's bound alone and Phacelle is envelope (fbm plus the erosion amplitude) the step uses the envelope's bound alone and Phacelle is
not evaluated. not evaluated.
- The Phacelle gradient bound `phacelleGradBound` (6.3) is **an empirical probe, not a proof**: - The Phacelle gradient bound `phacelleGradBound` (7.0) is Libby's measured sup (6.63 at
the maximum `|grad|` of the cos component over 4,194,304 random points (5.04) times 1.25 |side| = 1.5, n = 0, CultLib PR #1 head 990521b3) plus margin: a measurement, not a proof.
(`harness/scene/drive.cjs phacelle`). Replace it with Libby's bound; until then the march is The shader fixes roughness n = 0; a nonzero n needs the bound divided by (1 - n).
only as safe as that probe.
- The bound makes grazing rays crawl. A ray that exhausts its steps while still below the highest - The bound makes grazing rays crawl. A ray that exhausts its steps while still below the highest
terrain is ended as a distant surface (fog hides it). That is a visible approximation, not a terrain is ended as a distant surface (fog hides it). That is a visible approximation, not a
hit proven by the march. hit proven by the march.

View file

@ -23,11 +23,12 @@ export const WORLD = {
// The stripe wave vector and normalization the terrain feeds cultmath_phacelle. // The stripe wave vector and normalization the terrain feeds cultmath_phacelle.
erodeSide: [1.7, 0, 1] as const, erodeSide: [1.7, 0, 1] as const,
erodeNorm: 0.5, erodeNorm: 0.5,
// Lipschitz bound of the phasor's cos component, NOT a proof: max |grad| over 4,194,304 random // Bound on |grad| of the phasor's cos component for the side and norm above. Libby measured a
// points of the z = 0 slice with the side and norm above was 5.04 (`drive.cjs phacelle`, // sup of 6.63 at |side| = 1.5, n = 0 (CultLib PR #1 head 990521b3); 7.0 adds margin. The
// 2026-10-31), x 1.25. |value| <= 1 holds by construction (the output is a normalized phasor). // shader passes roughness n = 0 as a literal, so the doc envelope max(10, 1.25|side|)/(1-n)
// Replace with the bound Libby supplies; until then the march is as safe as that probe. // needs no 1/(1-n) factor here; if n ever becomes nonzero, divide this bound by (1 - n).
phacelleGradBound: 6.3, // |value| <= 1 holds by construction (the output is a normalized phasor).
phacelleGradBound: 7.0,
// World tree at the origin. // World tree at the origin.
tree: { tree: {
trunkHeight: 38, trunkHeight: 38,