0
votes

I have an ARKit App using SceneKit to render. I am using a directional light that casts shadows onto an invisible floor plane. In order to do this I have to (?) use shadowMode = .deferred on the light. But this results in the ugly self shadowing in the image:

Box casting self shadow How can I avoid this and still keep the shadow on the floor plane? The lighting seems fine with shadowMode = .forward, but then I get no shadow on the floor.

2

2 Answers

0
votes

There are few methods that could fix this problem.

  1. To use .constant SCNMaterial.LightingModel.
  2. To manipulate with SCNMaterialProperty
  3. To manipulate with categoryBitMask of the node and the light source. Hope it helps!
-2
votes

@Hans, did any of the suggested methods fix the unwanted self shadowing issue? We are running into a similar issue with our app.