Patent ID: 7286129

Claim:
A method for two-sided stencil testing during graphics processing, comprising: (a) receiving primitives to be processed in a graphics processing pipeline; (b) determining whether the primitives are front-facing primitives or back-facing primitives; (c) performing two-sided stencil testing on the primitives, comprising: (i) performing stencil testing on a subset of the primitives that are front-facing primitives utilizing a front set of stencil states; (ii) performing stencil testing on a subset of the primitives that are back-facing primitives utilizing a back set of stencil states; said front set of stencil states used for stencil testing said front-facing primitives and said back set of stencil states used for stencil testing said back-facing primitives being separate sets of states that are independently selectable and wherein both received front-facing primitives and back-facing primitives are rendered in a single rendering pass; and (d) displaying a result of said graphics processing utilizing said two-sided stencil testing.