diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index fa68c2a..6436c82 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -446,16 +446,9 @@ var FRAG_SRC = [ 'float tTerrain = -1.0;', 'if (terrRoots.x > 0.0) tTerrain = terrRoots.x;', 'else if (terrRoots.y > 0.0) tTerrain = terrRoots.y;', - 'if (tTerrain > 0.0 && uElevOn > 0.5 && rd.y < -0.01) {', - 'for (int ti = 0; ti < 4; ti++) {', - 'vec3 hp = ro + rd * tTerrain;', - 'float terrainY = terrElev(hp.xz) * uElevScale - earthDrop(hp.xz);', - 'float dh = terrainY - hp.y;', - 'if (abs(dh) < 0.02) break;', - 'tTerrain -= dh / -rd.y;', - 'if (tTerrain < 0.1 || tTerrain > 90.0) { tTerrain = -1.0; break; }', - '}', - '}', + // Keep cloud occlusion on the curved Earth horizon only. Detailed + // terrain-height clipping made the deck boil and cut holes. + 'if (tTerrain < 0.1) tTerrain = -1.0;', // Cloud march. The output is the cloud's effective colour and // coverage (alpha); the render pass uses alpha-blend so the // terrain mesh from the previous pass shows through transparent