PDA

View Full Version : ATI_separate_stencil - always enabled ?



PH
02-13-2003, 07:55 AM
The spec finally appeared, http://oss.sgi.com/projects/ogl-sample/registry/ATI/separate_stencil.txt

Does glEnable( GL_STENCIL_TEST ) enable two-sided stencil testing unless ALWAYS is specified as the backface func ?
The part that is confusing is the state table, there's enable state for seperate stencil (two-sided testing) but no enumerant for enabling.

NitroGL
02-13-2003, 08:06 AM
Sounds right...

zeckensack
02-13-2003, 08:10 AM
Additionally, the stencil test
may treat front and back faces separately. The function
StencilFuncSeparateATI sets each independently, while the function
Stencil func sets both front and back to the same test.

Sure thing http://www.opengl.org/discussion_boards/ubb/smile.gif

Note that face culling precedes the stencil test, so it doesn't really matter (IMO). If you don't need back faces (or front faces for that matter), you should cull them anyway to conserve fill rate.

Tom Nuydens
02-13-2003, 08:12 AM
Is there any difference between this and GL_EXT_stencil_two_side? Also, the enumerant value of STENCIL_OP_SEPARATE_FACE_ATI is not in the spec?

-- Tom

PH
02-13-2003, 08:20 AM
With the EXT version you can set a seperate stencil write mask for front/back faces. Even if the 9700 couldn't support this in hardware ( just a guess ), it would still be nice to have. I would certainly prefer the GL_EXT_stencil_two_side extension ( as I need to use this for the GfFX anyway ).



[This message has been edited by PH (edited 02-13-2003).]

ehart
02-13-2003, 08:23 AM
Yes, it does not require a separate enable. The operation semantic is that frant and back testing are always occurring, just that sometimes they may be the same values.

The extra enum is a mistake left from an early version of the spec that did use an enable. I'll get that fixed.

-Evan

PH
03-04-2003, 01:56 AM
Another thing regarding the documentation:

Shouldn't it be mentioned in the ATI spec how it interacts with EXT_stencil_wrap ? The INCR_WRAP and DECR_WRAP enums do work with glStencilOpSeparateATI but it doesn't say it's allowed.

[This message has been edited by PH (edited 03-04-2003).]