Skip to content

Commit

Permalink
Merge pull request #5956 from Armada651/fix-remove-clr-usage
Browse files Browse the repository at this point in the history
RenderState: Fix incorrect blending factors when removing the color usage.
  • Loading branch information
CrossVR committed Aug 21, 2017
2 parents 8280d15 + 390f3f1 commit d0fc223
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Core/VideoCommon/RenderState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit d0fc223

Please sign in to comment.