diff --git a/engine/client/renderer.c b/engine/client/renderer.c index 5aa3c37af..f066c4a13 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -164,6 +164,7 @@ cvar_t gl_shadeq1 = {"gl_shadeq1", "0", NULL, CVAR_CHEAT}; //FIXME: :( cvar_t gl_shadeq1_name = {"gl_shadeq1_name", "*"}; cvar_t gl_blend2d = {"gl_blend2d", "0"}; +cvar_t gl_blendsprites = {"gl_blendsprites", "0"}; #endif cvar_t r_bloodstains = {"r_bloodstains", "1"}; @@ -335,6 +336,7 @@ void GLRenderer_Init(void) Cvar_Register (&gl_shadeq3, GLRENDEREROPTIONS); Cvar_Register (&gl_blend2d, GLRENDEREROPTIONS); + Cvar_Register (&gl_blendsprites, GLRENDEREROPTIONS); #endif } #endif diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index 5eab890bb..1fc71edd3 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -130,6 +130,7 @@ extern cvar_t gl_ati_truform; extern cvar_t gl_ati_truform_type; extern cvar_t gl_ati_truform_tesselation; +extern cvar_t gl_blendsprites; #ifdef R_XFLIP cvar_t r_xflip = {"leftisright", "0"}; @@ -530,7 +531,7 @@ void R_DrawSpriteModel (entity_t *e) qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); qglBlendFunc(GL_SRC_ALPHA, GL_ONE); } - else if (e->alpha<1) + else if (e->alpha<1 || gl_blendsprites.value) { qglEnable(GL_BLEND); qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);