Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anisotropic Filtering not disabled when switching filtering mode in Compatibility renderer #79567

Closed
Tracked by #66458
LRFLEW opened this issue Jul 17, 2023 · 0 comments · Fixed by #79568
Closed
Tracked by #66458

Comments

@LRFLEW
Copy link
Contributor

LRFLEW commented Jul 17, 2023

Godot version

4.1.stable

System information

Windows 10 22H2 - GLES3 - GTX 1080 Ti (driver 536.40)

Issue description

I noticed this bug in the code while debugging #79315, and confirmed the issue with testing. If you take a material using a filtering mode that has anisotropic filtering (eg RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC aka "Linear Mipmap Anisotropic") and switch it to a filtering mode that doesn't have anisotropic filtering (eg RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS aka "Linear Mipmap"), the anisotropic filtering remains enabled for the texture until it gets reloaded (eg by reloading the scene). I've only tested this in the editor, but this should also apply to games themselves if they change the filtering mode of a texture through code. This issue doesn't occur with the Mobile renderer (and I assume the Forward+ renderer).

Steps to reproduce

  1. View a surface with a material with anisotropic filtering disabled at an angle that you can tell it's disabled.
    no anisotropic

  2. Switch the filtering mode of the material to one with anisotropic filtering enabled.
    with anisotropic

  3. Switch the filtering mode of the material back to a mode with anisotropic filtering disabled, and note how the surface still has anisotropic filtering applied.
    bug anisotropic

Minimal reproduction project

I used the texture repeat test program from #79315 for the example pictures, so I'll use that as the minimum reproduction: RepTest.zip. Just make sure to rotate the camera for the test, as the default position in that project isn't in a good spot for testing anisotropic filtering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants