diff options
| author | wwylele <wwylele@gmail.com> | 2017-05-03 19:59:48 +0300 |
|---|---|---|
| committer | wwylele <wwylele@gmail.com> | 2017-05-03 22:12:46 +0300 |
| commit | 0f664ef89d68bb008c386680a7b1d747d50ac698 (patch) | |
| tree | dbbe809d41468240ecc748b4d21a30a96e42836c /src/video_core/swrasterizer | |
| parent | 06d4654966ba9909111b1bab36e88f4f15e9cb6d (diff) | |
pica: use correct coordinates for texture 2
Diffstat (limited to 'src/video_core/swrasterizer')
| -rw-r--r-- | src/video_core/swrasterizer/rasterizer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/swrasterizer/rasterizer.cpp b/src/video_core/swrasterizer/rasterizer.cpp index cb1b90a81..fa8377f80 100644 --- a/src/video_core/swrasterizer/rasterizer.cpp +++ b/src/video_core/swrasterizer/rasterizer.cpp @@ -276,8 +276,9 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve DEBUG_ASSERT(0 != texture.config.address); - float24 u = uv[i].u(); - float24 v = uv[i].v(); + int coordinate_i = (i == 2 && regs.texturing.texture2_use_coord1) ? 1 : i; + float24 u = uv[coordinate_i].u(); + float24 v = uv[coordinate_i].v(); // Only unit 0 respects the texturing type (according to 3DBrew) // TODO: Refactor so cubemaps and shadowmaps can be handled |
