Working on fog, dialogs, etc
This commit is contained in:
1 parent
fd098e8346
commit
d557c4b530
18 files changed
+424
-40
No files matched your search
@@ -0,0 +1,18 @@
|
||||
//precisionmediump 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);
|
||||
}
|
||||
Reference in new issue
Block a user