This project is read-only.


Nov 28, 2010 at 10:07 AM

Hi. I'm having some trouble finding a way to set a StencilTestState for ShaderElement. Is there a way or should I just create a derived class from ShaderElement and override some methods?

Nov 28, 2010 at 12:01 PM
Edited Nov 28, 2010 at 12:03 PM

Ah. Yeah, you won't be able to with the standard class. Internally the *Element classes set the stencil renderstate to a fixed default because it can use stencil testing to clip child elements.

Open up Element.cs line 327, and change the following:

state.RenderState.CurrentStencilState = stencilState;


if (clipTestActive)
    state.RenderState.CurrentStencilState = stencilState;