From 1117866d693c6fb4a1ae4ba4d159dff309c57a25 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 30 Mar 2011 21:27:16 +0000 Subject: [PATCH] fix the alpha bug in dpsoftrast.c git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10988 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=8e5d45706acaadb26c87ed55a25367e6b7ae24c3 --- dpsoftrast.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.39.2