• Advertisement

Archived

This topic is now archived and is closed to further replies.

Two Sided triangles

This topic is 6252 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

I want to draw a triangle and make it have a back using directx 7.1a. I specify two triangles using my own structure that is equivalent to the D3D sturcutres, only with diffuse color informaiton, the normal, and the vertices. I then specify the same 3 vertexes except with the opposite of the normal, but instead of drawing the triangle with a back, they both end up apart. Why would this happen? Any help wouldbe nice.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I don''t know why this happens, but you could instead turn off backface culling, and then your triangle will be two-sided.

Share this post


Link to post
Share on other sites
You have to wind the other triangle the other way around, or else things will go wrong (i.e. backface culling will detect both triangles to be facing the same direction, due to the math, but using the inverted normal for lighting). So switch the last two verticies of the second face, flip the normal (as you did), and you''re homefree

Share this post


Link to post
Share on other sites

  • Advertisement