From d34d1e4af9e8dbb87a18bcf0ddb652b140bad9e6 Mon Sep 17 00:00:00 2001 From: Lubos Date: Mon, 15 Aug 2022 17:41:04 +0200 Subject: [PATCH] OpenXR - Ensure PSP aspect ratio for 2D content --- Common/VR/VRRenderer.cpp | 2 +- GPU/GLES/ShaderManagerGLES.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/VR/VRRenderer.cpp b/Common/VR/VRRenderer.cpp index 1a17cb9f1b..d77f8797fd 100644 --- a/Common/VR/VRRenderer.cpp +++ b/Common/VR/VRRenderer.cpp @@ -394,7 +394,7 @@ void VR_EndFrame( engine_t* engine ) { cylinder_layer.pose.position = pos; cylinder_layer.radius = 12.0f; cylinder_layer.centralAngle = M_PI * 0.5f; - cylinder_layer.aspectRatio = height / (float)width; + cylinder_layer.aspectRatio = 1; engine->appState.Layers[engine->appState.LayerCount++].Cylinder = cylinder_layer; } else { diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index 27592296eb..3fca97ea87 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -346,7 +346,7 @@ void LinkedShader::UpdateUniforms(u32 vertType, const ShaderID &vsid, bool useBu if (hud) { float scale = 0.5f; render_->SetUniformF1(&u_scaleX, scale); - render_->SetUniformF1(&u_scaleY, scale / 16.0f * 9.0f); + render_->SetUniformF1(&u_scaleY, scale / 480.0f * 272.0f); } else { render_->SetUniformF1(&u_scaleX, 1.0f); render_->SetUniformF1(&u_scaleY, 1.0f);