From ed26e1939ecc5715d049fa714ca47d3046cfad10 Mon Sep 17 00:00:00 2001 From: Merlin1809 <88194861+Merlin1809@users.noreply.github.com> Date: Sun, 9 Nov 2025 20:01:50 +0100 Subject: [PATCH] Fix terrain shadows on clouds --- shaders/lib/volumetricClouds.glsl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/shaders/lib/volumetricClouds.glsl b/shaders/lib/volumetricClouds.glsl index 349aaa8..6d7653c 100644 --- a/shaders/lib/volumetricClouds.glsl +++ b/shaders/lib/volumetricClouds.glsl @@ -832,9 +832,8 @@ vec4 raymarchCloud( sh = vec3(shadow2D(shadow, shadowPos).x); #endif } - - sunScattering *= sh; - moonScattering *= sh; + #else + const vec3 sh = 1.0; #endif #if AURORA_LOCATION > 0 @@ -876,7 +875,7 @@ vec4 raymarchCloud( sunShadowMask += getCloudShape(ALTOSTRATUS_LAYER, 0, shadowStartPos, CloudLayer2_height, CloudLayer2_height) * SC_parameters.altostratus.y * (1.0-abs(mainLightVec.y)); #endif - vec3 lighting = getCloudLighting(LayerIndex, shapeWithDensity, shapeWithDensityFaded, sunShadowMask, sunScattering, moonScattering, indirectShadowMask, skyScattering*skylightOcclusion, rayPosition, backScatterPhase, phaseLevels, backScatterPhase2, phaseLevels2); + vec3 lighting = getCloudLighting(LayerIndex, shapeWithDensity, shapeWithDensityFaded, sunShadowMask, sunScattering*sh, moonScattering*sh, indirectShadowMask, skyScattering*skylightOcclusion, rayPosition, backScatterPhase, phaseLevels, backScatterPhase2, phaseLevels2); float lightningIntensity = 0.0;