[claude] Procedural cloud layer below the floating island (#256) #339

Merged
claude merged 1 commits from claude/issue-256 into main 2026-03-24 05:07:04 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
f36d1cb69d fix: correct procedural cloud shader — fix GLSL undefined vars and simplex noise
Some checks failed
CI / validate (pull_request) Failing after 11s
CI / auto-merge (pull_request) Has been skipped
The cloud layer shader had two bugs preventing it from rendering:
1. GLSL fragment shader referenced JS variables (CLOUD_LAYER_Y, CLOUD_THICKNESS,
   CLOUD_OPACITY) as plain identifiers — these are undefined in GLSL scope and
   caused shader compilation failure. Fixed by interpolating their values into
   the template literal with ${...}.
2. Simplex noise implementation was incorrect: x_/y_ raw indices used directly
   instead of rescaled x/y for b0/b1/h; a0/a1 used fract() instead of the
   correct gradient coefficient formula; p0-p3 swizzles were transposed.
   Replaced with the canonical Ian McEwan / Stefan Gustavson snoise3.

Fixes #256

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 01:05:58 -04:00