Jump to content
  • Advertisement
Sign in to follow this  
Endemoniada

Can't Get CCW Winding Order to Work

This topic is 475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!