mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
fix tiny issue with seasons on DH LODS
This commit is contained in:
@ -17,9 +17,9 @@
|
||||
void YearCycleColor (
|
||||
inout vec3 FinalColor,
|
||||
vec3 glcolor,
|
||||
inout float SnowySeason,
|
||||
|
||||
bool isLeaves
|
||||
bool isLeaves,
|
||||
bool isPlants
|
||||
){
|
||||
// colors for things that arent leaves and using the tint index.
|
||||
vec3 SummerCol = vec3(Summer_R, Summer_G, Summer_B);
|
||||
@ -65,19 +65,19 @@
|
||||
vec3 SpringToSummer = mix(WinterToSpring, SummerCol, SpringTime);
|
||||
|
||||
// make it so that you only have access to parts of the texture that use the tint index
|
||||
bool IsTintIndex = floor(dot(glcolor,vec3(0.5))) < 1.0;
|
||||
bool IsTintIndex = floor(dot(glcolor,vec3(0.5))) < 1.0 && isPlants;
|
||||
|
||||
// multiply final color by the final lerped color, because it contains all the other colors.
|
||||
if(IsTintIndex) FinalColor = SpringToSummer;
|
||||
|
||||
#ifdef Snowy_Winter
|
||||
// this is to make snow only exist in winter
|
||||
float FallToWinter_snowfall = mix(0.0, 1.0, AutumnTime);
|
||||
float WinterToSpring_snowfall = mix(FallToWinter_snowfall, 0.0, WinterTime);
|
||||
SnowySeason = clamp(pow(sin(WinterToSpring_snowfall*SeasonLength)*0.5+0.5,5),0,1) * WinterToSpring_snowfall * noPuddleAreas;
|
||||
#else
|
||||
SnowySeason = 0.0;
|
||||
#endif
|
||||
// #ifdef Snowy_Winter
|
||||
// // this is to make snow only exist in winter
|
||||
// float FallToWinter_snowfall = mix(0.0, 1.0, AutumnTime);
|
||||
// float WinterToSpring_snowfall = mix(FallToWinter_snowfall, 0.0, WinterTime);
|
||||
// // SnowySeason = clamp(pow(sin(WinterToSpring_snowfall*SeasonLength)*0.5+0.5,5),0,1) * WinterToSpring_snowfall * noPuddleAreas;
|
||||
// #else
|
||||
// // SnowySeason = 0.0;
|
||||
// #endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user