dungeon_crawler
diff prototype/sdr/post.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 | fc2b3d06d07c |
children | f379c00eb07f |
line diff
1.1 --- a/prototype/sdr/post.p.glsl Tue Oct 16 04:08:35 2012 +0300 1.2 +++ b/prototype/sdr/post.p.glsl Fri Oct 19 02:45:57 2012 +0300 1.3 @@ -1,6 +1,10 @@ 1.4 uniform sampler2D fbtex; 1.5 +uniform sampler3D paltex; 1.6 1.7 void main() 1.8 { 1.9 - gl_FragColor = texture2D(fbtex, gl_TexCoord[0].st); 1.10 + // lookup the render output color for this pixel 1.11 + vec4 color = texture2D(fbtex, gl_TexCoord[0].st); 1.12 + // use that color as an index into the palette 1.13 + gl_FragColor = vec4(texture3D(paltex, color.xyz).xyz, color.a); 1.14 }