Skip to content

Commit 9346b13

Browse files
committed
D3D11: Sampler - fix mipFilter=FO_NONE translation
1 parent 7ab7fe2 commit 9346b13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

RenderSystems/Direct3D11/src/OgreD3D11TextureManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ namespace Ogre
4444

4545
desc.Filter = D3D11Mappings::get(mMinFilter, mMagFilter, mMipFilter, mCompareEnabled);
4646
desc.MaxAnisotropy = mMaxAniso;
47-
desc.MipLODBias = static_cast<float>(Math::Clamp(mMipmapBias - 0.5, -16.00, 15.99));
48-
desc.MinLOD = -D3D11_FLOAT32_MAX;
49-
desc.MaxLOD = D3D11_FLOAT32_MAX;
47+
desc.MipLODBias = mMipmapBias;
48+
desc.MinLOD = 0;
49+
desc.MaxLOD = mMipFilter == FO_NONE ? 0 : D3D11_FLOAT32_MAX;
5050

5151
bool reversedZ = Root::getSingleton().getRenderSystem()->isReverseDepthBufferEnabled();
5252
auto cmpFunc = mCompareFunc;

0 commit comments

Comments
 (0)