Daemon
Daemon copied to clipboard
MSAA antialiasing is not implemented
It was disabled when moving to OpenGL core profile in 2016, see f3705e57cd6b06aa7ce176be207840ab3270eda4
When I re-enable it I don't get it working anyway, even with compatibility profile.
I don't mind not implementing MSAA if FXAA is fixed (see #533).
Related cvar to enable the feature: r_ext_multisample
(integer, takes value 0, 2, 4, 8, 16), vid_restart
has to be called. See also Video tab in Graphics options (tweak MSAA related option and then click Apply button).
I don't know if that should be working outside of rendering of maps, so better load a map and see at edges of a corner in the map. The aliasing should look altered (I don't know how).
The cvar looks to currently be orphaned.
Long time ago the code was doing that:
int samples = std::max( 0, r_ext_multisample->integer );
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, samples ? 1 : 0 );
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, samples );
before doing that:
SDL_GL_CreateContext( window );
I see no difference on rendered scene if I do that again.
There may be documentation to implement it on https://learnopengl.com/Advanced-OpenGL/Anti-Aliasing
and https://learnopengl.com/code_viewer_gh.php?code=src/4.advanced_opengl/11.2.anti_aliasing_offscreen/anti_aliasing_offscreen.cpp
I made a quick try but failed.
Anyway, if we fix FXAA, we may decide to never implement MSAA:
- https://github.com/DaemonEngine/Daemon/issues/533
Currently we don't have any working anti-aliasing method, MSAA isn't implemented and FXAA does nothing.
If we decide to implement MSAA one day, we may want to name the cvar r_MSAA
like we have r_FXAA
, and never mind about the old r_ext_multisample
cvar.
Worst case, we can use GPU based overrides like in nvidia-settings?