Jump to content
  • Advertisement
Sign in to follow this  
giugio

negative or positive normal hlsl

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

hello.
I have a hlsl shader , and i would determinate if a vertex normal is positive or negative to the plane of vertex.
I would use this information for establish if the wing order is counterclockwise or clockwise .
Is possible?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement

hello.
I have a hlsl shader , and i would determinate if a vertex normal is positive or negative to the plane of vertex.
I would use this information for establish if the wing order is counterclockwise or clockwise .
Is possible?

Thanks.

I should add that I wish creating a sketchup importer and that the best thing would be to determine in a preprocessing phase which wing they order the faces of my polygons.
In fact, some faces can be reversed (there is an apposite command in sketchup) and I would like to determine.
For this I am trying to find if the normals are reversed.

Share this post


Link to post
Share on other sites

You should be able to use the VFACE semantic to do it.


and is possible to do this in a preprocessing phase( in importation from skp file without the vface) ?
For example for have all the faces with a property front = true/ false?
because i'm try to create a simple xml file that is readable via js in a webgl viewer for sketchup .

I have also a point on the plane of the normal and the normal , is sufficent to do a dot with the point and the normal for have a back/front information?
Thanks.

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!