istereo
view sdr/test.p.glsl @ 43:73813c1176de
better hgignore
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 14 Aug 2015 04:33:42 +0300 |
parents | b39d8607f4bb |
children |
line source
1 #ifdef GL_ES
2 precision mediump float;
3 #endif
5 uniform sampler2D tex;
7 varying vec3 vpos;
8 varying vec4 var_color;
9 varying vec2 var_texcoord;
11 void main()
12 {
13 vec4 fog_color = vec4(0.6, 0.6, 0.6, 1.0);
15 float fog = exp(-(0.2 * -vpos.z));
17 vec4 texel = texture2D(tex, var_texcoord);
18 texel.w = 1.0;
20 vec4 col = var_color * texel;
21 gl_FragColor = mix(fog_color, col, fog);
22 }