Point cloud + edges rendering with the backface culling

Hi guys.

I have this situation, and I basically happy with the effect.

https://www.babylonjs-playground.com/#P62JIN#14

But, I want backside to not be seen. So basically, I need backface culling. But due to approach with point cloud + edgesRendering, I am not sure how can I achieve this?

In case it’s not possible with the way I did it. I also wouldn’t mind if you guys dropped some other ideas to achieve similar effect + backface culling.

Thanks.

So not tested at all but maybe this could work:

  • Turn off color write on the material
  • Render the mesh with front face culling (only rendering the back face)
  • Render your mesh as you are right now

The overall idea is to leverage depth buffer to eliminate your back faces

If disabling point clouds is an option, you can use @Deltakosh’s idea by simply disabling color write of your material:

https://www.babylonjs-playground.com/#P62JIN#15

You also need to apply a zoffset to the edge renderer line material so that the lines are not partially hidden by the zbuffer.