Group Group Group Group Group Group Group Group Group

Question about setScissorRect

Hi,

I have a question about setScissorRect. When it is applied will it prevent computation of pixels outside of this rectangle or does it just clip the output when everything is computed ?

In other words, can it be used as an optimization tool to limit shader computations ?

Thanks a lot. Great book btw.

The documentation says The rendering pipeline discards fragments that lie outside the scissor rectangle.
So yes it is an optimization - fragment functions won’t be performed on fragments outside the scissor rectangle.

Thanks for the answer Caroline. I was just not sure if it was discarded before or after computation :slight_smile: