2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Use core extensions when available to set max anisotropic filtering level

This commit is contained in:
Rodolfo Bogado 2018-11-08 09:51:53 -03:00
parent 4e6c64bf8d
commit 72b1fae984

View file

@ -787,8 +787,13 @@ void RasterizerOpenGL::SamplerInfo::SyncWithConfig(const Tegra::Texture::FullTex
}
}
if (info.tic.use_header_opt_control == 0) {
if (GLAD_GL_ARB_texture_filter_anisotropic) {
glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY,
static_cast<float>(1 << info.tic.max_anisotropy.Value()));
} else if (GLAD_GL_EXT_texture_filter_anisotropic) {
glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT,
static_cast<float>(1 << info.tic.max_anisotropy.Value()));
}
glSamplerParameterf(s, GL_TEXTURE_MIN_LOD,
static_cast<float>(info.tic.res_min_mip_level.Value()));
glSamplerParameterf(s, GL_TEXTURE_MAX_LOD,