I have a problem and I’ve tried to find it over this forum but I can’t see any relevant answers, so I’d like to ask you for help.
I’m creating mesh using vertexdata and custom shader material.
I’ve also implemented some simple clipping algorithm in fragment shader (lines: 46 - 48)
Here is my simple playground: https://playground.babylonjs.com/#210L62#3
But after I clip my mesh I’d like to be able to select visible faces (I added ray helper to visualize it). If I would have array of all crossed faces I could test it with clipping coordinates and select/highlight objects which are under the clipped part of mesh.
But … Now I can only get first face of clipped geometry.
Is it possible to get all faces id through ray?
I took some code from subMesh._intersectTriangles and it works really nice. Below PG if somebody will be facing with the same problem: https://playground.babylonjs.com/#A7LPI4#4