dungeon_crawler
view prototype/sdr/deferred.p.glsl @ 63:7f52d6310317
fixed design issue with datafile_path
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 02 Oct 2012 04:52:59 +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 }