Using MPMoviePlayerController as texture in SceneKit

前端 未结 2 1392
轻奢々
轻奢々 2020-12-21 14:50

I created a cube in scenekit and tried to use an instance of an MPMoviePlayerController as its material. It kind-ish works but not exactly well: the video seems to be very j

相关标签:
2条回答
  • 2020-12-21 14:59

    I opened a radar about AVPlayerLayer not working as a SceneKit texture (on device... works on simulator!). Apple was kind enough to reply saying this was working as intended, and supplied an alternative:

    AVPlayerLayer are rendered out of process on the device and can’t be used as a texture. Please use a SKVideoNode for this instead.

    0 讨论(0)
  • 2020-12-21 15:17

    In recent versions of SceneKit you can directly set an AVPlayer as the contents of a SCNMaterialProperty instance.

    0 讨论(0)
提交回复
热议问题