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:
parent
da1a688493
commit
1bf1d0b2ff
21 changed files with 311 additions and 857 deletions
22
client/shaders/soft_clouds/opengl_fragment.glsl
Normal file
22
client/shaders/soft_clouds/opengl_fragment.glsl
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue