mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-23 01:59:39 +08:00
Fix composite1.fsh breaking on AMD
This commit is contained in:
parent
3ee5e1e8e0
commit
dc2028aa09
@ -929,7 +929,7 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
bool ShadowBounds = false;
|
bool ShadowBounds = false;
|
||||||
if(shadowDistanceRenderMul > 0.0) ShadowBounds = length(p3_shadow) < max(shadowDistance,0);
|
if(shadowDistanceRenderMul > 0.0) ShadowBounds = length(p3_shadow) < shadowDistance;
|
||||||
|
|
||||||
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;
|
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;
|
||||||
|
|
||||||
@ -957,7 +957,7 @@ void main() {
|
|||||||
|
|
||||||
bool outsideShadowMap = shadowmapindicator < 1;
|
bool outsideShadowMap = shadowmapindicator < 1;
|
||||||
|
|
||||||
if(outsideShadowMap && !iswater) Shadows = min(max(lightmap.y-0.8, 0) * 25,1);
|
if(outsideShadowMap && !iswater) Shadows = min(max(lightmap.y-0.8, 0.0) * 25,1.0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -991,10 +991,13 @@ void main() {
|
|||||||
bool dodistantSSS = outsideShadowMap && LabSSS > 0.0;
|
bool dodistantSSS = outsideShadowMap && LabSSS > 0.0;
|
||||||
float screenShadow = rayTraceShadow(lightCol.a*sunVec, fragpos_rtshadow, interleaved_gradientNoise(), dodistantSSS);
|
float screenShadow = rayTraceShadow(lightCol.a*sunVec, fragpos_rtshadow, interleaved_gradientNoise(), dodistantSSS);
|
||||||
screenShadow *= screenShadow;
|
screenShadow *= screenShadow;
|
||||||
|
|
||||||
Shadows = min(screenShadow, Shadows);
|
Shadows = min(screenShadow, Shadows);
|
||||||
|
|
||||||
if (outsideShadowMap) SSS *= Shadows;
|
if (outsideShadowMap) SSS *= Shadows;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
if (outsideShadowMap) SSS = vec3(0.0);
|
if (outsideShadowMap) SSS = vec3(0.0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user