swift - SCNCamera.exposureOffset 在 iOS13 中不起作用

标签 swift scenekit augmented-reality arkit

SCNCamera.wantsHDR 为真。然而,对 SCNCamera.exposureOffset 的任何更改在 iOS13 设备上都不可见。但它在 iOS12 上运行得很好。

if let camera = self.sceneView.pointOfView?.camera {
    camera.exposureOffset = -5
}

最佳答案

你说的完全正确,如果有人想在 SceneKit 中使用 exposureOffset 实例属性,他/她需要首先激活 wantsHDR 属性:

var wantsHDR: Bool { get set }

在实际代码中,它可能如下所示:

sceneView.pointOfView!.camera!.wantsHDR = true 
sceneView.pointOfView!.camera!.exposureOffset = -5

但 iOS 13 和 iOS 13 模拟器中存在错误。但是,如果禁用 allowsCameraControl,exposureOffset 就可以正常工作。

sceneView.allowsCameraControl = false

Here's how exposureOffset changes from -2 to 2:

enter image description here

关于swift - SCNCamera.exposureOffset 在 iOS13 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59133410/

相关文章:

cocoa-touch - ARKit人脸追踪PBR

ios - 在 Scenekit 中设置高尔夫球物理

java - 您如何获得项目的可视化 map ?

iPhone SDK 3.0 相机访问

ios - 如何使用手势旋转和缩放ARKit模型?

ios - 在 Swift 中使用 ReactiveCocoa 4 观察对象属性

ios - swift3、Xcode 8.3 导航设置 titleTextAttributes 失败

ios - 隐藏 SCNFloor 但使用 SceneKit 显示阴影(快速)

json - 使用 alamofire + swift 获取动态加载的 html

ios - 快速检查网络速度