fix tiny issue with seasons on DH LODS

This commit is contained in:
Xonk
2024-05-10 14:53:39 -04:00
parent 4e00602b33
commit 23b44f78ca
3 changed files with 13 additions and 15 deletions

View File

@ -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