About depth texture and PostProcess

I want to get the depth texture by “scene.enableDepthRenderer”,
but when I render it in PostProcess,I won’t get black and white picture.
I think it should be black and white picture,why not?

You must add “depthSampler” in the list of samplers used by the shader:

Note that you will get red display because the depth renderer uses a “R” texture and not “RGB” / “RGBA”.