dungeon_crawler

view prototype/sdr/deferred.p.glsl @ 76:f379c00eb07f

added samurai's texel center fix for the color grading palette lookup
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 23 Oct 2012 14:57:08 +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 }