Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix depth buffer error when using MSAA on visionOS

Ricardo Sanchez-Saez247dad1b7d68
diff --git a/modules/visionos_xr/visionos_xr_interface.mm b/modules/visionos_xr/visionos_xr_interface.mm
index f180dec47da..f03db7a3f04 100644
--- a/modules/visionos_xr/visionos_xr_interface.mm
+++ b/modules/visionos_xr/visionos_xr_interface.mm
@@ -563,7 +563,7 @@ RID VisionOSXRInterface::RenderThread::get_depth_texture() {
MTL::texture_type_from_metal(depth_texture.textureType),
pixel_formats->getDataFormat((MTL::PixelFormat)depth_texture.pixelFormat),
MTL::texture_samples_from_metal(depth_texture.sampleCount),
- RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT,
+ RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_DEPTH_RESOLVE_ATTACHMENT_BIT,
(uint64_t)depth_texture,
depth_texture.width,
depth_texture.height,