- made the screen blend work for the software renderer.

It may use the same calculations as the hardware renderer but must use the 2D drawer for display.
It should be investigated if the hardware renderer can do this as well.
This commit is contained in:
Christoph Oelckers 2018-04-07 10:53:20 +02:00
commit 211a7f2569
10 changed files with 49 additions and 28 deletions

View file

@ -58,6 +58,7 @@ FRenderStyle LegacyRenderStyles[STYLE_Count] =
{ { STYLEOP_RevSub, STYLEALPHA_Src, STYLEALPHA_One, 0 } }, /* STYLE_Subtract*/
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_ColorIsFixed } }, /* STYLE_AddStencil */
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed } }, /* STYLE_AddShaded */
{ { STYLEOP_Add, STYLEALPHA_InvDstCol, STYLEALPHA_Zero, 0 } }, /* STYLE_Multiply */
};
double GetAlpha(int type, double alpha)
@ -68,7 +69,7 @@ double GetAlpha(int type, double alpha)
case STYLEALPHA_One: return 1.;
case STYLEALPHA_Src: return alpha;
case STYLEALPHA_InvSrc: return 1. - alpha;
default: return 0;
default: return 0.5; // undeterminable
}
}