Added dawn

This commit is contained in:
Vladislav Khorev committed 2026-06-04 18:01:51 +03:00
1 parent 83b92e9881
commit c8d743b932
13 files changed
+88 -40

No files matched your search

+4 -3
View File
@@ -4,6 +4,8 @@ uniform int uPointLightCount;
uniform vec3 uPointLightPos[4];
uniform vec3 uPointLightDir[4];
uniform vec3 uPointLightColor[4];
uniform vec3 uAmbientColor;
uniform vec3 uFogColor;
varying vec2 texCoord;
varying float fogDistance;
@@ -21,8 +23,7 @@ void main()
if (color.a < 0.1)
discard;
float ambient = 0.37;
vec3 lighting = vec3(ambient);
vec3 lighting = uAmbientColor;
bool hasNormal = dot(fragNormal, fragNormal) > 0.001;
vec3 N = hasNormal ? normalize(fragNormal) : vec3(0.0);
@@ -48,7 +49,7 @@ void main()
color.rgb *= lighting;
vec3 fogColor = vec3(0.01, 0.01, 0.05);
vec3 fogColor = uFogColor;
float fogFactor = clamp((fogDistance - 15.0) / 8.0, 0.0, 1.0);
color.rgb = mix(color.rgb, fogColor, fogFactor);