diff --git a/rpcs3/Emu/RSX/GL/GLTexture.cpp b/rpcs3/Emu/RSX/GL/GLTexture.cpp index 1cfca7f480..860ea249eb 100644 --- a/rpcs3/Emu/RSX/GL/GLTexture.cpp +++ b/rpcs3/Emu/RSX/GL/GLTexture.cpp @@ -176,8 +176,9 @@ namespace gl glSamplerParameteri(samplerHandle, GL_TEXTURE_MAX_LOD, (tex.max_lod() >> 8)); } + f32 af_level = g_cfg.video.anisotropic_level_override > 0 ? (f32)g_cfg.video.anisotropic_level_override : max_aniso(tex.max_aniso()); + glSamplerParameterf(samplerHandle, GL_TEXTURE_MAX_ANISOTROPY_EXT, af_level); glSamplerParameteri(samplerHandle, GL_TEXTURE_MAG_FILTER, tex_mag_filter(tex.mag_filter())); - glSamplerParameterf(samplerHandle, GL_TEXTURE_MAX_ANISOTROPY_EXT, max_aniso(tex.max_aniso())); const u32 texture_format = tex.format() & ~(CELL_GCM_TEXTURE_UN | CELL_GCM_TEXTURE_LN); if (texture_format == CELL_GCM_TEXTURE_DEPTH16 || texture_format == CELL_GCM_TEXTURE_DEPTH24_D8) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index aae74f35a5..651fe2cbf3 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -1114,11 +1114,12 @@ void VKGSRender::end() mip_mode = VK_SAMPLER_MIPMAP_MODE_NEAREST; } + f32 af_level = g_cfg.video.anisotropic_level_override > 0 ? g_cfg.video.anisotropic_level_override : vk::max_aniso(rsx::method_registers.fragment_textures[i].max_aniso()); m_current_frame->samplers_to_clean.push_back(std::make_unique( *m_device, vk::vk_wrap_mode(rsx::method_registers.fragment_textures[i].wrap_s()), vk::vk_wrap_mode(rsx::method_registers.fragment_textures[i].wrap_t()), vk::vk_wrap_mode(rsx::method_registers.fragment_textures[i].wrap_r()), !!(rsx::method_registers.fragment_textures[i].format() & CELL_GCM_TEXTURE_UN), - lod_bias, vk::max_aniso(rsx::method_registers.fragment_textures[i].max_aniso()), min_lod, max_lod, + lod_bias, af_level, min_lod, max_lod, min_filter, vk::get_mag_filter(rsx::method_registers.fragment_textures[i].mag_filter()), mip_mode, vk::get_border_color(rsx::method_registers.fragment_textures[i].border_color()), is_depth_texture, depth_compare)); diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index c1c8483938..68f6f9a0c0 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -332,6 +332,7 @@ struct cfg_root : cfg::node cfg::_int<1, 8> consequtive_frames_to_draw{this, "Consecutive Frames To Draw", 1}; cfg::_int<1, 8> consequtive_frames_to_skip{this, "Consecutive Frames To Skip", 1}; cfg::_int<50, 800> resolution_scale_percent{this, "Resolution Scale", 100}; + cfg::_int<0, 16> anisotropic_level_override{this, "Anisotropic Filter Override", 0 }; struct node_d3d12 : cfg::node {