Jump to content

  • Log In with Google      Sign In   
  • Create Account


Clipping Quad ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Endemoniada   Members   -  Reputation: 312

Like
0Likes
Like

Posted 19 April 2012 - 04:11 PM

Hi guys,

I want to specify a rectangular portion of the screen to act as a clipping rect for 3D objects. I'm thinking that I can simply render a quad and set to 0 the z-values for the pixels in the quad.

I know how to render the quad of course but I don't know how to set the z-values. I'm using world coordinates for the quad.

Also, should I do this in a shader ? Please help.

Thanks.

Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 7866

Like
0Likes
Like

Posted 19 April 2012 - 05:26 PM

You need scissor test. Look at IDirect3DDevice9::SetScissorRect and the D3DRS_SCISSORTESTENABLE render state.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS