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

FSAA setting has no effect on world rendering when shaders are enabled #13397

Closed
Calinou opened this issue Apr 8, 2023 · 5 comments
Closed
Labels
@ Client / Audiovisuals Not a bug The behaviour is working as intended and won't be changed

Comments

@Calinou
Copy link
Contributor

Calinou commented Apr 8, 2023

Minetest version
5.7.0
OS / Hardware

Operating system: Linux
CPU: Intel Core i9-13900K

GPU model: GeForce RTX 4090 (NVIDIA 530.41.03)
OpenGL version: OpenGL 4.6

Summary

When shaders are enabled, the FSAA setting only affects the wieldhand rendering, not the general world rendering (regardless of which value you choose). This cannot be worked around by forcing antialiasing on the graphics driver.

After disabling shaders, toggling FSAA works on the world rendering.

I can confirm fsaa = 4 is present in my minetest.conf, so it's not an issue with the settings menu.

Steps to reproduce

Ensure shaders are enabled, set FSAA to 4 in the All Settings menu, then restart the game.

To compare with driver-forced MSAA: On Linux with the NVIDIA proprietary driver, set the __GL_FSAA_MODE environment variable to 5 to force 4× MSAA on any OpenGL application. For example, when using the Flatpak, use __GL_FSAA_MODE=5 flatpak run net.minetest.Minetest.

$ nvidia-settings --query=fsaa --verbose
[...]
      value - description
        0   -   Off
        1   -   2x (2xMS)
        5   -   4x (4xMS)
        9   -   8x (4xSS, 2xMS)
       10   -   8x (8xMS)
       11   -   16x (4xSS, 4xMS)

On Windows, you have a similar option available in the NVIDIA Control Panel.

@Calinou Calinou added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Apr 8, 2023
@rubenwardy
Copy link
Contributor

See #13253

@Calinou Calinou changed the title FSAA setting has no effect FSAA setting has no effect on world rendering when shaders are enabled Apr 9, 2023
@Calinou
Copy link
Contributor Author

Calinou commented Apr 9, 2023

I was actually wrong on the exact circumstances. MSAA does work on the wieldhand rendering when shaders are enabled, and it works on the world rendering too when shaders are disabled. I've updated OP accordingly.

This sounds like an issue with a missing MSAA resolve step on the world framebuffer when shaders are enabled.

@sfan5
Copy link
Collaborator

sfan5 commented Apr 10, 2023

ping @x2048

@x2048
Copy link
Contributor

x2048 commented Apr 10, 2023

Enabling shaders enables the deferred rendering pipeline, and the 3d step is done into a renderbuffer instead of screen. FSAA does not support renderbuffers, and, for example, FXAA or some other technique can be used (there is a PR somewhere for FXAA).

If possible, I would not go back to direct rendering using shaders, too many options to maintain.

@sfan5 sfan5 added Not a bug The behaviour is working as intended and won't be changed and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Apr 10, 2023
@sfan5
Copy link
Collaborator

sfan5 commented Apr 10, 2023

If anything we should document this better but it also looks like it's gonna be solved by that pending PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals Not a bug The behaviour is working as intended and won't be changed
Projects
None yet
Development

No branches or pull requests

5 participants