istereo2

annotate sdr/text.p.glsl @ 24:9d53a4938ce8

port to android mostly complete, ads not done, and needs some polishing
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 04 Oct 2015 08:15:24 +0300
parents
children
rev   line source
nuclear@2 1 #ifdef GL_ES
nuclear@2 2 precision mediump float;
nuclear@2 3 #endif
nuclear@2 4
nuclear@2 5 uniform sampler2D tex;
nuclear@2 6
nuclear@2 7 varying vec4 color;
nuclear@2 8 varying vec3 vpos;
nuclear@2 9 varying vec2 tc;
nuclear@2 10
nuclear@2 11 void main()
nuclear@2 12 {
nuclear@2 13 vec4 tcol = texture2D(tex, tc);
nuclear@2 14
nuclear@2 15 float fog = exp(-(0.2 * -vpos.z));
nuclear@2 16
nuclear@2 17 float alpha = fog * color.a;
nuclear@2 18
nuclear@2 19 vec4 color = vec4(1.0, 0.3, 0.2, tcol.x * alpha);
nuclear@2 20
nuclear@2 21 gl_FragColor = color;
nuclear@2 22 }