Jump to content

  • Log In with Google      Sign In   
  • Create Account

Set render limit region with setScissorRectangle


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
2 replies to this topic

#1 Volgogradetzzz   Members   -  Reputation: 565

Like
0Likes
Like

Posted 11 October 2012 - 04:09 AM

Hi. I'm a flash programmer and in our API we have setScissorRectangle method that force to draw only inside of that rectangle. I don't know big API's such as DirectX and OpenGL, so I don't know analog of this method (it would be great if you point me such method in DirectX). And here my question: does only fragments processed that falls inside this rectangle or all fragments processed anyway. For example, I have big texture 1024x1024 px size with tiny image drawn in the middle of it. Next, I draw this texture to back buffer with some heavy shader and specify scissor rectangle of 20x20 px size. Yes, it works, but I need to know - does GPU process ALL 1024*1024 fragments or 20*20 as I want?

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7574

Like
0Likes
Like

Posted 11 October 2012 - 04:59 AM

In the open gl pipeline (at least <=2.0) the scissortest is executed after the fragment stage just before alpha/depth test, but drivers will most likely optimize this as long as it does not change the virtual pipeline, a quick test with an expensive shader and 1kx1k vs 20x20 should clearly display the benefit.

Edited by Ashaman73, 11 October 2012 - 04:59 AM.


#3 Volgogradetzzz   Members   -  Reputation: 565

Like
0Likes
Like

Posted 11 October 2012 - 05:17 AM

Yeah. Made some tests. It seems that ALL fragments processed (. Thank you.
And what about stencil test? When does stencil check occurs?




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