diff options
| author | 2017-05-21 00:19:46 -0700 | |
|---|---|---|
| committer | 2017-05-21 00:19:46 -0700 | |
| commit | d2bb0a6f2d8457a910ecd8f1dcc7d1f496617b75 (patch) | |
| tree | f8d81b42dc7165e7ff91d3c9d1a1c3bdb2c98e27 /src/video_core/swrasterizer/clipper.cpp | |
| parent | Merge pull request #2661 from Subv/uds5 (diff) | |
| parent | swrasterizer: add missing tc0_w and fragment lighting attribute processing (diff) | |
| download | yuzu-d2bb0a6f2d8457a910ecd8f1dcc7d1f496617b75.tar.gz yuzu-d2bb0a6f2d8457a910ecd8f1dcc7d1f496617b75.tar.xz yuzu-d2bb0a6f2d8457a910ecd8f1dcc7d1f496617b75.zip | |
Merge pull request #2713 from wwylele/where-is-my-tc0_w
swrasterizer: add missing tc0_w attribute processing
Diffstat (limited to 'src/video_core/swrasterizer/clipper.cpp')
| -rw-r--r-- | src/video_core/swrasterizer/clipper.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/swrasterizer/clipper.cpp b/src/video_core/swrasterizer/clipper.cpp index 2d80822d9..6fb923756 100644 --- a/src/video_core/swrasterizer/clipper.cpp +++ b/src/video_core/swrasterizer/clipper.cpp | |||
| @@ -69,13 +69,14 @@ static void InitScreenCoordinates(Vertex& vtx) { | |||
| 69 | viewport.offset_y = float24::FromFloat32(static_cast<float>(regs.rasterizer.viewport_corner.y)); | 69 | viewport.offset_y = float24::FromFloat32(static_cast<float>(regs.rasterizer.viewport_corner.y)); |
| 70 | 70 | ||
| 71 | float24 inv_w = float24::FromFloat32(1.f) / vtx.pos.w; | 71 | float24 inv_w = float24::FromFloat32(1.f) / vtx.pos.w; |
| 72 | vtx.color *= inv_w; | 72 | vtx.pos.w = inv_w; |
| 73 | vtx.view *= inv_w; | ||
| 74 | vtx.quat *= inv_w; | 73 | vtx.quat *= inv_w; |
| 74 | vtx.color *= inv_w; | ||
| 75 | vtx.tc0 *= inv_w; | 75 | vtx.tc0 *= inv_w; |
| 76 | vtx.tc1 *= inv_w; | 76 | vtx.tc1 *= inv_w; |
| 77 | vtx.tc0_w *= inv_w; | ||
| 78 | vtx.view *= inv_w; | ||
| 77 | vtx.tc2 *= inv_w; | 79 | vtx.tc2 *= inv_w; |
| 78 | vtx.pos.w = inv_w; | ||
| 79 | 80 | ||
| 80 | vtx.screenpos[0] = | 81 | vtx.screenpos[0] = |
| 81 | (vtx.pos.x * inv_w + float24::FromFloat32(1.0)) * viewport.halfsize_x + viewport.offset_x; | 82 | (vtx.pos.x * inv_w + float24::FromFloat32(1.0)) * viewport.halfsize_x + viewport.offset_x; |