Added missing TranslateAlphaBlend and created a helper function for specifying the translation

This commit is contained in:
Magnus Norddahl 2016-11-19 13:32:57 +01:00
commit 114fda1ed5
4 changed files with 36 additions and 2 deletions

View file

@ -514,6 +514,10 @@ void DrawTriangleCodegen::ProcessPixel(SSAUBytePtr buffer, SSAIntPtr subsectorbu
fg = TranslateSample(uvoffset);
output = blend_copy(shade_bgra_simple(fg, currentlight));
break;
case TriBlendMode::TranslateAlphaBlend:
fg = TranslateSample(uvoffset);
output = blend_alpha_blend(shade_bgra_simple(fg, currentlight), bg); break;
break;
case TriBlendMode::TranslateAdd:
fg = TranslateSample(uvoffset);
output = blend_add(shade_bgra_simple(fg, currentlight), bg, srcalpha, calc_blend_bgalpha(fg, destalpha));