View Full Version : Transparency Problem
I am using the transparency feature to draw an object that is made up of around 20000 triangular facets. To increase the speed, I use the gllist to create a single entity.
How do I sort the facets so that I get the correct transparency from different angles?
Many thanks
JanHH
12-28-2003, 05:20 PM
What you want to do is simply not possible. When drawing transparent parts over other transparent parts, you have to draw them depth-sorted in back-to-front order, and to do so, you cannot use display lists, but you might use vertex arrays/vertex buffer objects.
Jan
How is it that when I use solid colours, then I do not have to worry about sorting the facets. They all appear correct whichever view angle I look at ie I only see the entities that are not obstructed by something else.
Many thanks
PanzerSchreck
12-29-2003, 12:33 AM
That's because Blending is done on the framebuffer and not per-Fragment like alpha testing for example. That means if you first draw a translucent primitive whose depth is lower than the depth of the second one, you won't see the second one cause of the depth-test. So you'll have to sort the primitives by yourself.
Try disabling depth test and modulate on when drawing the transparent primitives.
Azazel
01-19-2004, 09:54 PM
Lamers, only lamers here... Dont you know there is function glCullFace? First you must cull front faces, then draw your object. Then you cull back faces and draw object again! Enjoy!
I really dont know why I told you that masonic secret...
ZbuffeR
01-19-2004, 10:02 PM
Originally posted by Azazel:
Lamers, only lamers here... Dont you know there is function glCullFace? First you must cull front faces, then draw your object. Then you cull back faces and draw object again! Enjoy!
I really dont know why I told you that masonic secret...
LOL ... and if your transparent object is not convex, what do you do ?
Many thanks for all your comments and suggestions
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.