From df7b6a445bd6fc238bd55e89bac1b00936459a9d Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 10 Mar 2012 12:54:55 +0000 Subject: [PATCH] dpsoftrast: SHADERMODE_GENERIC SHADERPERMUTATION_ALPHAKILL too git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11753 d7cf8633-e32d-0410-b094-e92efae38249 --- dpsoftrast.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- 2.39.2