mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: Fix anisotropic filtering.
Aniso filtering doesn't work with textureLod so use texture (automatic_lod) instead. Credits to KrossX. Note: Won't work on AMD because the driver is broken.
This commit is contained in:
parent
d9936dbbfb
commit
a6e845088d
|
@ -763,12 +763,14 @@ void GSRendererOGL::EmulateTextureSampler(const GSTextureCache::Source* tex)
|
||||||
m_ps_ssel.triln = 0;
|
m_ps_ssel.triln = 0;
|
||||||
} else {
|
} else {
|
||||||
m_ps_ssel.biln = bilinear;
|
m_ps_ssel.biln = bilinear;
|
||||||
|
// Aniso filtering doesn't work with textureLod so use texture (automatic_lod) instead.
|
||||||
// Enable aniso only for triangles. Sprites are flat so aniso is likely useless (it would save perf for others primitives).
|
// Enable aniso only for triangles. Sprites are flat so aniso is likely useless (it would save perf for others primitives).
|
||||||
m_ps_ssel.aniso = m_vt.m_primclass == GS_TRIANGLE_CLASS ? 1 : 0;
|
const bool anisotropic = m_vt.m_primclass == GS_TRIANGLE_CLASS && !trilinear_manual;
|
||||||
|
m_ps_ssel.aniso = anisotropic;
|
||||||
m_ps_ssel.triln = trilinear;
|
m_ps_ssel.triln = trilinear;
|
||||||
if (trilinear_manual) {
|
if (trilinear_manual) {
|
||||||
m_ps_sel.manual_lod = 1;
|
m_ps_sel.manual_lod = 1;
|
||||||
} else if (trilinear_auto) {
|
} else if (trilinear_auto || anisotropic) {
|
||||||
m_ps_sel.automatic_lod = 1;
|
m_ps_sel.automatic_lod = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue