# Will the fragments out of the rect defined by glScissor() be processed by Pixel Shader ?

**URL:** <https://forums.imgtec.com/t/will-the-fragments-out-of-the-rect-defined-by-glscissor-be-processed-by-pixel-shader/1957>\
**Category:** PowerVR Insider\
**Created:** [December 5, 2013, 6:08am UTC](https://forums.imgtec.com/t/will-the-fragments-out-of-the-rect-defined-by-glscissor-be-processed-by-pixel-shader/1957 "2013-12-05T06:08:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrishoo](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@chrishoo](https://forums.imgtec.com/u/chrishoo)\
**Post date:** [December 5, 2013, 6:08am UTC](https://forums.imgtec.com/t/will-the-fragments-out-of-the-rect-defined-by-glscissor-be-processed-by-pixel-shader/1957/1 "2013-12-05T06:08:36Z")

</div>

HI all  
  
If I define a rect (x=0, y=0, w=300, h=300) using glScissor(), I want to know whether the clip operation executing before Pixel Shader or after it?  
  
  
  
If a fragment represents the pixel(301, 301) on screen, it cannot be drawn on screen buffer surely. But I want to know if it is cut off before entering the Pixel Shader.  
  
  
  
  
  
  
  
Thanks a lot!  
  
Chris

---

<div class="post-metadata">

**Author:** ![chrishoo](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@chrishoo](https://forums.imgtec.com/u/chrishoo)\
**Post date:** [December 5, 2013, 8:28am UTC](https://forums.imgtec.com/t/will-the-fragments-out-of-the-rect-defined-by-glscissor-be-processed-by-pixel-shader/1957/2 "2013-12-05T08:28:57Z")

</div>

Sorry for “Pixel Shader” , I means “Fragments Shader”.

---

<div class="post-metadata">

**Author:** ![JoeDavis](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/joedavis/32/71_2.png) [@JoeDavis](https://forums.imgtec.com/u/JoeDavis)\
**Post date:** [December 11, 2013, 9:16am UTC](https://forums.imgtec.com/t/will-the-fragments-out-of-the-rect-defined-by-glscissor-be-processed-by-pixel-shader/1957/3 "2013-12-11T09:16:02Z")

</div>

Hi Chris,  
  
  
  
The scissor is applied before fragment shaders execute. The only fragments that will be shaded are those that fall within the bounds of the scissor region.  
  
  
  
Thanks,  
  
Joe

---

<div class="post-metadata">

**Author:** ![chrishoo](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@chrishoo](https://forums.imgtec.com/u/chrishoo)\
**Post date:** [January 28, 2014, 1:58am UTC](https://forums.imgtec.com/t/will-the-fragments-out-of-the-rect-defined-by-glscissor-be-processed-by-pixel-shader/1957/4 "2014-01-28T01:58:33Z")

</div>

Thank you, Joe.
