-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Add anisotropic filtering to GLES2 backend #45654
Conversation
Move definition of rendering/quality/filters/anisotropic_filter_level to servers/visual_server.cpp, since both GLES2 and GLES3 now use it rasterizer_storage_gles3.cpp: Remove a spurious variable write (the value gets overwritten soon after)
Looks fine to me although I haven't tested. Great first PR. 👍 Seeing the duplication in |
Looks good to me! I'll let @clayjohn do the final review. As a tip for future PRs, you might want to make them from a dedicated branch instead of your |
Edit: I tested this PR and it works successfully on Linux (NVIDIA), HTML5 (Linux + Firefox, Linux + Chromium, Android + Chromium) and Android (OnePlus 6). Minimal reproduction project: test_anisotropic_gles2.zip (includes Android and HTML5 exports) In the above project, an isotropic texture is displayed on the left, an anisotropic texture is displayed on the right with 16× anisotropic filtering. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Thanks! And congrats for your first merged Godot contribution 🎉 |
Fixes #45641
I made this change by copying the relevant code from the GLES3 backend to the GLES2 backend. In so doing, I noticed a strange line, line 8358 of rasterizer_storage_gles3.cpp:
config.use_anisotropic_filter = config.extensions.has("rendering/quality/filters/anisotropic_filter_level");
The strange thing about it is, as far as I can tell, this variable soon gets overwritten without having been used. Still, I copied this line even though I'm not sure it has any effect.
(EDIT: I have discussed this line with other devs and removed it from the GLES2 backend. It's still in the GLES3 backend, though.)
(EDIT: It's gone from both backends now.)