istereo2

annotate sdr/text.p.glsl @ 6:3bccfc7d10fe

goatkit is drawing
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 23 Sep 2015 05:44:58 +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 }