diff options
| author | 2017-05-05 21:33:32 -0700 | |
|---|---|---|
| committer | 2017-05-05 21:33:32 -0700 | |
| commit | 2a01a03375401f4110a3a80de8ebf9bd48e46bc7 (patch) | |
| tree | 91c3dd5e60e0d977406b8e39adc1732d09a9d1ce /src/video_core/swrasterizer/rasterizer.cpp | |
| parent | Create a random console_unique_id (#2668) (diff) | |
| parent | pica: shader_dirty if texture2 coord changed (diff) | |
| download | yuzu-2a01a03375401f4110a3a80de8ebf9bd48e46bc7.tar.gz yuzu-2a01a03375401f4110a3a80de8ebf9bd48e46bc7.tar.xz yuzu-2a01a03375401f4110a3a80de8ebf9bd48e46bc7.zip | |
Merge pull request #2686 from wwylele/tex-coord-reg
pica: use correct coordinates for texture 2
Diffstat (limited to 'src/video_core/swrasterizer/rasterizer.cpp')
| -rw-r--r-- | src/video_core/swrasterizer/rasterizer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/swrasterizer/rasterizer.cpp b/src/video_core/swrasterizer/rasterizer.cpp index cb1b90a81..20addf0bd 100644 --- a/src/video_core/swrasterizer/rasterizer.cpp +++ b/src/video_core/swrasterizer/rasterizer.cpp | |||
| @@ -276,8 +276,10 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve | |||
| 276 | 276 | ||
| 277 | DEBUG_ASSERT(0 != texture.config.address); | 277 | DEBUG_ASSERT(0 != texture.config.address); |
| 278 | 278 | ||
| 279 | float24 u = uv[i].u(); | 279 | int coordinate_i = |
| 280 | float24 v = uv[i].v(); | 280 | (i == 2 && regs.texturing.main_config.texture2_use_coord1) ? 1 : i; |
| 281 | float24 u = uv[coordinate_i].u(); | ||
| 282 | float24 v = uv[coordinate_i].v(); | ||
| 281 | 283 | ||
| 282 | // Only unit 0 respects the texturing type (according to 3DBrew) | 284 | // Only unit 0 respects the texturing type (according to 3DBrew) |
| 283 | // TODO: Refactor so cubemaps and shadowmaps can be handled | 285 | // TODO: Refactor so cubemaps and shadowmaps can be handled |