Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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 nikitablack   Members   -  Reputation: 583

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: 7801

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 nikitablack   Members   -  Reputation: 583

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