在 SceneKit 中使用阴影时减少应用程序延迟 [英] Reduce Application Lag while using shadows in SceneKit

查看:27
本文介绍了在 SceneKit 中使用阴影时减少应用程序延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 SceneKit 中处理 3D 地图.当我在 SceneKit 中启用定向光的投射阴影属性时,会出现阴影,但应用程序变得非常慢.

如何在保持场景阴影的同时减少延迟?

解决方案

使用

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?

解决方案

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.

这篇关于在 SceneKit 中使用阴影时减少应用程序延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆