From 8686233b4939cb5960d09cc7d4ae86fed23b5420 Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Sun, 6 Jul 2025 09:19:05 +0200 Subject: [PATCH] Fix depth test in lobby on Quest 3 --- client/scenes/lobby.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/scenes/lobby.cpp b/client/scenes/lobby.cpp index f60e8cd2..7bceb033 100644 --- a/client/scenes/lobby.cpp +++ b/client/scenes/lobby.cpp @@ -966,6 +966,12 @@ void scenes::lobby::render(const XrFrameState & frame_state) .depthMask = true, .compareOp = application::get_config().passthrough_enabled ? XR_COMPARE_OP_LESS_FB : XR_COMPARE_OP_LESS_OR_EQUAL_FB, }; + XrCompositionLayerDepthTestFB layer_depth_test_bg{ + .type = XR_TYPE_COMPOSITION_LAYER_DEPTH_TEST_FB, + .next = nullptr, + .depthMask = true, + .compareOp = XR_COMPARE_OP_ALWAYS_FB, + }; // if (composition_layer_depth_test_supported or not application::get_config().passthrough_enabled) layers_with_z_index.emplace_back(constants::lobby::zindex_lobby, reinterpret_cast(&lobby_layer)); @@ -977,7 +983,7 @@ void scenes::lobby::render(const XrFrameState & frame_state) if (composition_layer_depth_test_supported) { - lobby_layer.next = &layer_depth_test; + lobby_layer.next = &layer_depth_test_bg; for (auto & [z_index, layer]: imgui_layers) {