Very Very Very interesting question

This should probably go to the gpgpu forums but I'll ask here first.  For my game i want to use 8bit stencil for reflection(which i started working on that code today it's a little more opened than mrcoders stuff because you specify the reflection objects and it's hardware accelerated)  and i want 32 bit depth for shadow mapping,so forth so on all the applications of depth textures have.  Is there anyways I could store the stencil in the A of a rendered image?  It would require shaders but it's a matter of gl_FragColor = vec4(gl_Color.rbg,stencil); 1 fragment operation isn't much at all.



Either Stencil or depth in the Alpha.  Depth is a little easier you just do.


float depth = dist(camera);
gl_FragColor = vec4(gl_Color.rbg,depth);


I posted on it when i tried to do depth of field and failed.