performance of early-Z


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,

#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.