Skip to content

Commit 8819018

Browse files
GS/HW: Check for flat shading when doing aniso.
1 parent 4cf5b98 commit 8819018

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pcsx2/GS/Renderers/HW/GSRendererHW.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6783,11 +6783,11 @@ __ri void GSRendererHW::EmulateTextureSampler(const GSTextureCache::Target* rt,
67836783
m_conf.sampler.biln = bilinear;
67846784
// Aniso filtering doesn't work with textureLod so use texture (automatic_lod) instead.
67856785
// Enable aniso only for triangles. Sprites are flat so aniso is likely useless (it would save perf for others primitives).
6786-
const bool anisotropic = m_vt.m_primclass == GS_TRIANGLE_CLASS && !trilinear_manual;
6786+
// Also make sure there isn't flat shading.
6787+
const bool anisotropic = m_vt.m_primclass == GS_TRIANGLE_CLASS && !trilinear_manual && !m_vt.m_eq.z;
67876788
m_conf.sampler.aniso = anisotropic;
67886789
m_conf.sampler.triln = trilinear;
6789-
if (anisotropic && !trilinear_manual)
6790-
m_conf.ps.automatic_lod = 1;
6790+
m_conf.ps.automatic_lod = anisotropic;
67916791
}
67926792

67936793
// clamp to base level if we're not providing or generating mipmaps

0 commit comments

Comments
 (0)