istereo2
annotate sdr/font.p.glsl @ 7:a3c4fcc9f8f3
- started a goatkit UI theme
- font rendering with drawtext and shaders
- asset manager (only used by drawtext for now, will replace respath eventually)
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 24 Sep 2015 06:49:25 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@7 | 1 #ifdef GL_ES |
nuclear@7 | 2 precision mediump float; |
nuclear@7 | 3 #endif |
nuclear@7 | 4 |
nuclear@7 | 5 uniform sampler2D tex; |
nuclear@7 | 6 uniform vec4 ucolor; |
nuclear@7 | 7 |
nuclear@7 | 8 //varying vec4 vcolor; |
nuclear@7 | 9 varying vec2 vtexcoord; |
nuclear@7 | 10 |
nuclear@7 | 11 void main() |
nuclear@7 | 12 { |
nuclear@7 | 13 vec4 texel = texture2D(tex, vtexcoord); |
nuclear@7 | 14 gl_FragColor = vec4(ucolor.xyz, texel.a * ucolor.a); |
nuclear@7 | 15 } |