From: divverent Date: Sat, 10 Mar 2012 12:54:55 +0000 (+0000) Subject: dpsoftrast: SHADERMODE_GENERIC SHADERPERMUTATION_ALPHAKILL too X-Git-Tag: xonotic-v0.7.0~203 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=84d3fc69eeede1c5a70c33c7a091889f2fbe0406;p=xonotic%2Fdarkplaces.git dpsoftrast: SHADERMODE_GENERIC SHADERPERMUTATION_ALPHAKILL too git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11753 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=df7b6a445bd6fc238bd55e89bac1b00936459a9d --- diff --git a/dpsoftrast.c b/dpsoftrast.c index b57129c1..4967ef0e 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -3263,6 +3263,12 @@ static void DPSOFTRAST_PixelShader_Generic(DPSOFTRAST_State_Thread *thread, cons } else DPSOFTRAST_Draw_Span_VaryingBGRA8(triangle, span, buffer_FragColorbgra8, 1, buffer_z); + if(thread->shader_permutation & SHADERPERMUTATION_ALPHAKILL) + { + int x; + for (x = span->startx;x < span->endx;x++) + buffer_FragColorbgra8[x*4+3] = buffer_FragColorbgra8[x*4+3] * thread->uniform4f[DPSOFTRAST_UNIFORM_Alpha*4+0]; + } DPSOFTRAST_Draw_Span_FinishBGRA8(thread, triangle, span, buffer_FragColorbgra8); }