From 390f3f13ba39d4b1208bd64ed6fba57bf64e5691 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Mon, 21 Aug 2017 16:08:32 +0200 Subject: [PATCH] RenderState: Fix incorrect blending factors when removing the color usage. --- Source/Core/VideoCommon/RenderState.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp index 696574f109..7e6d845ccb 100644 --- a/Source/Core/VideoCommon/RenderState.cpp +++ b/Source/Core/VideoCommon/RenderState.cpp @@ -94,9 +94,10 @@ void BlendingState::Generate(const BPMemory& bp) srcfactor = RemoveDstAlphaUsage(srcfactor); dstfactor = RemoveDstAlphaUsage(dstfactor); } - // replaces SRCCLR with SRCALPHA - srcfactoralpha = RemoveSrcColorUsage(srcfactor); - dstfactoralpha = RemoveDstColorUsage(dstfactor); + // replaces SRCCLR with SRCALPHA and DSTCLR with DSTALPHA, it is important to + // use the dst function for the src factor and vice versa + srcfactoralpha = RemoveDstColorUsage(srcfactor); + dstfactoralpha = RemoveSrcColorUsage(dstfactor); if (dstalpha) {