PDA

View Full Version : performance of early-Z



olmeca
03-06-2007, 07:35 AM
Hi,

I just wondered, in which situations early-Z would provide best results (regarding speed)

1. Computationally inexpensive fragment shader - multipass

2. Computationally expensive fragment shader - in a single pass algorithm?


thanks in advance,
Benjamin

zeoverlord
03-06-2007, 08:40 AM
#2 since then you will only render the fragments you need to render.
however in #1 you can sometimes get early z for free by not clearing the depth buffer after the first pass.
Both situations will have a speed increase with early z.