summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderState.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2017-08-21 16:08:32 +0200
committerJules Blok <jules.blok@gmail.com>2017-08-21 16:33:10 +0200
commit390f3f13ba39d4b1208bd64ed6fba57bf64e5691 (patch)
tree714072ead2486e115de1ffe316432f2bdc43e9ad /Source/Core/VideoCommon/RenderState.cpp
parent92b375b07ae2f1ee72d04ee39b9b53f638275583 (diff)
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)
{