Z Passes and Transparencies
by Florian Ross · in Torque Game Engine Advanced · 06/29/2005 (1:48 am) · 2 replies
Hi,
As far as i know TSE doesnt write any Z-values for materials that are marked as Transparent (materialwise) unless i say to do so.
Would it be possible to use the TEXKILL Instruction on completely transparent fragments (with a threshold maybe) to discard fragments along with their Z-value. This would make post effects like depth of field alot easier to do as it would have the real z values stored in the Depth buffer.
perfect example would be a tree with texture mapped leafes. Those Leafes would either have no own Z Value or the Space around them (which could be terrain in the distance) would have Leaf Z-values.
In both cases Depth of Field wouldnt be able to produce correct results in one pass.
As far as i know TSE doesnt write any Z-values for materials that are marked as Transparent (materialwise) unless i say to do so.
Would it be possible to use the TEXKILL Instruction on completely transparent fragments (with a threshold maybe) to discard fragments along with their Z-value. This would make post effects like depth of field alot easier to do as it would have the real z values stored in the Depth buffer.
perfect example would be a tree with texture mapped leafes. Those Leafes would either have no own Z Value or the Space around them (which could be terrain in the distance) would have Leaf Z-values.
In both cases Depth of Field wouldnt be able to produce correct results in one pass.
About the author
#2
07/05/2005 (3:09 pm)
Looking forward to it! There are a lot of issues with transparencies that a bit of alpha testing should clear up nicely.
Torque Owner Brian Ramage
Black Jacket Games