diff options
Diffstat (limited to 'src/video_core/rasterizer.cpp')
| -rw-r--r-- | src/video_core/rasterizer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 6df3a74f2..8f39e609b 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp | |||
| @@ -570,6 +570,13 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, | |||
| 570 | case Operation::Add: | 570 | case Operation::Add: |
| 571 | return std::min(255, input[0] + input[1]); | 571 | return std::min(255, input[0] + input[1]); |
| 572 | 572 | ||
| 573 | case Operation::AddSigned: | ||
| 574 | { | ||
| 575 | // TODO(bunnei): Verify that the color conversion from (float) 0.5f to (byte) 128 is correct | ||
| 576 | auto result = static_cast<int>(input[0]) + static_cast<int>(input[1]) - 128; | ||
| 577 | return static_cast<u8>(MathUtil::Clamp<int>(result, 0, 255)); | ||
| 578 | } | ||
| 579 | |||
| 573 | case Operation::Lerp: | 580 | case Operation::Lerp: |
| 574 | return (input[0] * input[2] + input[1] * (255 - input[2])) / 255; | 581 | return (input[0] * input[2] + input[1] * (255 - input[2])) / 255; |
| 575 | 582 | ||