dungeon_crawler

annotate 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
rev   line source
nuclear@65 1 uniform sampler2D fbtex;
nuclear@72 2 uniform sampler3D paltex;
nuclear@65 3
nuclear@65 4 void main()
nuclear@65 5 {
nuclear@72 6 // lookup the render output color for this pixel
nuclear@72 7 vec4 color = texture2D(fbtex, gl_TexCoord[0].st);
nuclear@72 8 // use that color as an index into the palette
nuclear@72 9 gl_FragColor = vec4(texture3D(paltex, color.xyz).xyz, color.a);
nuclear@65 10 }