Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a cel-shading effect in HLSL and Direct3D 11, and I need to be able to flip the culling mode on the outline pass of the effect. I know you do this in XNA by setting CullMode to CW or CCW inside the pass definition, but is that how you do it in D3D11/SlimDX?

share|improve this question
up vote 0 down vote accepted

You can do that by creating rasterizer state and setting it active in context. See D3D11_RASTERIZER_DESC and SlimDX.Direct3D11.RasterizerStateDescription.IsFrontCounterclockwise.

And if you use Effect11 framework, then you can do that directly in fx file like this:

// define your rasterizer state
RasterizerState MyCull {
    FrontCounterClockwise = TRUE; // or FALSE

// in some effect pass use MyCull state for Rasterizer State
SetRasterizerState( MyCull );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.