I'm currently trying to transition between two scenes in SceneKit with custom transition animations. The corresponding method SCNSceneRenderertakes SKTransitionthis:
self.presentScene(scene,
withTransition: SKTransition.fadeWithColor(UIColor.blackColor(), duration: 0.5),
incomingPointOfView: scene.cameraNode,
completionHandler: nil)
The code uses one of the built-in transitions and works fine. To create a custom transition, you need to initialize SKTransitionwith the help CIFilter, which, according to Apple's documentation , takes up two input images, the time parameter and creates one output image. Some of the predefined filters meet these requirements, for example. CIDissolveTransition:
self.presentScene(scene,
withTransition: SKTransition(CIFilter: CIFilter(name: "CIDissolveTransition")!, duration: 0.5),
incomingPointOfView: scene.cameraNode,
completionHandler: nil)
EXC_BAD_ACCESS. , , , , ( ). . - ?
edit StackOverflow . , : , , SKTransition, CIFilter.
2 : Metal. OpenGL , .
edit 3 , jet_context::set_fragment_texture EXC_BAD_ACCESS.