From a8375fce892d05b70e939324430738a4019125a1 Mon Sep 17 00:00:00 2001 From: cypress Date: Sat, 2 Sep 2023 20:07:25 -0400 Subject: [PATCH] NX/VITA: Fix rendering of sprites with alpha channel --- source/r_sprite.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/r_sprite.c b/source/r_sprite.c index 6765e97..8c9c6c2 100644 --- a/source/r_sprite.c +++ b/source/r_sprite.c @@ -150,7 +150,9 @@ void R_DrawSpriteModel (entity_t *e) GL_Bind(frame->gltexture); - glEnable (GL_ALPHA_TEST); + glDisable (GL_ALPHA_TEST); + glEnable (GL_BLEND); + glDepthMask(GL_FALSE); glBegin (GL_TRIANGLE_FAN); //was GL_QUADS, but changed to support r_showtris glTexCoord2f (0, frame->tmax); @@ -174,7 +176,8 @@ void R_DrawSpriteModel (entity_t *e) glVertex3fv (point); glEnd (); - glDisable (GL_ALPHA_TEST); + glDepthMask(GL_TRUE); + glDisable(GL_BLEND); //johnfitz: offset decals if (psprite->type == SPR_ORIENTED)