diff options
Diffstat (limited to 'src/video_core/rasterizer.cpp')
| -rw-r--r-- | src/video_core/rasterizer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index f96015de4..a3712f116 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp | |||
| @@ -120,14 +120,14 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, | |||
| 120 | bool reversed = false) | 120 | bool reversed = false) |
| 121 | { | 121 | { |
| 122 | // vertex positions in rasterizer coordinates | 122 | // vertex positions in rasterizer coordinates |
| 123 | auto FloatToFix = [](float24 flt) { | 123 | static auto FloatToFix = [](float24 flt) { |
| 124 | // TODO: Rounding here is necessary to prevent garbage pixels at | 124 | // TODO: Rounding here is necessary to prevent garbage pixels at |
| 125 | // triangle borders. Is it that the correct solution, though? | 125 | // triangle borders. Is it that the correct solution, though? |
| 126 | return Fix12P4(static_cast<unsigned short>(round(flt.ToFloat32() * 16.0f))); | 126 | return Fix12P4(static_cast<unsigned short>(round(flt.ToFloat32() * 16.0f))); |
| 127 | }; | 127 | }; |
| 128 | auto ScreenToRasterizerCoordinates = [FloatToFix](const Math::Vec3<float24> vec) { | 128 | static auto ScreenToRasterizerCoordinates = [](const Math::Vec3<float24>& vec) { |
| 129 | return Math::Vec3<Fix12P4>{FloatToFix(vec.x), FloatToFix(vec.y), FloatToFix(vec.z)}; | 129 | return Math::Vec3<Fix12P4>{FloatToFix(vec.x), FloatToFix(vec.y), FloatToFix(vec.z)}; |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | Math::Vec3<Fix12P4> vtxpos[3]{ ScreenToRasterizerCoordinates(v0.screenpos), | 132 | Math::Vec3<Fix12P4> vtxpos[3]{ ScreenToRasterizerCoordinates(v0.screenpos), |
| 133 | ScreenToRasterizerCoordinates(v1.screenpos), | 133 | ScreenToRasterizerCoordinates(v1.screenpos), |