Depth Buffer in material shader


#1

I try to access the depth buffer in a shader, but sadly since the change to the layer system it is not possible to use ‘this.entity.camera.camera.requestDepthMap();’ to autogenerate the depth texture (as in this example).

There is also a thread discussing post processing effects using depth, sadly without a good solution.

Is there any documentation / example showing how to generate and access the depth texture(for the world layer or any other)?