Skip to content

Instantly share code, notes, and snippets.

@giln
Created March 4, 2019 14:47
Show Gist options
  • Save giln/6007a2e9c8f49646759aaaa0063605ba to your computer and use it in GitHub Desktop.
Save giln/6007a2e9c8f49646759aaaa0063605ba to your computer and use it in GitHub Desktop.
PlaneNode
// This allows the material to be invisible but still receive shadows and perform occlusion (hide objects behind them).
let material = SCNMaterial()
material.lightingModel = .constant
material.writesToDepthBuffer = true
material.colorBufferWriteMask = []
geom.firstMaterial = material
geom.update(from: planeAnchor.geometry)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment