PDA

View Full Version : Number of bits for the Stencil buffer



nachovall
12-17-2009, 07:58 AM
Hi averyone

I'm using the stencil buffer and I some pixels have values bigger than 255 in the stencil buffer. Since stencil buffer works with 8 bits, values bigger than 255 are clamped.

Does anybody know how can I set the number of bits for the stencil up to 16 or 32?

Thank you very much.

Xmas
12-17-2009, 08:17 AM
As far as I know no current hardware supports a stencil format with more than 8 bits.

nachovall
12-17-2009, 08:21 AM
Really? It sounds strange...

Maybe I can do some trick...

aqnuep
12-17-2009, 02:02 PM
Usually 8 bit stencil is far enough. I don't know what is your use case, but possibly you can try to reconsider whether there is no other way to achieve the same results.

Btw you can enable wrapping of stencil values instead of clamping if you wish. Depending on what are you using the stencil buffer, maybe that can solve the problem.