PDA

View Full Version : Drawing faces



charlieamer
04-29-2011, 12:35 PM
Hello, this is my first post here :D
I am intermediate in opengl, and I wanted to know if openGL is drawing faces behind already drawed ones. For example on cube, if front faces are drawed first, then back ones, are they decreasing performance (except on CPU, for parsing them) ?
:)

Aleksandar
04-29-2011, 12:55 PM
I have to admit that I don't understand you question.
If you think about rendering order and using early-Z or similar techniques to reduce fragment shader load and hence increase the rendering speed, than YES!

But you asked

For example on cube, if front faces are drawed first, then back ones, are they decreasing performance (except on CPU, for parsing them) ?
In fact drawing front faces first you'll get better performance, but this can be observed only if you have an expensive fragment shader.

If you are asking about back-face culling, that is totally another story.

BionicBytes
04-29-2011, 01:19 PM
Performance is not lost because behind faces fail the depth test and are not rendered. Back face culling ensures the minimum amount of vertex processing occurs.

Aleksandar
04-29-2011, 01:42 PM
When I said yes, I thought that rendering order could impact the performance. Nevertheless, depth test comes after rasterization. Back-face culling enables triangles discarding before rasterization.


Back face culling ensures the minimum amount of vertex processing occurs.What does it mean? Vertices have to be processed in order to determine orientation of the surface!

BionicBytes
04-29-2011, 01:58 PM
LOL. Of course it does! I should have said fragment processing instead.

charlieamer
04-30-2011, 10:07 AM
well, i wasn't talking about backface culling ... if back faces ARE rendered, and, let's say, big big big textures are applied to back faces, and small texture to front faces, will fps be low ? (or more clearly, if it's ordered to draw a face behind one already drawn polygon, is it time-consuming ?)

Aleksandar
04-30-2011, 10:33 AM
I really don't understand what you want to ask. :(
Try to reformulate your question.
Or if you have a problem with English, send me a private message in your native language. I bet I'll understand it better. :)