Working on fog, dialogs, etc

This commit is contained in:
Vladislav Khorev committed 2026-04-20 00:21:51 +03:00
1 parent fd098e8346
commit d557c4b530
18 files changed
+424 -40

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
precision mediump float;
uniform sampler2D Texture;
varying vec2 texCoord;
varying float fogDistance;
void main()
{
vec4 color = texture2D(Texture,texCoord).rgba;
if(color.a < 0.1)
discard;
vec3 fogColor = vec3(0.53, 0.81, 0.92);
float fogFactor = clamp((fogDistance - 90.0) / 30.0, 0.0, 1.0);
vec3 finalColor = mix(color.rgb, fogColor, fogFactor);
gl_FragColor = vec4(finalColor, color.a);
}