diff --git a/shaders/lib/climate_settings.glsl b/shaders/lib/climate_settings.glsl index 6ea4aef..768623d 100644 --- a/shaders/lib/climate_settings.glsl +++ b/shaders/lib/climate_settings.glsl @@ -52,7 +52,7 @@ int SeasonLength = Season_Length; // loop the year. multiply the season length by the 4 seasons to create a years time. - float YearLoop = mod(worldDay & 0xFFFF + Start_Season * SeasonLength, SeasonLength * 4); + float YearLoop = mod((worldDay & 0xFFFF) + Start_Season * SeasonLength, SeasonLength * 4); // the time schedule for each season float SummerTime = clamp(YearLoop ,0, SeasonLength) / SeasonLength; @@ -95,7 +95,7 @@ int SeasonLength = 1; // loop the year. multiply the season length by the 4 seasons to create a years time. - float YearLoop = mod(worldDay & 0xFFFF + SeasonLength, SeasonLength * 4); + float YearLoop = mod((worldDay & 0xFFFF) + SeasonLength, SeasonLength * 4); // the time schedule for each season float SummerTime = clamp(YearLoop ,0, SeasonLength) / SeasonLength;