On 14 Jul 2007, at 00:45, Pierre-Olivier Latour wrote:
The wrong assumption people make is that since alpha is 0, then the
pixel doesn't exist: that's not correct, the pixel exists, is depth-
tested _before_ being drawn, independently of its alpha value. Then
if it passes the test, it's drawn but since its alpha is 0, it's
just not visible in the color buffer, but this still updates the
depth buffer.
That's normal GL behavior, not QC specific.
Thanks very much to everyone for the info. It seems that a common
way of getting around this in some other engines is a "alpha_nibble"
or discard process which actually disables rendering pixels whose
alpha is zero before they get depth_tested.
Is this possible (maybe with a custom CI_filter) inside Quartz
Composer? Although this only gives you "on/off" alpha it would
work for what I'm trying to achieve in this exact case.
If I have to sort instead, then can anyone point me to an algorithm
that will work with an upstream camera transform? eg I need
a 3d environment node to be able to rotate the iterators which will
draw the sprites in any axis. So the drawing order will need to
take into account camera position. I realise this is probably CG101
stuff but I'm really a compositor who only knows enough to annoy
proper CG people :)
How do most other 3d engines handle this? Do they have a "sort all
objects in this environment by order" function which runs automatically?