mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-26 18:22:33 +08:00
Revert "intial changes for commit #495"
This reverts commit 4869877f77
.
This commit is contained in:
@ -11,19 +11,16 @@ void GriAndEminShadowFix(
|
||||
float MinimumValue = 0.05;
|
||||
|
||||
// give a tiny boost to the distance mulitplier when shadowmap resolution is below 2048.0
|
||||
// float ResMultiplier = 1.0 + (shadowDistance/8.0)*(1.0 - min(shadowMapResolution,2048)/2048.0)*0.3;
|
||||
float ResMultiplier = 1.0 + (shadowDistance/8.0)*(1.0 - min(shadowMapResolution,2048)/2048.0)*0.3;
|
||||
|
||||
// float DistanceMultiplier = max(1.0 - max(1.0 - length(WorldPos) / shadowDistance, 0.0), MinimumValue) * ResMultiplier;
|
||||
float theDistance = max(1.0 - length(WorldPos) / shadowDistance,0.0);
|
||||
float DistanceMultiplier = mix(0.5, 0.05, theDistance);
|
||||
float DistanceMultiplier2 = mix(1.0, 0.02, theDistance);
|
||||
|
||||
vec3 Bias = (FlatNormal * DistanceMultiplier + WsunVec * DistanceMultiplier2);
|
||||
float DistanceMultiplier = max(1.0 - max(1.0 - length(WorldPos) / shadowDistance, 0.0), MinimumValue) * ResMultiplier;
|
||||
|
||||
vec3 Bias = FlatNormal * DistanceMultiplier;
|
||||
|
||||
// stop lightleaking by zooming up, centered on blocks
|
||||
vec2 scale = vec2(0.5); scale.y *= 0.5;
|
||||
vec3 zoomShadow = scale.y - scale.x * fract(WorldPos + cameraPosition + Bias*scale.y*0.1);
|
||||
if(SkyLightmap < 0.1 && isEyeInWater != 1 && VanillaAO > 0.0) Bias = zoomShadow;
|
||||
vec3 zoomShadow = scale.y - scale.x * fract(WorldPos + cameraPosition + Bias*scale.y);
|
||||
if(SkyLightmap < 0.1) Bias = zoomShadow;
|
||||
|
||||
WorldPos += Bias;
|
||||
}
|
Reference in New Issue
Block a user