Reputation: 315
I am working on a 3D map in SceneKit. When I enable the Cast Shadow Property of a directional light in SceneKit, the shadows appear, but the application becomes very slow.
How do I reduce the lag while still maintaining shadows in the scene?
Upvotes: 1
Views: 271
Reputation: 58103
Use Fake Shadows (shadows generated as a texture in 3D authoring or 2D authoring app) rather than True Shadow Map
. To apply fake shadows as a texture for 3D plane use PNG
file format with premultiplied alpha channel (RGB * A
). It considerably reduces Processing and Memory Usage when using shadows in RealityKit or SceneKit.
Upvotes: 1