From: divverent Date: Wed, 30 Mar 2011 21:27:16 +0000 (+0000) Subject: fix the alpha bug in dpsoftrast.c X-Git-Tag: xonotic-v0.6.0~163^2~558 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8e5d45706acaadb26c87ed55a25367e6b7ae24c3;p=xonotic%2Fdarkplaces.git fix the alpha bug in dpsoftrast.c git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10988 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/dpsoftrast.c b/dpsoftrast.c index 9b45432d..fc703c65 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -4469,8 +4469,7 @@ void DPSOFTRAST_PixelShader_Refraction(DPSOFTRAST_State_Thread *thread, const DP buffer_FragColorbgra8[x*4+0] = c[0] * RefractColor[0]; buffer_FragColorbgra8[x*4+1] = c[1] * RefractColor[1]; buffer_FragColorbgra8[x*4+2] = c[2] * RefractColor[2]; - buffer_FragColorbgra8[x*4+3] = RefractColor[3] * 256; if(buffer_FragColorbgra8[x*4+3] > 255) buffer_FragColorbgra8[x*4+3] = 255; - buffer_FragColorbgra8[x*4+3] = 255; // WHY?!?!?!?!??!?!? is RefractColor[3] apparently 0? + buffer_FragColorbgra8[x*4+3] = min(RefractColor[3] * 256, 255); } DPSOFTRAST_Draw_Span_FinishBGRA8(thread, triangle, span, buffer_FragColorbgra8);