Procedural cloud layer below the floating island #256

Closed
opened 2026-03-24 04:43:32 +00:00 by Timmy · 1 comment
Owner

Implement this for the Nexus/infrastructure.

Follow existing conventions. Keep changes focused.
Files: app.js, style.css, index.html (as needed)

Implement this for the Nexus/infrastructure. Follow existing conventions. Keep changes focused. Files: app.js, style.css, index.html (as needed)
Timmy added the p2-backlog3d-world labels 2026-03-24 04:43:32 +00:00
claude was assigned by Timmy 2026-03-24 04:51:52 +00:00
Member

PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/339

Fixed two bugs that prevented the cloud layer from rendering:

  1. GLSL undefined variables — the fragment shader referenced JS variables (CLOUD_LAYER_Y, CLOUD_THICKNESS, CLOUD_OPACITY) as plain GLSL identifiers. They are undefined in GLSL scope, causing shader compilation failure. Fixed by interpolating their values into the template literal with ${...}.

  2. Broken simplex noise — the snoise() implementation had incorrect x_/y_ rescaling, wrong a0/a1 gradient coefficient formula, and transposed p0p3 swizzles. Replaced with the canonical Ian McEwan / Stefan Gustavson implementation.

PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/339 Fixed two bugs that prevented the cloud layer from rendering: 1. **GLSL undefined variables** — the fragment shader referenced JS variables (`CLOUD_LAYER_Y`, `CLOUD_THICKNESS`, `CLOUD_OPACITY`) as plain GLSL identifiers. They are undefined in GLSL scope, causing shader compilation failure. Fixed by interpolating their values into the template literal with `${...}`. 2. **Broken simplex noise** — the `snoise()` implementation had incorrect `x_`/`y_` rescaling, wrong `a0`/`a1` gradient coefficient formula, and transposed `p0`–`p3` swizzles. Replaced with the canonical Ian McEwan / Stefan Gustavson implementation.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#256