From 4899ea3d2b7b92b10d27392382e39412661d7f18 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 6 Sep 2023 19:52:53 -0400 Subject: [PATCH] VITA/NX: Fix rendering of textures with alpha blending on HUD (sniper scope) --- source/gl_draw.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/gl_draw.c b/source/gl_draw.c index bfea6db..06ee759 100644 --- a/source/gl_draw.c +++ b/source/gl_draw.c @@ -940,6 +940,10 @@ void Draw_AlphaStretchPic (int x, int y, int width, int height, float alpha, qpi glColor4f (1,1,1,alpha); glDisable (GL_ALPHA_TEST); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } else { + glDisable (GL_ALPHA_TEST); + glEnable (GL_BLEND); + glDepthMask(GL_FALSE); } if (scrap_dirty) @@ -976,6 +980,9 @@ void Draw_AlphaStretchPic (int x, int y, int width, int height, float alpha, qpi glEnable(GL_ALPHA_TEST); glDisable (GL_BLEND); glColor4f (1,1,1,1); + } else { + glDepthMask(GL_TRUE); + glDisable(GL_BLEND); } }