• Advertisement
Sign in to follow this  

Can't Get CCW Winding Order to Work

Recommended Posts

Hi guys,

The only way I can get a CCW winding order to work is to use D3D11_CULL_NONE. Take a look:

// ccw triangle on x-z plane
a = (-8.0f, 0.0f, -8.0f);
b = ( 8.0f, 0.0f, -8.0f);
c = ( 8.0f, 0.0f,  8.0f);
rasterDesc.CullMode = D3D11_CULL_BACK;
rasterDesc.FrontCounterClockwise = TRUE;
// that doesn't work
// if I swap b with c,  and set FrontCounterClockwise = FALSE it works

I am really confused.

Thanks.

Edited by Endemoniada

Share this post


Link to post
Share on other sites
Advertisement

How do those vertices can transformed to NDC coordinates? i.e. where is the camera and what is the vertex shader.
If you look at those verts from one side they're CW and the other side they're CCW. From your code there's no way for us to know which it is.

Share this post


Link to post
Share on other sites
So I think you would have to be using a left-handed coordinate system (typical for D3D) with the camera looking down on the triangle to see it.
Does that match with what you have going on?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement