mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Merge pull request #561 from Alegend45/master
Fix Min and Max blend equations
This commit is contained in:
commit
f7cde47911
1 changed files with 8 additions and 6 deletions
|
@ -653,20 +653,22 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0,
|
||||||
|
|
||||||
case params.Min:
|
case params.Min:
|
||||||
{
|
{
|
||||||
|
// TODO: GL spec says to do it without the factors, but is this what the 3DS does?
|
||||||
Math::Vec4<int> result;
|
Math::Vec4<int> result;
|
||||||
result.r() = std::min(src_result.r(),dst_result.r());
|
result.r() = std::min(combiner_output.r(),dest.r());
|
||||||
result.g() = std::min(src_result.g(),dst_result.g());
|
result.g() = std::min(combiner_output.g(),dest.g());
|
||||||
result.b() = std::min(src_result.b(),dst_result.b());
|
result.b() = std::min(combiner_output.b(),dest.b());
|
||||||
combiner_output = result.Cast<u8>();
|
combiner_output = result.Cast<u8>();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case params.Max:
|
case params.Max:
|
||||||
{
|
{
|
||||||
|
// TODO: GL spec says to do it without the factors, but is this what the 3DS does?
|
||||||
Math::Vec4<int> result;
|
Math::Vec4<int> result;
|
||||||
result.r() = std::max(src_result.r(),dst_result.r());
|
result.r() = std::max(combiner_output.r(),dest.r());
|
||||||
result.g() = std::max(src_result.g(),dst_result.g());
|
result.g() = std::max(combiner_output.g(),dest.g());
|
||||||
result.b() = std::max(src_result.b(),dst_result.b());
|
result.b() = std::max(combiner_output.b(),dest.b());
|
||||||
combiner_output = result.Cast<u8>();
|
combiner_output = result.Cast<u8>();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue