summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderState.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2017-08-21 17:06:44 +0200
committerGitHub <noreply@github.com>2017-08-21 17:06:44 +0200
commitd0fc223fe172a2116351e487c32a0adcc8e59086 (patch)
tree6c2c5ce9a07978fe67652b5c8c617ab4a5a5f80d /Source/Core/VideoCommon/RenderState.cpp
parent8280d15357a756523fcc71a8b12d0b401caa9605 (diff)
parent390f3f13ba39d4b1208bd64ed6fba57bf64e5691 (diff)
Merge pull request #5956 from Armada651/fix-remove-clr-usage
RenderState: Fix incorrect blending factors when removing the color usage.
Diffstat (limited to 'Source/Core/VideoCommon/RenderState.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderState.cpp7
1 files 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)
{