@@ -135,14 +135,16 @@ void RND_Renderer::EndFrame() {
135135RND_Renderer::Layer3D::Layer3D (VkExtent2D extent) {
136136 auto viewConfs = VRManager::instance ().XR ->GetViewConfigurations ();
137137
138+ this ->m_recommendedAspectRatios [OpenXR::EyeSide::LEFT] = (float )viewConfs[0 ].recommendedImageRectWidth / (float )viewConfs[0 ].recommendedImageRectHeight ;
139+ this ->m_recommendedAspectRatios [OpenXR::EyeSide::RIGHT] = (float )viewConfs[1 ].recommendedImageRectWidth / (float )viewConfs[1 ].recommendedImageRectHeight ;
140+
138141 this ->m_presentPipelines [OpenXR::EyeSide::LEFT] = std::make_unique<RND_D3D12::PresentPipeline<true >>(VRManager::instance ().XR ->GetRenderer ());
139142 this ->m_presentPipelines [OpenXR::EyeSide::RIGHT] = std::make_unique<RND_D3D12::PresentPipeline<true >>(VRManager::instance ().XR ->GetRenderer ());
140143
141- // note: it's possible to make a swapchain that matches Cemu's internal resolution and let the headset downsample it, although I doubt there's a benefit
142- this ->m_swapchains [OpenXR::EyeSide::LEFT] = std::make_unique<Swapchain<DXGI_FORMAT_R8G8B8A8_UNORM_SRGB>>(viewConfs[0 ].recommendedImageRectWidth , viewConfs[0 ].recommendedImageRectHeight , viewConfs[0 ].recommendedSwapchainSampleCount );
143- this ->m_swapchains [OpenXR::EyeSide::RIGHT] = std::make_unique<Swapchain<DXGI_FORMAT_R8G8B8A8_UNORM_SRGB>>(viewConfs[1 ].recommendedImageRectWidth , viewConfs[1 ].recommendedImageRectHeight , viewConfs[1 ].recommendedSwapchainSampleCount );
144- this ->m_depthSwapchains [OpenXR::EyeSide::LEFT] = std::make_unique<Swapchain<DXGI_FORMAT_D32_FLOAT>>(viewConfs[0 ].recommendedImageRectWidth , viewConfs[0 ].recommendedImageRectHeight , viewConfs[0 ].recommendedSwapchainSampleCount );
145- this ->m_depthSwapchains [OpenXR::EyeSide::RIGHT] = std::make_unique<Swapchain<DXGI_FORMAT_D32_FLOAT>>(viewConfs[1 ].recommendedImageRectWidth , viewConfs[1 ].recommendedImageRectHeight , viewConfs[1 ].recommendedSwapchainSampleCount );
144+ this ->m_swapchains [OpenXR::EyeSide::LEFT] = std::make_unique<Swapchain<DXGI_FORMAT_R8G8B8A8_UNORM_SRGB>>(extent.width , extent.height , viewConfs[0 ].recommendedSwapchainSampleCount );
145+ this ->m_swapchains [OpenXR::EyeSide::RIGHT] = std::make_unique<Swapchain<DXGI_FORMAT_R8G8B8A8_UNORM_SRGB>>(extent.width , extent.height , viewConfs[1 ].recommendedSwapchainSampleCount );
146+ this ->m_depthSwapchains [OpenXR::EyeSide::LEFT] = std::make_unique<Swapchain<DXGI_FORMAT_D32_FLOAT>>(extent.width , extent.height , viewConfs[0 ].recommendedSwapchainSampleCount );
147+ this ->m_depthSwapchains [OpenXR::EyeSide::RIGHT] = std::make_unique<Swapchain<DXGI_FORMAT_D32_FLOAT>>(extent.width , extent.height , viewConfs[1 ].recommendedSwapchainSampleCount );
146148
147149 this ->m_presentPipelines [OpenXR::EyeSide::LEFT]->BindSettings ((float )this ->m_swapchains [OpenXR::EyeSide::LEFT]->GetWidth (), (float )this ->m_swapchains [OpenXR::EyeSide::LEFT]->GetHeight ());
148150 this ->m_presentPipelines [OpenXR::EyeSide::RIGHT]->BindSettings ((float )this ->m_swapchains [OpenXR::EyeSide::RIGHT]->GetWidth (), (float )this ->m_swapchains [OpenXR::EyeSide::RIGHT]->GetHeight ());
@@ -403,8 +405,7 @@ RND_Renderer::Layer2D::Layer2D(VkExtent2D extent) {
403405
404406 this ->m_presentPipeline = std::make_unique<RND_D3D12::PresentPipeline<false >>(VRManager::instance ().XR ->GetRenderer ());
405407
406- // note: it's possible to make a swapchain that matches Cemu's internal resolution and let the headset downsample it, although I doubt there's a benefit
407- this ->m_swapchain = std::make_unique<Swapchain<DXGI_FORMAT_R8G8B8A8_UNORM_SRGB>>(viewConfs[0 ].recommendedImageRectWidth , viewConfs[0 ].recommendedImageRectHeight , viewConfs[0 ].recommendedSwapchainSampleCount );
408+ this ->m_swapchain = std::make_unique<Swapchain<DXGI_FORMAT_R8G8B8A8_UNORM_SRGB>>(extent.width , extent.height , viewConfs[0 ].recommendedSwapchainSampleCount );
408409
409410 this ->m_presentPipeline ->BindSettings ((float )this ->m_swapchain ->GetWidth (), (float )this ->m_swapchain ->GetHeight ());
410411
0 commit comments