summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
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/VideoBackends
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/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DState.cpp2
-rw-r--r--Source/Core/VideoBackends/D3D/D3DState.h2
-rw-r--r--Source/Core/VideoBackends/OGL/SamplerCache.cpp2
-rw-r--r--Source/Core/VideoBackends/Vulkan/ObjectCache.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DState.cpp b/Source/Core/VideoBackends/D3D/D3DState.cpp
index 56bcb58fa1..5732ffd21b 100644
--- a/Source/Core/VideoBackends/D3D/D3DState.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DState.cpp
@@ -299,7 +299,7 @@ ID3D11SamplerState* StateCache::Get(SamplerState state)
sampdc.AddressV = address_modes[static_cast<u32>(state.wrap_v.Value())];
sampdc.MaxLOD = state.max_lod / 16.f;
sampdc.MinLOD = state.min_lod / 16.f;
- sampdc.MipLODBias = (s32)state.lod_bias / 32.0f;
+ sampdc.MipLODBias = (s32)state.lod_bias / 256.f;
if (state.anisotropic_filtering)
{
diff --git a/Source/Core/VideoBackends/D3D/D3DState.h b/Source/Core/VideoBackends/D3D/D3DState.h
index fc7cda88b3..0c083f7c1b 100644
--- a/Source/Core/VideoBackends/D3D/D3DState.h
+++ b/Source/Core/VideoBackends/D3D/D3DState.h
@@ -40,7 +40,7 @@ private:
std::unordered_map<u32, ID3D11DepthStencilState*> m_depth;
std::unordered_map<u32, ID3D11RasterizerState*> m_raster;
std::unordered_map<u32, ID3D11BlendState*> m_blend;
- std::unordered_map<u32, ID3D11SamplerState*> m_sampler;
+ std::unordered_map<SamplerState::StorageType, ID3D11SamplerState*> m_sampler;
};
namespace D3D
diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.cpp b/Source/Core/VideoBackends/OGL/SamplerCache.cpp
index 59d3d3a842..32be0ac4d9 100644
--- a/Source/Core/VideoBackends/OGL/SamplerCache.cpp
+++ b/Source/Core/VideoBackends/OGL/SamplerCache.cpp
@@ -100,7 +100,7 @@ void SamplerCache::SetParameters(GLuint sampler_id, const SamplerState& params)
glSamplerParameterf(sampler_id, GL_TEXTURE_MAX_LOD, params.max_lod / 16.f);
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL)
- glSamplerParameterf(sampler_id, GL_TEXTURE_LOD_BIAS, params.lod_bias / 32.f);
+ glSamplerParameterf(sampler_id, GL_TEXTURE_LOD_BIAS, params.lod_bias / 256.f);
if (params.anisotropic_filtering && g_ogl_config.bSupportsAniso)
{
diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
index c0196cb7d6..1a5cfbf34e 100644
--- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
+++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
@@ -329,7 +329,7 @@ VkSampler ObjectCache::GetSampler(const SamplerState& info)
address_modes[static_cast<u32>(info.wrap_u.Value())], // VkSamplerAddressMode addressModeU
address_modes[static_cast<u32>(info.wrap_v.Value())], // VkSamplerAddressMode addressModeV
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, // VkSamplerAddressMode addressModeW
- info.lod_bias / 32.0f, // float mipLodBias
+ info.lod_bias / 256.0f, // float mipLodBias
VK_FALSE, // VkBool32 anisotropyEnable
0.0f, // float maxAnisotropy
VK_FALSE, // VkBool32 compareEnable