Hello,
is it possible (and if so: how?) to get a Cg fragment program to write to the stencil buffer? Ideally I’d like to be able to compute some value for a fragment and if it’s a certain value compute a colour and write that colour to the framebuffer, otherwise I want to touch the z-buffer and mark that fragment in the stencil buffer. However, I can’t see any way to bind the stencil buffer in the output. Is this possible?
thanks in advance,
John