Skip to content

Commit dc2028a

Browse files
committed
Fix composite1.fsh breaking on AMD
1 parent 3ee5e1e commit dc2028a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

shaders/composite1.fsh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ void main() {
929929

930930

931931
bool ShadowBounds = false;
932-
if(shadowDistanceRenderMul > 0.0) ShadowBounds = length(p3_shadow) < max(shadowDistance,0);
932+
if(shadowDistanceRenderMul > 0.0) ShadowBounds = length(p3_shadow) < shadowDistance;
933933

934934
if(shadowDistanceRenderMul < 0.0) ShadowBounds = abs(projectedShadowPosition.x) < 1.0-1.5/shadowMapResolution && abs(projectedShadowPosition.y) < 1.0-1.5/shadowMapResolution && abs(projectedShadowPosition.z) < 6.0;
935935

@@ -957,7 +957,7 @@ void main() {
957957

958958
bool outsideShadowMap = shadowmapindicator < 1;
959959

960-
if(outsideShadowMap && !iswater) Shadows = min(max(lightmap.y-0.8, 0) * 25,1);
960+
if(outsideShadowMap && !iswater) Shadows = min(max(lightmap.y-0.8, 0.0) * 25,1.0);
961961

962962

963963

@@ -991,10 +991,13 @@ void main() {
991991
bool dodistantSSS = outsideShadowMap && LabSSS > 0.0;
992992
float screenShadow = rayTraceShadow(lightCol.a*sunVec, fragpos_rtshadow, interleaved_gradientNoise(), dodistantSSS);
993993
screenShadow *= screenShadow;
994+
994995
Shadows = min(screenShadow, Shadows);
995996

996997
if (outsideShadowMap) SSS *= Shadows;
998+
997999
#else
1000+
9981001
if (outsideShadowMap) SSS = vec3(0.0);
9991002
#endif
10001003
}

0 commit comments

Comments
 (0)