Advertisement Jump to content


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


Clipping and D3D

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!