mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Fix incorrect handling of auto IR
Some lines of code in Dolphin just plainly grabbed the value of g_ActiveConfig.iEFBScale, which resulted in Auto being treated as 0x rather than the actual automatically selected scale.
This commit is contained in:
@ -131,6 +131,11 @@ void Renderer::RenderToXFB(u32 xfbAddr, const EFBRectangle& sourceRc, u32 fbStri
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int Renderer::GetEFBScale() const
|
||||
{
|
||||
return m_efb_scale;
|
||||
}
|
||||
|
||||
int Renderer::EFBToScaledX(int x) const
|
||||
{
|
||||
return x * static_cast<int>(m_efb_scale);
|
||||
|
@ -101,6 +101,8 @@ public:
|
||||
std::tuple<TargetRectangle, TargetRectangle>
|
||||
ConvertStereoRectangle(const TargetRectangle& rc) const;
|
||||
|
||||
unsigned int GetEFBScale() const;
|
||||
|
||||
// Use this to upscale native EFB coordinates to IDEAL internal resolution
|
||||
int EFBToScaledX(int x) const;
|
||||
int EFBToScaledY(int y) const;
|
||||
|
@ -258,7 +258,7 @@ static void SetSamplerState(u32 index, bool custom_tex, bool has_arbitrary_mips)
|
||||
// that have arbitrary contents, eg. are used for fog effects where the
|
||||
// distance they kick in at is important to preserve at any resolution.
|
||||
state.lod_bias =
|
||||
state.lod_bias + std::log2(static_cast<float>(g_ActiveConfig.iEFBScale)) * 256.f;
|
||||
state.lod_bias + std::log2(static_cast<float>(g_renderer->GetEFBScale())) * 256.f;
|
||||
|
||||
// Anisotropic also pushes mips farther away so it cannot be used either
|
||||
state.anisotropic_filtering = 0;
|
||||
|
Reference in New Issue
Block a user