Disable Depth Prepass

Hi!

We are currently trying to evaluate the performance bottle necks and factors for our game, and we thus want to try to disable the depth prepass. I am aware, that the prepass has its merits in many situation, but for us being likely constrained in draw calls (up to 4 player splitscreen rendering) I would like to see how it performs without it.

We pretty much roll our own rendering with MRTs so we also don’t need the unity supplied depth and normal buffers. We also don’t use soft particles or other effect that would rely on the depth buffer (at least as far as I know).

tl;dr: How can we disable the depth prepass?

The depth texture pass is enabled when any one of the following things are enabled:
Soft Particles option in quality settings.
The current Camera’s Camera.depthTextureMode is set to include Depth, most frequently set by an image effect.
The brightest directional light in the scene has shadows enabled.

9 Likes