ARKit / SceneKit: Shadow gets cut off around the edges of the view

716 views Asked by At

I'm trying to add shadows in ARKit using a directional light and planes on which to cast the shadows. When moving the camera however, parts of the shadow (not the plane) get cut off.

I'm using a directional light with shadow mode set to deffered. The plane's lighting model is set to constant.

I thought this had something to do with the zNear and zFar value, but changing these did not have any effect. When I set the light's automaticallyAdjustsShadowProjection property to false however, it does not get cut off anymore, but the shadow itself looks really bad.

ARKit shadow

What can I do to fix this?

0

There are 0 answers