DepthRenderer with PointsCloudSystem

Hello, I am new to BabylonJS. I want to get the depth buffer from a PointsCloudSystem but when rendering the depth buffer I get nothing. There is a PG with a minimal example https://playground.babylonjs.com/#RCUHJA#120. Solid particles work fine but are not a viable solution to my use case.

I found a similar example where a custom material is used but I wonder if it is possible to use the default material or there is something special about the PointsCloudSystem that needs special handling. Thank you in advance.

Welcome aboard!

You will need the material plugin described in this other thread to make PCS write to the depth buffer as the default depth material can’t handle it. You can simplify it a bit if you don’t need the size attenuation feature:

1 Like