Fix colortype error, improve snow normals

This commit is contained in:
Merlin1809 committed 2025-06-09 16:28:23 +02:00
1 parent 7002d50b8f
commit 95f7189cbe
2 files changed
+6 -2

No files matched your search

+2 -2
View File
@@ -735,13 +735,13 @@ void applyPuddles(
if(isWater || f0 > 229.5/255.0 || isEyeInWater == 1) snow = 0.0;
vec3 snowA = pow(texture2D(snowTexA, snowCoords).rgb, vec3(2.0/(ShaderSnowStrength-0.1)));
vec3 snowN = texture2D(snowTexN, snowCoords).rgb;
vec3 snowN = 2*texture2D(snowTexN, snowCoords).rgb - 1;
float omSA = 1-snowAmount;
float textureMult = smoothstep(0.1+0.5*omSA, 0.5+0.9*omSA, length(snowA)*snow*snowAmount);
normals = mix(normals, 0.5*snowN, textureMult);
normals = mix(normals, normalize(snowN), textureMult);
roughness = mix(roughness, 0.8*snowR, sqrt(textureMult));
albedo = mix(albedo, 2.5*snowA, textureMult);
+4
View File
@@ -324,6 +324,10 @@ uniform int moonPhase;
#if colortype == 1
#define sunColorBase vec3(sunColorR,sunColorG,sunColorB) * sun_illuminance
#define moonColorBase vec3(moonColorR,moonColorG,moonColorB) * moon_illuminance
#ifdef REALMOON
#define moonColorBase2 blackbody(Moon_temp) * moon_illuminance
#endif
#else
#define sunColorBase blackbody(Sun_temp) * sun_illuminance