diff options
| author | Tilka <tilkax@gmail.com> | 2021-07-25 05:08:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-25 05:08:11 +0100 |
| commit | c42b1c1b9f25bfd5a5f706f7a635eb9e0d47653f (patch) | |
| tree | 9d5cdce55474ef22c1a3159a5fdbff50c8ae4231 /Source/Core/VideoCommon/RenderState.cpp | |
| parent | dfea9d0275e1d3b2bf32de88ebd4cd5f353ac091 (diff) | |
| parent | fa9c43cfaa4249547f0ba5c4fae4e8382f7248c9 (diff) | |
Merge pull request #9921 from Pokechu22/non-power-of-2-wrap
Software: Handle texture wrapping more accurately
Diffstat (limited to 'Source/Core/VideoCommon/RenderState.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderState.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp index 52aed4613d..291aa9ce91 100644 --- a/Source/Core/VideoCommon/RenderState.cpp +++ b/Source/Core/VideoCommon/RenderState.cpp @@ -240,8 +240,9 @@ void SamplerState::Generate(const BPMemory& bp, u32 index) lod_bias = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm0.lod_bias * (256 / 32) : 0; // Address modes + // Hardware testing indicates that wrap_mode set to 3 behaves the same as clamp. static constexpr std::array<AddressMode, 4> address_modes = { - {AddressMode::Clamp, AddressMode::Repeat, AddressMode::MirroredRepeat, AddressMode::Repeat}}; + {AddressMode::Clamp, AddressMode::Repeat, AddressMode::MirroredRepeat, AddressMode::Clamp}}; wrap_u = address_modes[u32(tm0.wrap_s.Value())]; wrap_v = address_modes[u32(tm0.wrap_t.Value())]; anisotropic_filtering = 0; |
