1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Remove volumetrics stuff and some changes

This commit is contained in:
Gefüllte Taubenbrust 2024-10-01 20:00:24 +02:00
parent da1a688493
commit 1bf1d0b2ff
21 changed files with 311 additions and 857 deletions

View file

@ -0,0 +1,22 @@
uniform lowp vec4 fogColor;
uniform float fogDistance;
uniform float fogShadingParameter;
varying highp vec3 eyeVec;
varying lowp vec4 varColor;
varying lowp vec3 normal;
uniform vec3 v_LightDirection;
void main(void)
{
float brightness = max(dot(-v_LightDirection, normal), 0.0);
vec4 col = varColor;
col.rgb *= brightness;
float clarity = clamp(fogShadingParameter
- fogShadingParameter * length(eyeVec) / fogDistance, 0.0, 1.0);
col.rgb = mix(fogColor.rgb, col.rgb, clarity);
gl_FragColor = col;
}