Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPU/Directx9/TextureCacheDX9.cpp
Original file line number Diff line number Diff line change
@@ -160,15 +160,15 @@ void TextureCacheDX9::UpdateSamplingParams(TexCacheEntry &entry, bool force) {

if (maxLevel != 0) {
if (mode == GE_TEXLEVEL_MODE_AUTO) {
dxstate.texMaxMipLevel.set(maxLevel);
dxstate.texMaxMipLevel.set(0);
dxstate.texMipLodBias.set(lodBias);
} else if (mode == GE_TEXLEVEL_MODE_CONST) {
// TODO: This is just an approximation - texMaxMipLevel sets the lowest numbered mip to use.
// Unfortunately, this doesn't support a const 1.5 or etc.
dxstate.texMaxMipLevel.set(std::max(0, std::min((int)maxLevel, (int)lodBias)));
dxstate.texMipLodBias.set(-1000.0f);
} else { // if (mode == GE_TEXLEVEL_MODE_SLOPE{
dxstate.texMaxMipLevel.set(maxLevel);
dxstate.texMaxMipLevel.set(0);
dxstate.texMipLodBias.set(0.0f);
}
entry.lodBias = lodBias;

0 comments on commit b1a93ad

Please sign in to comment.