summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderState.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-10-31 21:37:20 +0100
committerGitHub <noreply@github.com>2017-10-31 21:37:20 +0100
commite29cd19f731d11bfa8deefebfd2a867af4f2e348 (patch)
treeb9e9d5c07b0d5821a67fcfe844e6531b439ac6e5 /Source/Core/VideoCommon/RenderState.cpp
parent224996d652505fd1d95f0d3d7f52ca57c4a617dc (diff)
parent5fb6ceac452fa7960301d132f2f044073045564a (diff)
Merge pull request #6118 from Tomcc/master
Resolution independent mipmaps (high IR Super Mario Galaxy Fix)
Diffstat (limited to 'Source/Core/VideoCommon/RenderState.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderState.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp
index 8f8d421730..5cad8c2584 100644
--- a/Source/Core/VideoCommon/RenderState.cpp
+++ b/Source/Core/VideoCommon/RenderState.cpp
@@ -180,8 +180,8 @@ void SamplerState::Generate(const BPMemory& bp, u32 index)
// If mipmaps are disabled, clamp min/max lod
max_lod = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm1.max_lod : 0;
- min_lod = std::min(max_lod.Value(), tm1.min_lod);
- lod_bias = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm0.lod_bias : 0;
+ min_lod = std::min(max_lod.Value(), static_cast<u64>(tm1.min_lod));
+ lod_bias = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm0.lod_bias * (256 / 32) : 0;
// Address modes
static constexpr std::array<AddressMode, 4> address_modes = {