dungeon_crawler
view prototype/sdr/deferred.p.glsl @ 72:a27528035e20
- re-organized the renderer classes a bit wrt final render-target
- implemented identity color-grading palette for now
- broke particle systems....
- removed multipass renderer
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 19 Oct 2012 02:45:57 +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 }