diff --git a/shell/ios/AppDelegate.mm b/shell/ios/AppDelegate.mm index d2aa3c00e2..4f428ea044 100644 --- a/shell/ios/AppDelegate.mm +++ b/shell/ios/AppDelegate.mm @@ -42,6 +42,7 @@ - (BOOL)application:(UIApplication*)application .majorVersion = 3, .minorVersion = 0}, .swapchainColorTextureFormat = igl::TextureFormat::BGRA_SRGB, + .depthTextureFormat = igl::TextureFormat::S8_UInt_Z32_UNorm, }, #endif #if IGL_BACKEND_OPENGL @@ -52,6 +53,7 @@ - (BOOL)application:(UIApplication*)application .majorVersion = 3, .minorVersion = 0}, .swapchainColorTextureFormat = igl::TextureFormat::BGRA_SRGB, + .depthTextureFormat = igl::TextureFormat::S8_UInt_Z24_UNorm, }, #endif { @@ -60,6 +62,7 @@ - (BOOL)application:(UIApplication*)application .majorVersion = 2, .minorVersion = 0}, .swapchainColorTextureFormat = igl::TextureFormat::BGRA_SRGB, + .depthTextureFormat = igl::TextureFormat::S8_UInt_Z24_UNorm, }, #endif // @fb-only diff --git a/shell/ios/ViewController.mm b/shell/ios/ViewController.mm index 8fa521b8b3..f8455d15cc 100644 --- a/shell/ios/ViewController.mm +++ b/shell/ios/ViewController.mm @@ -130,7 +130,7 @@ - (void)initRenderSessionController { IGL_DEBUG_ASSERT(platformDevice); return igl::SurfaceTextures{ .color = platformDevice->createTextureFromNativeDrawable((CAEAGLLayer*)layer_, nullptr), - .depth = platformDevice->createTextureFromNativeDepth((CAEAGLLayer*)layer_, igl::TextureFormat::Z_UNorm16, nullptr), + .depth = platformDevice->createTextureFromNativeDepth((CAEAGLLayer*)layer_, config_.depthTextureFormat, nullptr), }; } #endif