istereo

diff sdr/test.p.glsl @ 14:b39d8607f4bb

added textures
author John Tsiombikas <nuclear@mutantstargoat.com>
date Wed, 07 Sep 2011 09:03:51 +0300
parents 76ad575d72d0
children 889dade25667
line diff
     1.1 --- a/sdr/test.p.glsl	Wed Sep 07 08:33:55 2011 +0300
     1.2 +++ b/sdr/test.p.glsl	Wed Sep 07 09:03:51 2011 +0300
     1.3 @@ -2,9 +2,15 @@
     1.4  precision mediump float;
     1.5  #endif
     1.6  
     1.7 +uniform sampler2D tex;
     1.8 +
     1.9  varying vec4 var_color;
    1.10 +varying vec2 var_texcoord;
    1.11  
    1.12  void main()
    1.13  {
    1.14 -	gl_FragColor = var_color;
    1.15 +	vec4 texel = texture2D(tex, var_texcoord);
    1.16 +	texel.w = 1.0;
    1.17 +
    1.18 +	gl_FragColor = var_color * texel;
    1.19  }