mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
Make seasonal snow only in winter - early spring, make rain less when not under a cloud
This commit is contained in:
@ -391,5 +391,24 @@ float GetCloudShadow_VLFOG(vec3 WorldPos){
|
||||
// do not allow it to exist above the lowest cloud plane
|
||||
// shadow *= clamp(((MaxCumulusHeight + CumulusHeight)*0.435 - WorldPos.y)/100,0.0,1.0) ;
|
||||
|
||||
return shadow;
|
||||
}
|
||||
|
||||
float GetCloudSkyOcclusion(vec3 WorldPos){
|
||||
|
||||
float shadow = 0.0;
|
||||
|
||||
vec3 shadowDir = vec3(0,1,0);
|
||||
|
||||
|
||||
// assume a flat layer of cloud, and stretch the sampled density along the sunvector, starting from some vertical layer in the cloud.
|
||||
#ifdef Cumulus
|
||||
vec3 lowShadowStart = WorldPos + shadowDir/abs(shadowDir.y) * max((MaxCumulusHeight - 60) - WorldPos.y,0.0) ;
|
||||
shadow += GetCumulusDensity(lowShadowStart,0)*Cumulus_density;
|
||||
#endif
|
||||
|
||||
|
||||
shadow = clamp(exp(-shadow*25.0) ,0.0,1.0);
|
||||
|
||||
return shadow;
|
||||
}
|
Reference in New Issue
Block a user