mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
Merge pull request #3486 from ReinUsesLisp/fix-anisotropy-hack
textures: Fix anisotropy hack
This commit is contained in:
commit
c281173df6
1 changed files with 16 additions and 14 deletions
|
@ -337,20 +337,22 @@ struct TSCEntry {
|
||||||
};
|
};
|
||||||
|
|
||||||
float GetMaxAnisotropy() const {
|
float GetMaxAnisotropy() const {
|
||||||
switch (static_cast<Anisotropy>(Settings::values.max_anisotropy)) {
|
const u32 min_value = [] {
|
||||||
case Anisotropy::Default:
|
switch (static_cast<Anisotropy>(Settings::values.max_anisotropy)) {
|
||||||
return static_cast<float>(1U << max_anisotropy);
|
default:
|
||||||
case Anisotropy::Filter2x:
|
case Anisotropy::Default:
|
||||||
return static_cast<float>(2U << max_anisotropy);
|
return 1U;
|
||||||
case Anisotropy::Filter4x:
|
case Anisotropy::Filter2x:
|
||||||
return static_cast<float>(4U << max_anisotropy);
|
return 2U;
|
||||||
case Anisotropy::Filter8x:
|
case Anisotropy::Filter4x:
|
||||||
return static_cast<float>(8U << max_anisotropy);
|
return 4U;
|
||||||
case Anisotropy::Filter16x:
|
case Anisotropy::Filter8x:
|
||||||
return static_cast<float>(16U << max_anisotropy);
|
return 8U;
|
||||||
default:
|
case Anisotropy::Filter16x:
|
||||||
return static_cast<float>(1U << max_anisotropy);
|
return 16U;
|
||||||
}
|
}
|
||||||
|
}();
|
||||||
|
return static_cast<float>(std::max(1U << max_anisotropy, min_value));
|
||||||
}
|
}
|
||||||
|
|
||||||
float GetMinLod() const {
|
float GetMinLod() const {
|
||||||
|
|
Loading…
Reference in a new issue