istereo

annotate 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
rev   line source
nuclear@29 1 #ifdef GL_ES
nuclear@29 2 precision highp float;
nuclear@29 3 #endif
nuclear@29 4
nuclear@29 5 uniform sampler2D tex;
nuclear@29 6
nuclear@29 7 varying vec4 color;
nuclear@29 8 varying vec3 vpos;
nuclear@29 9 varying vec2 tc;
nuclear@29 10
nuclear@29 11 void main()
nuclear@29 12 {
nuclear@29 13 vec4 tcol = texture2D(tex, tc);
nuclear@29 14
nuclear@29 15 float fog = exp(-(0.2 * -vpos.z));
nuclear@29 16
nuclear@29 17 float alpha = fog * color.a;
nuclear@29 18
nuclear@29 19 vec4 color = vec4(1.0, 0.3, 0.2, tcol.x * alpha);
nuclear@29 20
nuclear@29 21 gl_FragColor = color;
nuclear@29 22 }