From 749b109b44d30e184725a312db8544bcab356bc3 Mon Sep 17 00:00:00 2001 From: Xonk Date: Fri, 10 May 2024 15:28:56 -0400 Subject: [PATCH] another seasons tweak --- shaders/dimensions/DH_solid.vsh | 1 + shaders/lib/climate_settings.glsl | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/shaders/dimensions/DH_solid.vsh b/shaders/dimensions/DH_solid.vsh index 6c0d5f1..0694f08 100644 --- a/shaders/dimensions/DH_solid.vsh +++ b/shaders/dimensions/DH_solid.vsh @@ -46,6 +46,7 @@ vec4 toClipSpace3(vec3 viewSpacePosition) { */ #define SEASONS_VSH +#define DH_SEASONS #include "/lib/climate_settings.glsl" void main() { diff --git a/shaders/lib/climate_settings.glsl b/shaders/lib/climate_settings.glsl index 12ce0d5..e25125b 100644 --- a/shaders/lib/climate_settings.glsl +++ b/shaders/lib/climate_settings.glsl @@ -27,7 +27,9 @@ vec3 WinterCol = vec3(Winter_R, Winter_G, Winter_B) ; vec3 SpringCol = vec3(Spring_R, Spring_G, Spring_B); + // decide if you want to replace biome colors or tint them. + SummerCol *= glcolor; AutumnCol *= glcolor; WinterCol *= glcolor; @@ -65,10 +67,14 @@ 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 && isPlants; + bool IsTintIndex = floor(dot(glcolor,vec3(0.5))) < 1.0; // multiply final color by the final lerped color, because it contains all the other colors. - if(IsTintIndex) FinalColor = SpringToSummer; + #ifdef DH_SEASONS + if(isPlants || isLeaves) FinalColor = SpringToSummer; + #else + if(IsTintIndex) FinalColor = SpringToSummer; + #endif // #ifdef Snowy_Winter // // this is to make snow only exist in winter