istereo

annotate sdr/text.p.glsl @ 43:73813c1176de

better hgignore
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 14 Aug 2015 04:33:42 +0300
parents fb4c9641059f
children
rev   line source
nuclear@29 1 #ifdef GL_ES
nuclear@30 2 precision mediump 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 }