【问题标题】:SCNCamera.exposureOffset not working in iOS13SCNCamera.exposureOffset 在 iOS13 中不起作用
【发布时间】:2020-03-26 17:46:39
【问题描述】:

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

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

【问题讨论】:

    标签: swift scenekit augmented-reality arkit


    【解决方案1】:

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

    var wantsHDR: Bool { get set }
    

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

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

    但是 iOS 13 和 iOS 13 Simulator 中存在一个错误。但是,如果您禁用 allowsCameraControl,则 exposureOffset 可以正常工作。

    sceneView.allowsCameraControl = false
    

    以下是exposureOffset 从 -2 变为 2 的方式:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-28
      • 1970-01-01
      相关资源
      最近更新 更多