Learning webgl_depth_texture example

It’s a very strange example. here:
https://threejs.org/examples/#webgl_depth_texture
What’s wrong with it?
It seems doing nothing. It include SSAOShader.js but doing nothing with it. And it shows nothing specials on screen:
Screenshot%20from%202019-02-26%2023-13-09

This is indeed a mistake. The import should be removed (see Examples: Removed unused import in webgl_depth_texture by Mugen87 · Pull Request #15843 · mrdoob/three.js · GitHub)

Well, it visualizes the depth of the scene via THREE.DepthTexture. That is quite something!

1 Like

Yes! How stupid I am… I missed lots of things.
After I learned WebglRenderTarget ,DepthTexture and depth buffer…
Thanks for your answer which lead me to learn how postprocessing works.
By the way, the tDiffuse seems unnecessary in that example.