Working on fog, 2nd level, locations, dialogs

This commit is contained in:
Vladislav Khorev committed 2026-04-25 19:56:00 +03:00
1 parent eac914e073
commit c7b3f04cd4
38 files changed
+150471 -145

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 - 30.0) / 10.0, 0.0, 1.0);
vec3 finalColor = mix(color.rgb, fogColor, fogFactor);
gl_FragColor = vec4(finalColor, color.a);
}