From 812c7d13aa880f47aa568f8bd59e38cf648f15a9 Mon Sep 17 00:00:00 2001 From: Lubos Date: Tue, 29 Nov 2022 21:25:13 +0100 Subject: [PATCH 1/6] OpenXR - HUD disappearing in Flatout fixed --- GPU/GLES/ShaderManagerGLES.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index d36a68fe7a..7c7463fc7a 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -364,6 +364,8 @@ static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { else if (!gstate.isAlphaBlendEnabled()) hud = false; //HUD cannot be rendered with clear color mask else if (gstate.isClearModeColorMask()) hud = false; + //HUD cannot be rendered with depth color mask + else if (gstate.isClearModeDepthMask()) hud = false; //HUD cannot be rendered with fog on else if (gstate.isFogEnabled()) hud = false; //HUD cannot be rendered with lights on @@ -374,8 +376,6 @@ static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { else if (gstate_c.textureFullAlpha) hud = false; //HUD cannot render FB screenshot else if (gstate_c.curTextureHeight == 272) hud = false; - //HUD cannot render far plane - else if ((fabs(gstate.viewMatrix[9]) > 100) || (fabs(gstate.viewMatrix[11]) > 100)) hud = false; return hud; } From de78007e66ad2c9c5b59d8f6ab8e3e0e1e93da60 Mon Sep 17 00:00:00 2001 From: Lubos Date: Tue, 29 Nov 2022 22:17:12 +0100 Subject: [PATCH 2/6] OpenXR - Enable HUD in a few more games --- GPU/GLES/ShaderManagerGLES.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index 7c7463fc7a..0f730a3101 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -368,8 +368,6 @@ static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { else if (gstate.isClearModeDepthMask()) hud = false; //HUD cannot be rendered with fog on else if (gstate.isFogEnabled()) hud = false; - //HUD cannot be rendered with lights on - else if (gstate.isLightingEnabled()) hud = false; //HUD texture has to contain alpha channel else if (!gstate.isTextureAlphaUsed()) hud = false; //HUD cannot have full alpha From 1e2cf07c6b650d1a8a605ab3bd8271e79cfedc2d Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 2 Dec 2022 15:16:41 +0100 Subject: [PATCH 3/6] OpenXR - Monster Hunter HUD fixed --- GPU/GLES/ShaderManagerGLES.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index 0f730a3101..35f0a631c5 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -366,12 +366,12 @@ static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { else if (gstate.isClearModeColorMask()) hud = false; //HUD cannot be rendered with depth color mask else if (gstate.isClearModeDepthMask()) hud = false; - //HUD cannot be rendered with fog on - else if (gstate.isFogEnabled()) hud = false; //HUD texture has to contain alpha channel else if (!gstate.isTextureAlphaUsed()) hud = false; - //HUD cannot have full alpha + //HUD cannot have full texture alpha else if (gstate_c.textureFullAlpha) hud = false; + //HUD must have full vertex alpha + else if (!gstate_c.vertexFullAlpha) hud = false; //HUD cannot render FB screenshot else if (gstate_c.curTextureHeight == 272) hud = false; From 66cbe55ffc23a4615ceaa45fe65502450c6f093b Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 2 Dec 2022 16:47:26 +0100 Subject: [PATCH 4/6] OpenXR - Tony Hawk HUD fixed --- GPU/GLES/ShaderManagerGLES.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index 35f0a631c5..fed2c9d505 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -371,7 +371,7 @@ static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { //HUD cannot have full texture alpha else if (gstate_c.textureFullAlpha) hud = false; //HUD must have full vertex alpha - else if (!gstate_c.vertexFullAlpha) hud = false; + else if (!gstate_c.vertexFullAlpha && gstate.getDepthTestFunction() == GE_COMP_NEVER) hud = false; //HUD cannot render FB screenshot else if (gstate_c.curTextureHeight == 272) hud = false; From 769b1d7342e1c6454124fe85777a93a2e8b3e5e7 Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 2 Dec 2022 17:45:29 +0100 Subject: [PATCH 5/6] OpenXR - Assasins Creed rendering fixed --- GPU/GLES/ShaderManagerGLES.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index fed2c9d505..a8f919700d 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -374,6 +374,10 @@ static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { else if (!gstate_c.vertexFullAlpha && gstate.getDepthTestFunction() == GE_COMP_NEVER) hud = false; //HUD cannot render FB screenshot else if (gstate_c.curTextureHeight == 272) hud = false; + //HUD cannot be rendered with replace function + else if (gstate.getTextureFunction() == GETexFunc::GE_TEXFUNC_REPLACE) hud = false; + //HUD cannot be rendered with full clear color mask + else if ((gstate.getClearModeColorMask() == 0xFFFFFF) && (gstate.getColorMask() == 0xFFFFFF)) hud = false; return hud; } From 39c399df4712b7713513622136c8511189af3275 Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 2 Dec 2022 17:53:03 +0100 Subject: [PATCH 6/6] OpenXR - GTA Chinatown wars rendering fixed --- GPU/GLES/ShaderManagerGLES.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index a8f919700d..61cf889311 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -373,7 +373,7 @@ static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { //HUD must have full vertex alpha else if (!gstate_c.vertexFullAlpha && gstate.getDepthTestFunction() == GE_COMP_NEVER) hud = false; //HUD cannot render FB screenshot - else if (gstate_c.curTextureHeight == 272) hud = false; + else if (gstate_c.curTextureHeight % 136 <= 1) hud = false; //HUD cannot be rendered with replace function else if (gstate.getTextureFunction() == GETexFunc::GE_TEXFUNC_REPLACE) hud = false; //HUD cannot be rendered with full clear color mask