Depth buffer performance on mobile?

I’m working in Unreal and am wondering what kind of performance issues could arise from using the depth buffer in a translucent shader for a mobile title.

I know this usually boils down to, “well, how much of the screen…and how many objects overlap?”

But I was hoping someone could frame their own battle story or suggest technical references. I guess I’m really looking for a rating of how expensive it is from “about as bad as an additive material” to “uhm…try to avoid it.”

Does it just cost about as much as a texture read or does it slightly stall the pipeline?

Note that this answer is coming from limited mobile experience in unity

My understanding is that the large cost of the depth buffer is actually in creating it, because it’s a full screen pass and mobile GPUs are TERRIBLE at processing the full screen. Reading from the depth buffer that already exists, unless you’re doing offsets in the lookup, should be quite fast- it’s also in memory already, so I’d guess faster than a texture sample?

1 Like