Jump to content
  • Advertisement
Sign in to follow this  
yuppies

Extracting the Near Clipping Plane?

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

whats the right way of extracting the new clipping plane in DX? some tutorials extract the near plane like this //near frustum[ 4 ].A = comboMatrix.M13; frustum[ 4 ].B = comboMatrix.M23; frustum[ 4 ].C = comboMatrix.M33; frustum[ 4 ].D = comboMatrix.M43; and other tutorials extract the near plane like this frustum[ 4 ].A = comboMatrix.M14 + comboMatrix.M13; frustum[ 4 ].B = comboMatrix.M24 + comboMatrix.M23; frustum[ 4 ].C = comboMatrix.M34 + comboMatrix.M33; frustum[ 4 ].D = comboMatrix.M44 + comboMatrix.M43; whats the right one?

Share this post


Link to post
Share on other sites
Advertisement
My code works with the former, however, I believe that typically 14, 24, 34, and 44 are zero. I may be wrong, but my code uses the former.

Share this post


Link to post
Share on other sites
If you are working with DirectX you can use the first way, because in DirectX the box in clipping space ( only for the z component ) starts at 0 and ends at w.

If you want to use OpenGL you must use the second way.


You can find more information in:

http://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf
http://crownandcutlass.sourceforge.net/frustum.html

Bye!

VinCenT.

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!