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>