swift - watchOS 3 支持 SCNLightingModelPhysicallyBased

标签 swift watchkit scenekit ios10 watchos-3

SCNLightingModelPhysicallyBased 是 iOS 10 引入的新光照模型。使用它时,您不必在 SceneKit 场景中放置灯光,而是可以使用环境光照。你可以试试这个 open source project .

它在我运行 iOS 10 的 iPhone 6 上运行良好。但是,它在我的 watchOS 3 Apple Watch 上不起作用。我相信这是因为 watch 运行的是 OpenGL 渲染 API 而不是 Metal 渲染 API。

似乎没有办法强制 watch 在 WKInterfaceSCNScene 上使用 Metal 渲染 API。

documentation for SCNLightingModelPhysicallyBased说 watchOS 3 支持它。

如何让 watch 运行 Metal 渲染?

最佳答案

来自 Existing Frameworks Now Available in watchOS 下的 watchOS 发行说明:

SceneKit in watchOS supports most of the features you use on other platforms, including lighting and shading, animation, physics, and particle systems, with the following exceptions:

  • 3D spatial audio implemented using SCNAudioSource or SCNAudioPlayer. Instead, use playAudioSource:waitForCompletion: or the WatchKit sound or haptic APIs.
  • Custom Metal or OpenGL shader programs implemented using SCNProgram or SCNTechnique. Instead, customize SceneKit rendering with shader modifiers (to learn more, see SCNShadable).
  • Core Image filters for node rendering implemented using the SCNNode filters property. Instead, customize rendering with shader modifiers (see SCNShadable).
  • The physically-based material and lighting and HDR camera effects introduced in iOS 10, tvOS 10, and OS X v10.12.

关于swift - watchOS 3 支持 SCNLightingModelPhysicallyBased,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38889264/

相关文章:

ios - 如何从 NSNumberFormatter 获取准确的值?

更快的 Twitter 设置

java - 如何操作我从我的应用程序启动的应用程序

swift - Apple WatchKit 2 中主 Controller 的分层导航

ios - Apple Watch v1.01 WKInterfaceTable 行的语音辅助功能不起作用

ios - watch APP可以实现加速api吗?

swift - SceneKit-SCNText居中错误

ios - 1 个物理对象上的多个碰撞位掩码?

ios - 如何在使用物理时在 SceneKit 中移动子节点及其父节点?

objective-c - 在 SceneKit 下可靠地访问和修改捕获的相机帧