annotate prototype/sdr/deferred.p.glsl @ 73:67d330038629
ok fixed the dissapearing particle system. Had forgotten to disable TEXTURE_3D after color grading pass
author |
John Tsiombikas <nuclear@member.fsf.org> |
date |
Sun, 21 Oct 2012 02:11:23 +0300 |
parents |
48cfd351a9be |
children |
|
rev |
line source |
nuclear@35
|
1 uniform sampler2D mrt0, mrt1, mrt2;
|
nuclear@18
|
2 uniform vec2 tex_scale;
|
nuclear@18
|
3
|
nuclear@17
|
4 void main()
|
nuclear@17
|
5 {
|
nuclear@19
|
6 vec2 tc = gl_TexCoord[0].st;
|
nuclear@19
|
7
|
nuclear@19
|
8 vec4 texel;
|
nuclear@35
|
9 if(tc.x < 0.33333333) {
|
nuclear@35
|
10 texel = texture2D(mrt0, tc * vec2(3.0, 1.0) * tex_scale);
|
nuclear@35
|
11 } else if(tc.x < 0.66666666) {
|
nuclear@35
|
12 texel = texture2D(mrt1, (tc - vec2(0.33333333, 0.0)) * vec2(3.0, 1.0) * tex_scale);
|
nuclear@19
|
13 } else {
|
nuclear@35
|
14 texel = texture2D(mrt2, (tc - vec2(0.66666666, 0.0)) * vec2(3.0, 1.0) * tex_scale);
|
nuclear@19
|
15 }
|
nuclear@19
|
16
|
nuclear@19
|
17 gl_FragColor = texel;
|
nuclear@17
|
18 }
|