首页 > 解决方案 > SceneKit 在 Sun 上有黑色环,使用 HDRI (exr) 作为场景背景和照明环境

问题描述

这很奇怪,因为这个错误并没有出现在我的带有 A9 芯片和 iOS 14.8 的旧设备上。但在 A12 设备和 iOS 模拟器上,它始终适用于 iOS 14 和 15。

node.camera?.wantsHDR = true
node.camera?.wantsDepthOfField = true
node.camera?.wantsExposureAdaptation = true
node.camera?.automaticallyAdjustsZRange = true

if let env = assetMap[.HDRI]?.first {    
   let path = env.path
   scene.background.contents = path
   scene.lightingEnvironment.contents = path
}

在此处输入图像描述

您可以在这里找到一些测试图像: https ://ambientcg.com/list?category=OutdoorHDRI

标签: iosscenekitmetalopenexrhdrimages

解决方案


推荐阅读