istereo
diff sdr/text.p.glsl @ 29:fb4c9641059f
added more forgotten files
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Thu, 08 Sep 2011 08:31:15 +0300 |
parents | |
children | 8dd271942543 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/sdr/text.p.glsl Thu Sep 08 08:31:15 2011 +0300 1.3 @@ -0,0 +1,22 @@ 1.4 +#ifdef GL_ES 1.5 +precision highp float; 1.6 +#endif 1.7 + 1.8 +uniform sampler2D tex; 1.9 + 1.10 +varying vec4 color; 1.11 +varying vec3 vpos; 1.12 +varying vec2 tc; 1.13 + 1.14 +void main() 1.15 +{ 1.16 + vec4 tcol = texture2D(tex, tc); 1.17 + 1.18 + float fog = exp(-(0.2 * -vpos.z)); 1.19 + 1.20 + float alpha = fog * color.a; 1.21 + 1.22 + vec4 color = vec4(1.0, 0.3, 0.2, tcol.x * alpha); 1.23 + 1.24 + gl_FragColor = color; 1.25 +}