title: SceneKit Culling Plane
body: <p>I have a SCNScene rendering in a SCNView. I have some *.dae models that are rendered/moving in the scene.</p>
  
  <p>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.</p>
  
  <p>Is there any property/setting/shader I can apply to the transparent cube so that anything behind it is not rendered?</p>
  
  <p>Example:</p>
  
  <p>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.</p>
  
  <p><a href="https://i.stack.imgur.com/bnCLy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bnCLy.png" alt="Cull"></a></p>
  
  <p>This developer has an occlusion shader which does what I need, but it's Unity: <a href="https://youtu.be/MK3D91kCKzM" rel="noreferrer">https://youtu.be/MK3D91kCKzM</a></p>
  
  <p>Kind Regards</p>
  
  <p>Chris</p>