aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/swrasterizer/clipper.cpp
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-05-20 23:17:12 +0300
committerwwylele <wwylele@gmail.com>2017-05-21 09:09:15 +0300
commit36526c63ef8809d228b01df57ea8455f39076e9a (patch)
treef8d81b42dc7165e7ff91d3c9d1a1c3bdb2c98e27 /src/video_core/swrasterizer/clipper.cpp
parent152a0123735e0e9580454eb1c04e733d8f955df4 (diff)
swrasterizer: add missing tc0_w and fragment lighting attribute processing
Diffstat (limited to 'src/video_core/swrasterizer/clipper.cpp')
-rw-r--r--src/video_core/swrasterizer/clipper.cpp7
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) {
viewport.offset_y = float24::FromFloat32(static_cast<float>(regs.rasterizer.viewport_corner.y));
float24 inv_w = float24::FromFloat32(1.f) / vtx.pos.w;
- vtx.color *= inv_w;
- vtx.view *= inv_w;
+ vtx.pos.w = inv_w;
vtx.quat *= inv_w;
+ vtx.color *= inv_w;
vtx.tc0 *= inv_w;
vtx.tc1 *= inv_w;
+ vtx.tc0_w *= inv_w;
+ vtx.view *= inv_w;
vtx.tc2 *= inv_w;
- vtx.pos.w = inv_w;
vtx.screenpos[0] =
(vtx.pos.x * inv_w + float24::FromFloat32(1.0)) * viewport.halfsize_x + viewport.offset_x;