diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2015-01-03 13:33:57 +0100 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2015-02-18 14:50:28 +0100 |
commit | 6ca752ccbc7c59dab66f476ca02d3b53527c57da (patch) | |
tree | d5578562d0ea9d4c06dbd1050ae1460bf2e842bd /src/video_core/rasterizer.cpp | |
parent | Pica: Fix a bug in the register definitions, relating to texture wrapping. (diff) | |
download | yuzu-6ca752ccbc7c59dab66f476ca02d3b53527c57da.tar yuzu-6ca752ccbc7c59dab66f476ca02d3b53527c57da.tar.gz yuzu-6ca752ccbc7c59dab66f476ca02d3b53527c57da.tar.bz2 yuzu-6ca752ccbc7c59dab66f476ca02d3b53527c57da.tar.lz yuzu-6ca752ccbc7c59dab66f476ca02d3b53527c57da.tar.xz yuzu-6ca752ccbc7c59dab66f476ca02d3b53527c57da.tar.zst yuzu-6ca752ccbc7c59dab66f476ca02d3b53527c57da.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/rasterizer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 65dddb47c..f788122d8 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -251,7 +251,15 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, return val; case Regs::TextureConfig::Repeat: - return (int)(((unsigned)val) % size); + return (int)((unsigned)val % size); + + case Regs::TextureConfig::MirroredRepeat: + { + int val = (int)((unsigned)val % (2 * size)); + if (val >= size) + val = 2 * size - 1 - val; + return val; + } default: LOG_ERROR(HW_GPU, "Unknown texture coordinate wrapping mode %x\n", (int)mode); |