Check if a point is in front or behind the mesh

The 2nd solution is not practical:

https://playground.babylonjs.com/#CUH660#2

I did not finish the implementation because calling readPixels on the RenderTargetTexture each frame is a performance killer. So you should really use the shader solution.

2 Likes