failed assertion `For depth attachment, the render pipeline's pixelFormat (MTLPixelFormatInvalid) does not match the framebuffer's pixelFormat (MTLPixelFormatDepth32Float).
このエラーは、MetalViewをStoryboardで@IBOutlet
接続を行うときに、Object Library から新たにMetalViewを作成していると発生してしまうようです。
以下、Apple Develper Forumsよりの引用です。(翻訳済み)
デフォルトでは、オブジェクトライブラリのMetalKitビューはMTKView.depthStencilPixelformatをMTLPixelFormatDepth32Floatに設定します。
なので、superViewであるViewのクラスをMTKView
に設定します。
その後、@IBOutlet接続
をsuperViewに対して行うとこのエラーは解消できました。参考までに。
