diff options
| author | Tommaso Checchi <tommaso.checchi1@gmail.com> | 2017-10-18 02:02:56 -0700 |
|---|---|---|
| committer | Tommaso Checchi <tommaso.checchi1@gmail.com> | 2017-10-27 00:45:20 -0700 |
| commit | 5fb6ceac452fa7960301d132f2f044073045564a (patch) | |
| tree | f9591414a257597d734b7177f448f8691a2d9cc6 /Source/Core/VideoCommon/RenderState.cpp | |
| parent | 802fda26ab0959f92327a37fac966d728c8dcc5f (diff) | |
Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient.
Diffstat (limited to 'Source/Core/VideoCommon/RenderState.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderState.cpp | 4 |
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 = { |
