diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2015-02-18 12:14:40 +0100 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2015-02-18 14:50:28 +0100 |
commit | 6e5a903286a50b84e417d1bfda7ef07108354ae3 (patch) | |
tree | 7b9efdb47e438c3b0b5c03cfa7a3ba8646287642 | |
parent | Pica/BlendUnit: Implement separate color/alpha blend equations. (diff) | |
download | yuzu-6e5a903286a50b84e417d1bfda7ef07108354ae3.tar yuzu-6e5a903286a50b84e417d1bfda7ef07108354ae3.tar.gz yuzu-6e5a903286a50b84e417d1bfda7ef07108354ae3.tar.bz2 yuzu-6e5a903286a50b84e417d1bfda7ef07108354ae3.tar.lz yuzu-6e5a903286a50b84e417d1bfda7ef07108354ae3.tar.xz yuzu-6e5a903286a50b84e417d1bfda7ef07108354ae3.tar.zst yuzu-6e5a903286a50b84e417d1bfda7ef07108354ae3.zip |
-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, bool reversed = false) { // vertex positions in rasterizer coordinates - auto FloatToFix = [](float24 flt) { - // TODO: Rounding here is necessary to prevent garbage pixels at - // triangle borders. Is it that the correct solution, though? - return Fix12P4(static_cast<unsigned short>(round(flt.ToFloat32() * 16.0f))); - }; - auto ScreenToRasterizerCoordinates = [FloatToFix](const Math::Vec3<float24> vec) { - return Math::Vec3<Fix12P4>{FloatToFix(vec.x), FloatToFix(vec.y), FloatToFix(vec.z)}; - }; + static auto FloatToFix = [](float24 flt) { + // TODO: Rounding here is necessary to prevent garbage pixels at + // triangle borders. Is it that the correct solution, though? + return Fix12P4(static_cast<unsigned short>(round(flt.ToFloat32() * 16.0f))); + }; + static auto ScreenToRasterizerCoordinates = [](const Math::Vec3<float24>& vec) { + return Math::Vec3<Fix12P4>{FloatToFix(vec.x), FloatToFix(vec.y), FloatToFix(vec.z)}; + }; Math::Vec3<Fix12P4> vtxpos[3]{ ScreenToRasterizerCoordinates(v0.screenpos), ScreenToRasterizerCoordinates(v1.screenpos), |