Is there a way to avoid the seemingly unnecessary cost of UpdateDepthTexture?

Looking at the Frame Debugger in Unity 5 I see that everything is being draw twice. I’m using forward rendering and have some large geometry that I would really prefer not to draw twice. Is there a way to avoid having this geo go through UpdateDepthTexture? If not, can this please be fixed?

Image Effects will often require it though.

I would prefer to have some choice over that especially when targeting mobile.

1 Like

In case anyone else runs into this and is looking for a solution it looks like a potential workaround is using command buffers for finer control over the rendering pipeline. I’m experimenting with a command buffer to render my mesh after the UpdateDepthTexture pass which seems to work. Not very convenient but it’s better than nothing.

1 Like

It’s crazy to think that Unity is still rendering things twice, is it still doing that in deferred mode? Because that would be very odd, especially on Windows & OSX.