How to set Depth Buffer filter?

Unity sets different sampler filters for _CameraDepthTexture based on lighting mode.

In Forward rendering you get linear filtering. In deferred you get point (this is correct)

How can this be set manually?

alt text

PIX reveals the truth


IDirect3DDevice9::SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT)
IDirect3DDevice9::SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT)


IDirect3DDevice9::SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR)
IDirect3DDevice9::SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR)

That just sounds like a bug on our side. Will try to fix for 4.5.2.