From b41591a5275649f406140cb26ce3f58504c16317 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 15 Jun 2024 19:07:09 +0300 Subject: [PATCH] ref: gl: decreate alphatest value for lightmapped sprites to make them easier to see With 0.5 they're too tiny --- ref/gl/gl_sprite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ref/gl/gl_sprite.c b/ref/gl/gl_sprite.c index 30fa2e59..e710b532 100644 --- a/ref/gl/gl_sprite.c +++ b/ref/gl/gl_sprite.c @@ -775,7 +775,7 @@ static qboolean R_SpriteHasLightmap( cl_entity_t *e, int texFormat ) if( texFormat != SPR_ALPHTEST ) return false; - if( e->curstate.effects & EF_FULLBRIGHT ) + if( FBitSet( e->curstate.effects, EF_FULLBRIGHT )) return false; if( e->curstate.renderamt <= 127 ) @@ -919,7 +919,8 @@ void R_DrawSpriteModel( cl_entity_t *e ) color2[1] = (float)lightColor.g * ( 1.0f / 255.0f ); color2[2] = (float)lightColor.b * ( 1.0f / 255.0f ); // NOTE: sprites with 'lightmap' looks ugly when alpha func is GL_GREATER 0.0 - pglAlphaFunc( GL_GREATER, 0.5f ); + // NOTE: make them easier to see with 0.3333, was 0.5 in original + pglAlphaFunc( GL_GREATER, 1.0f / 3.0f ); } if( R_SpriteAllowLerping( e, psprite ))