Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

OpenGL Question on D3DRS_NORMALIZENORMALS

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

If using HLSL does this state actually do anything still? In OpenGL this call would renormalize the normals you have if you were to scale the vertices. I was wondering if calling D3DRS_NORMALIZENORMALS would still renormalize the normals or you have to do this yourself with HLSL? Thanks [Edited by - MARS_999 on August 10, 2006 3:33:12 AM]

Share this post


Link to post
Share on other sites
Advertisement
It only applies to the FFP. In reality, DX can't know what you're doing in the HLSL shaders - it couldn't predict what the normal is, where it is transformed to world space, and where it is then used.

If you want to normalize the normals, just add a normalize call after transforming the normals to world space and before using them. Not too difficult :).

Hope this helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by sirob
It only applies to the FFP. In reality, DX can't know what you're doing in the HLSL shaders - it couldn't predict what the normal is, where it is transformed to world space, and where it is then used.

If you want to normalize the normals, just add a normalize call after transforming the normals to world space and before using them. Not too difficult :).

Hope this helps.


So it still a useful state to have is what I am asking its still applicable? 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!