diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index d36a68fe7a..61cf889311 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -364,18 +364,20 @@ 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 fog on - else if (gstate.isFogEnabled()) hud = false; - //HUD cannot be rendered with lights on - else if (gstate.isLightingEnabled()) hud = false; + //HUD cannot be rendered with depth color mask + else if (gstate.isClearModeDepthMask()) 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 && gstate.getDepthTestFunction() == GE_COMP_NEVER) 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; + 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 + else if ((gstate.getClearModeColorMask() == 0xFFFFFF) && (gstate.getColorMask() == 0xFFFFFF)) hud = false; return hud; }