mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-27 02:32:39 +08:00
fix mishandling of cloud shadow related toggles. fix clouds not appearing behind translucent things. remove random spaces from shaders.properties
This commit is contained in:
@ -206,9 +206,8 @@ vec4 GetVolumetricFog(
|
||||
vec3 sh_forClouds = sh;
|
||||
#endif
|
||||
|
||||
#ifdef VL_CLOUDS_SHADOWS
|
||||
sh *= GetCloudShadow(progressW, sunVector);
|
||||
#endif
|
||||
sh *= GetCloudShadow(progressW, sunVector);
|
||||
|
||||
|
||||
#ifdef PER_BIOME_ENVIRONMENT
|
||||
float maxDistance = inBiome * min(max(1.0 - length(d*dVWorld.xz)/(32*8),0.0)*2.0,1.0);
|
||||
|
@ -134,25 +134,27 @@ float GetCloudShadow(vec3 playerPos, vec3 sunVector){
|
||||
|
||||
vec3 startPosition = playerPos;
|
||||
|
||||
float cloudShadows = 0.0;
|
||||
#ifdef CLOUDS_SHADOWS
|
||||
float cloudShadows = 0.0;
|
||||
|
||||
#ifdef CloudLayer0
|
||||
startPosition = playerPos + sunVector / abs(sunVector.y) * max((CloudLayer0_height + 20.0) - playerPos.y, 0.0);
|
||||
cloudShadows = getCloudShape(SMALLCUMULUS_LAYER, 0, startPosition, CloudLayer0_height, CloudLayer0_height+90.0)*dailyWeatherParams1.x;
|
||||
#endif
|
||||
#ifdef CloudLayer1
|
||||
startPosition = playerPos + sunVector / abs(sunVector.y) * max((CloudLayer1_height + 20.0) - playerPos.y, 0.0);
|
||||
cloudShadows += getCloudShape(LARGECUMULUS_LAYER, 0, startPosition, CloudLayer1_height, CloudLayer1_height+90.0)*dailyWeatherParams1.y;
|
||||
#endif
|
||||
#ifdef CloudLayer2
|
||||
startPosition = playerPos + sunVector / abs(sunVector.y) * max(CloudLayer2_height - playerPos.y, 0.0);
|
||||
cloudShadows += getCloudShape(ALTOSTRATUS_LAYER, 0, startPosition, CloudLayer2_height, CloudLayer2_height)*dailyWeatherParams1.z * (1.0-abs(WsunVec.y));
|
||||
#endif
|
||||
|
||||
cloudShadows *= CLOUD_SHADOW_STRENGTH;
|
||||
#ifdef CloudLayer0
|
||||
startPosition = playerPos + sunVector / abs(sunVector.y) * max((CloudLayer0_height + 20.0) - playerPos.y, 0.0);
|
||||
cloudShadows = getCloudShape(SMALLCUMULUS_LAYER, 0, startPosition, CloudLayer0_height, CloudLayer0_height+90.0)*dailyWeatherParams1.x;
|
||||
#endif
|
||||
#ifdef CloudLayer1
|
||||
startPosition = playerPos + sunVector / abs(sunVector.y) * max((CloudLayer1_height + 20.0) - playerPos.y, 0.0);
|
||||
cloudShadows += getCloudShape(LARGECUMULUS_LAYER, 0, startPosition, CloudLayer1_height, CloudLayer1_height+90.0)*dailyWeatherParams1.y;
|
||||
#endif
|
||||
#ifdef CloudLayer2
|
||||
startPosition = playerPos + sunVector / abs(sunVector.y) * max(CloudLayer2_height - playerPos.y, 0.0);
|
||||
cloudShadows += getCloudShape(ALTOSTRATUS_LAYER, 0, startPosition, CloudLayer2_height, CloudLayer2_height)*dailyWeatherParams1.z * (1.0-abs(WsunVec.y));
|
||||
#endif
|
||||
|
||||
#if defined CloudLayer0 || defined CloudLayer1 || defined CloudLayer2
|
||||
totalShadow *= exp((cloudShadows*cloudShadows) * -200.0);
|
||||
cloudShadows *= CLOUD_SHADOW_STRENGTH;
|
||||
|
||||
#if defined CloudLayer0 || defined CloudLayer1 || defined CloudLayer2
|
||||
totalShadow *= exp((cloudShadows*cloudShadows) * -200.0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return totalShadow;
|
||||
|
Reference in New Issue
Block a user