java - Texture partially off screen - performance difference -


on picture example of 2 situations, textured polygon being rendered. done opengl es2.

enter image description here

a) polygon partially off viewport b) polygon inside it

my question:

is situation 'a)' going consume less system/gpu resources*, because texture partially off screen, or perform same if rendered inside of viewport , why?

*"resources" - meaning speed, not memory.

i know opengl calculate vertices first, before rendering texture , if vertices off screen/viewport, skips further calculations, same case textured object partially off screen? will omit part of texture not visible?

situation should faster. vertex processing same. after that, clipping view volume applied. in situation a, part of polygon clipped, while whole polygon goes through in situation b. after that, polygon rasterized, , resulting fragments go fragment processing. since there fewer fragments in situation a, there's less work in stage. fragment shader texture sampling, visible parts of texture sampled in case.

clipping can happen after fragments generated, expect done before fragment shader.

while there less work in situation a, doesn't mean you'll see speed difference in rendering. have bottlenecks in other parts of pipeline, or in app code.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -