Jump to content
  • Advertisement

Archived

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

master_ball

Clipping and D3D

This topic is 5981 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 I''ve used some basic D3D for a while now, but I am now wanting to do some clipping. I know you have to declare a special surface when using DirectDraw, but what about D3D??? - master_ball ---------------------------- We R 138

Share this post


Link to post
Share on other sites
Advertisement
Yep, the projection matrix and viewport parameters are all D3D needs to clip.

The projection matrix transforms into clip space. In clip space any points which are visible have coordinates between -1 and 1 (0 and 1 for Z) - any coordinate outside of that range gets clipped. Simple.

The viewport determines how the clipped vertices are transformed into the screen rectangle.

[Modern graphics chips also have a thing called "Guard Band Clipping" which is (conceptually) like having a bigger surface for your back buffer so that polygons which straddle the edges of the viewable screen don''t have to be clipped, the bits outside of the viewable area just get drawn into the guard band space. It means the chip can trivially accept/reject more geometry which makes things faster]

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites

  • 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!