summaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2015-02-12 19:59:10 -0500
committerGravatar bunnei2015-02-12 19:59:10 -0500
commitf7cde47911229c9265c73c10240a39ff9199fbb1 (patch)
tree6ebf4112fdee49436fa43c5f49bc9b4a490e6f83 /src/video_core/rasterizer.cpp
parentMerge pull request #565 from lioncash/clean (diff)
parentFix Min and Max blend equations (diff)
downloadyuzu-f7cde47911229c9265c73c10240a39ff9199fbb1.tar.gz
yuzu-f7cde47911229c9265c73c10240a39ff9199fbb1.tar.xz
yuzu-f7cde47911229c9265c73c10240a39ff9199fbb1.zip
Merge pull request #561 from Alegend45/master
Fix Min and Max blend equations
Diffstat (limited to 'src/video_core/rasterizer.cpp')
-rw-r--r--src/video_core/rasterizer.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp
index 617c767e7..3faa10153 100644
--- a/src/video_core/rasterizer.cpp
+++ b/src/video_core/rasterizer.cpp
@@ -653,20 +653,22 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0,
653 653
654 case params.Min: 654 case params.Min:
655 { 655 {
656 // TODO: GL spec says to do it without the factors, but is this what the 3DS does?
656 Math::Vec4<int> result; 657 Math::Vec4<int> result;
657 result.r() = std::min(src_result.r(),dst_result.r()); 658 result.r() = std::min(combiner_output.r(),dest.r());
658 result.g() = std::min(src_result.g(),dst_result.g()); 659 result.g() = std::min(combiner_output.g(),dest.g());
659 result.b() = std::min(src_result.b(),dst_result.b()); 660 result.b() = std::min(combiner_output.b(),dest.b());
660 combiner_output = result.Cast<u8>(); 661 combiner_output = result.Cast<u8>();
661 break; 662 break;
662 } 663 }
663 664
664 case params.Max: 665 case params.Max:
665 { 666 {
667 // TODO: GL spec says to do it without the factors, but is this what the 3DS does?
666 Math::Vec4<int> result; 668 Math::Vec4<int> result;
667 result.r() = std::max(src_result.r(),dst_result.r()); 669 result.r() = std::max(combiner_output.r(),dest.r());
668 result.g() = std::max(src_result.g(),dst_result.g()); 670 result.g() = std::max(combiner_output.g(),dest.g());
669 result.b() = std::max(src_result.b(),dst_result.b()); 671 result.b() = std::max(combiner_output.b(),dest.b());
670 combiner_output = result.Cast<u8>(); 672 combiner_output = result.Cast<u8>();
671 break; 673 break;
672 } 674 }