Weiter am Wettersystem gearbeitet, ordentliche Wolken und Regen etc ergänzt

This commit is contained in:
2026-07-24 11:41:05 +02:00
parent 5a7d9897e4
commit 919f70bb44
47 changed files with 1665 additions and 1073 deletions

View File

@@ -1,7 +1,8 @@
uniform vec4 g_AmbientLightColor;
uniform vec4 g_AmbientLightColor;
uniform vec3 m_SunDir; // Richtung von der Fläche zur Sonne (world-space, normiert)
uniform vec4 m_SunColor; // Sonnenfarbe RGB
uniform vec3 m_SunDir; // Richtung von der Fläche zur Sonne (world-space, normiert)
uniform vec4 m_SunColor; // Sonnenfarbe RGB
uniform float m_Wetness;
in vec4 varColor;
in vec3 varNormal;
@@ -23,12 +24,13 @@ void main() {
float light = nDotL + sss;
vec3 ambient = g_AmbientLightColor.rgb * varColor.rgb;
vec3 diffuse = m_SunColor.rgb * varColor.rgb * light;
vec3 col = varColor.rgb * (1.0 - 0.18 * m_Wetness);
vec3 ambient = g_AmbientLightColor.rgb * col;
vec3 diffuse = m_SunColor.rgb * col * light;
// Farbe nicht über die Vertex-Color-Helligkeit hinaus aufhellen
vec3 result = ambient + diffuse;
result = min(result, varColor.rgb * 1.5);
outFragColor = vec4(result, 1.0);
result = min(result, col * 1.5);
float shine = pow(max(nDotL, 0.0), 12.0) * m_Wetness * 0.25;
outFragColor = vec4(result + vec3(shine), 1.0);
}