Fix clouds3d: same JS-comment-in-FRAG_SRC-array bug as before

Wrapped the multi-line horizon comment into a single quoted
string. Same bug as the earlier fix but in the new ground code.
Going forward I'll make sure all multi-line comments inside
FRAG_SRC are wrapped in quotes.
This commit is contained in:
Richard Zink committed 2026-10-07 20:42:00 +02:00
1 parent 2ad51141c6
commit 4e035c9c35
1 file changed
+1 -6
+1 -6
View File
@@ -195,12 +195,7 @@ var FRAG_SRC = [
// remain visible against a deep but not void-black sky.
'float skyDarkness = nightFactor * 0.55;',
'col = mix(col, col * (1.0 - skyDarkness), 1.0 - cloud);',
'// Horizon: cast the ray onto the ground plane (y=0) and sample
// the satellite image at that world (x,z) coordinate. As
// the camera drifts forward over time the texture scrolls
// past, giving the illusion of flying over real terrain.
// Distant ground fades toward sky colour (atmospheric
// perspective).
'// Horizon: cast the ray onto the ground plane (y=0) and sample the satellite image at that world (x,z) coordinate. As the camera drifts forward over time the texture scrolls past, giving the illusion of flying over real terrain. Distant ground fades toward sky colour (atmospheric perspective).',
'float tGround = (ro.y > 0.0 && rd.y < -0.001) ? -ro.y / rd.y : -1.0;',
'vec3 hitPoint = ro + rd * tGround;',
'vec2 gUv = vec2(hitPoint.x, hitPoint.z) * 0.04 + 0.5;',