Sign in to follow this  

Triangle Strip Culling

This topic is 4816 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, a probably simple question: given is a the following vertex group: v1 v3 v5 | /| /| |/ |/ | v2 v4 v6 it is rendered using a triangle strip. I wonder why DirectX doesn't cull some of the triangles, because not all of them are clockwise. v1, v2, v3 are counterclockwise. v2, v3, v4 are clockwise. v3, v4, v5 are counterclockwise and so on... How does DirectX order the vertices in a triangle strip so that it does not have to cull away half of the triangles? thx

Share this post


Link to post
Share on other sites
In order for stripping to work, the culling order toggles each triangle. The 1st, 3rd, 5th, etc. are one winding order. 2nd, 4th, 6th, etc. are in the opposite winding order.

Also, if you're ever calculating normals from tri-strip face data you should be aware that the normal will keep flipping.

Share this post


Link to post
Share on other sites
Correct, and the first triangle defines the order. So, if you set DirectX up to cull out clockwise and start your triangle strip in a clockwise direction (by making the first triangle clockwise), the entire strip will be culled. If you make the first triangle counter-clockwise, the entire strip will be rendered.

Chris

Share this post


Link to post
Share on other sites

This topic is 4816 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.

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