From 2afe605069fe28fe0f7e22de787514180700b01c Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 24 Mar 2012 06:04:00 +0100 Subject: [PATCH] D3D11: Disable mipmapping when no mipmap filter is selected. --- Source/Plugins/Plugin_VideoDX11/Src/Render.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp index 69f0d0215a..941bcef4ba 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp @@ -1420,9 +1420,10 @@ void Renderer::SetSamplerState(int stage, int texindex) gx_state.sampdc[stage].AddressU = d3dClamps[tm0.wrap_s]; gx_state.sampdc[stage].AddressV = d3dClamps[tm0.wrap_t]; - gx_state.sampdc[stage].MipLODBias = (float)tm0.lod_bias/32.0f; - gx_state.sampdc[stage].MaxLOD = (float)tm1.max_lod/16.f; + // When mipfilter is set to "none", just disable mipmapping altogether + gx_state.sampdc[stage].MaxLOD = (mip == TEXF_NONE) ? 0.0f : (float)tm1.max_lod/16.f; gx_state.sampdc[stage].MinLOD = (float)tm1.min_lod/16.f; + gx_state.sampdc[stage].MipLODBias = (float)tm0.lod_bias/32.0f; } void Renderer::SetInterlacingMode()