I have a SCNScene rendering in a SCNView. I have some *.dae models that are rendered/moving in the scene.
I have a transparent cube, when one of my models goes behind it, I would like the model to not be rendered, because at the moment, as the cube is transparent, you can see it through the cube.
Is there any property/setting/shader I can apply to the transparent cube so that anything behind it is not rendered?
Example:
My eye is the green dot, the cube is the blue square, my model is the red circle, However the part of the circle hidden by the cube is purple...this would actually be invisible. The blue square would be invisible too.
This developer has an occlusion shader which does what I need, but it's Unity: https://youtu.be/MK3D91kCKzM
Kind Regards
Chris
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…