summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_shader.c
diff options
context:
space:
mode:
authorSmileTheory <SmileTheory@gmail.com>2013-12-17 04:08:25 -0800
committerTim Angus <tim@ngus.net>2014-06-17 17:43:38 +0100
commit0605f9d03e791159af04c8f69a26864c187998af (patch)
tree42a23b3fef9274300a79e77ce6181c365a51ae5a /src/renderergl2/tr_shader.c
parentd6e67ad9d11e3683094f5cca559b79744d3737ef (diff)
#6077: OpenGL2: Add r_ignoreDstAlpha.
Diffstat (limited to 'src/renderergl2/tr_shader.c')
-rw-r--r--src/renderergl2/tr_shader.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/renderergl2/tr_shader.c b/src/renderergl2/tr_shader.c
index 7edb8309..c5438f6d 100644
--- a/src/renderergl2/tr_shader.c
+++ b/src/renderergl2/tr_shader.c
@@ -204,10 +204,16 @@ static int NameToSrcBlendMode( const char *name )
}
else if ( !Q_stricmp( name, "GL_DST_ALPHA" ) )
{
+ if (r_ignoreDstAlpha->integer)
+ return GLS_SRCBLEND_ONE;
+
return GLS_SRCBLEND_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_ONE_MINUS_DST_ALPHA" ) )
{
+ if (r_ignoreDstAlpha->integer)
+ return GLS_SRCBLEND_ZERO;
+
return GLS_SRCBLEND_ONE_MINUS_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_SRC_ALPHA_SATURATE" ) )
@@ -244,10 +250,16 @@ static int NameToDstBlendMode( const char *name )
}
else if ( !Q_stricmp( name, "GL_DST_ALPHA" ) )
{
+ if (r_ignoreDstAlpha->integer)
+ return GLS_DSTBLEND_ONE;
+
return GLS_DSTBLEND_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_ONE_MINUS_DST_ALPHA" ) )
{
+ if (r_ignoreDstAlpha->integer)
+ return GLS_DSTBLEND_ZERO;
+
return GLS_DSTBLEND_ONE_MINUS_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_SRC_COLOR" ) )