alpha sorting
Why must alpha enabled prmitives be sorted at all? I understand that they all need to be drawn after the non-alpha prims, but afterwards why do the still need to be z-sorted?
"Never have a battle of wits with an unarmed man. He will surely attempt to disarm you as well"~Vendayan
Basically the card won''t care what order you give the polys to it. So if you were to pass an alpha poly that is supposed to be in front of another alpha poly first, then the alpha wouldn''t come out right. Let me try some ascii art to help
1 is the farthest back object, 2 is an alpha poly in front of it, 3 is another alpha poly. When looking from the eye, the colors will only be correct if you draw 1, 2, 3. If you were to draw 1, 3, 2 then 2 would not actually be drawn because of z buffer so you would loose all color from it.
Clear as mud now?
Always remember, you''''re unique. Just like everyone else.
Greven
+ | ]+ | ] <-eye+ | ]^1 ^2 ^3
1 is the farthest back object, 2 is an alpha poly in front of it, 3 is another alpha poly. When looking from the eye, the colors will only be correct if you draw 1, 2, 3. If you were to draw 1, 3, 2 then 2 would not actually be drawn because of z buffer so you would loose all color from it.
Clear as mud now?
Always remember, you''''re unique. Just like everyone else.
Greven
Always remember, you''re unique. Just like everyone else.Greven
December 17, 2002 09:55 AM
i have a project that is about 95% alpha blended tris. i do not have to sort the tris. i just turn off z buffer writing. i do sort the objects, as each has a separate vertex buffer and is thus rendered at a different point in time, but i do not sort the tris. and everything comes out fine.
quote: Original post by Anonymous Poster
i have a project that is about 95% alpha blended tris. i do not have to sort the tris. i just turn off z buffer writing. i do sort the objects, as each has a separate vertex buffer and is thus rendered at a different point in time, but i do not sort the tris. and everything comes out fine.
That''s because you''re not using ZBuffer, but with ZBuffer things
comes out better...
KaMiKaZe
December 17, 2002 12:11 PM
quote: Original post by Kamikaze15
That''s because you''re not using ZBuffer, but with ZBuffer things
comes out better...
could someone please explain this statement to me? my scene renders perfectly, so what am i missing?
and i do use the z buffer, i just turn off writing to it for the alpha blended stuff.
OK, I feel stupid now for not seeing the z-buffer prob, but what do I do if I am rendering 2 intersecting alpha polys?! Is it feasible just to disable z-writes before drawing all my alpha polys, or is there another problem that will show itself in that technique?
~Vendayan
~Vendayan
"Never have a battle of wits with an unarmed man. He will surely attempt to disarm you as well"~Vendayan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement