dungeon_crawler
view prototype/sdr/deferred.p.glsl @ 54:995191474cc0
writting the stream audio player
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 19 Sep 2012 05:22:43 +0300 |
parents | 48cfd351a9be |
children |
line source
1 uniform sampler2D mrt0, mrt1, mrt2;
2 uniform vec2 tex_scale;
4 void main()
5 {
6 vec2 tc = gl_TexCoord[0].st;
8 vec4 texel;
9 if(tc.x < 0.33333333) {
10 texel = texture2D(mrt0, tc * vec2(3.0, 1.0) * tex_scale);
11 } else if(tc.x < 0.66666666) {
12 texel = texture2D(mrt1, (tc - vec2(0.33333333, 0.0)) * vec2(3.0, 1.0) * tex_scale);
13 } else {
14 texel = texture2D(mrt2, (tc - vec2(0.66666666, 0.0)) * vec2(3.0, 1.0) * tex_scale);
15 }
17 gl_FragColor = texel;
18 }