dungeon_crawler
view prototype/sdr/deferred.p.glsl @ 79:110b2af4b9d8
fixed the shader non-conformity by explicitly converting 2.2 to vec3 before passing it to pow for the texel inverse-gamma thing
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 27 Oct 2012 01:54:39 +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 }