From a1635d5b48bd711bd891b438365676f8bf81d8a7 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 9 Nov 2026 20:26:23 +0100 Subject: [PATCH] remove alpha to coverage (a2c) support while this can look nice in some cases with msaa, it has the effect that everything transclucent is twice as translucent as it should be besides just being a kinda confusing option for almost everyone so just delet it and simplify code --- src/hardware/hw_main.cpp | 2 +- src/hardware/hw_main.h | 1 - src/hardware/r_opengl/r_opengl.c | 4 ---- src/sdl/i_video.c | 27 +-------------------------- 4 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 600b7bbc1..3a8f27960 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -6291,7 +6291,7 @@ void HWR_Startup(void) HWR_TogglePaletteRendering(); if (msaa) - GL_SetSpecialState(HWD_SET_MSAA, a2c ? 2 : 1); + GL_SetSpecialState(HWD_SET_MSAA, 1); HWR_RegisterCommands(); } diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index caef24f25..fa09b0eaf 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -43,7 +43,6 @@ void HWR_Startup(void); void HWR_Shutdown(void); extern unsigned msaa; -extern boolean a2c; extern FTransform atransform; extern float gl_viewsin, gl_viewcos; diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 6d3efda0d..00aac256c 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2680,11 +2680,7 @@ void GL_SetSpecialState(hwdspecialstate_t IdState, INT32 Value) case HWD_SET_MSAA: if (Value) - { pglEnable(GL_MULTISAMPLE); - if (Value == 2) - pglEnable(GL_SAMPLE_ALPHA_TO_COVERAGE); - } break; case HWD_SET_TEXTUREANISOTROPICMODE: diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index b320c2330..45263702a 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -102,11 +102,9 @@ static int vid_nummodes = 1; rendermode_t rendermode = render_none; #ifdef HWRENDER -unsigned msaa = 0; - // Eee probably the way i organize it isn't best >< // Just don't know where do i put declaration and "implementation" -boolean a2c = false; +unsigned msaa = 0; #endif static void KeyboardLayout_OnChange(void) @@ -1979,7 +1977,6 @@ void I_StartupGraphics(void) rendermode = render_opengl; msaa = 0; boolean msaa_set = false; - a2c = false; boolean a2c_set = false; // MSAA antialiasing if (M_CheckParm("-msaa") && M_IsNextParm()) @@ -1991,16 +1988,6 @@ void I_StartupGraphics(void) } } - if (M_CheckParm("-a2c")) - { - a2c = true; - a2c_set = true; - } - else if (M_CheckParm("-noa2c")) - { - a2c_set = true; - } - { char line[16]; char * word; @@ -2048,15 +2035,6 @@ void I_StartupGraphics(void) } } } - - if (!a2c_set) - { - if (fasticmp(word, "a2c")) - { - a2c = true; - CONS_Printf("Using a2c because it was specified to be used earlier\n"); - } - } } fclose(file); @@ -2091,9 +2069,6 @@ void I_StartupGraphics(void) #ifdef HWRENDER fprintf(file, "msaa %u\n", msaa); - - if (a2c) - fputs("a2c\n", file); #endif fclose(file); }