From fc2a0846cb96e947e93fee76ede30a81c2c30c5b Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 18 Jan 2024 20:53:59 +0100 Subject: [PATCH] Add toggle for horizonlines --- src/hardware/hw_main.c | 5 ++++- src/hardware/hw_main.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index a54de5f31..cfb8c7aa4 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -161,6 +161,8 @@ consvar_t cv_grspritebillboarding = {"gr_spritebillboarding", "On", CV_SAVE, CV_ consvar_t cv_grfakecontrast = {"gr_fakecontrast", "Standard", CV_SAVE, grfakecontrast_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grslopecontrast = {"gr_slopecontrast", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_grhorizonlines = {"gr_horizonlines", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; + static void CV_filtermode_ONChange(void) { @@ -852,7 +854,7 @@ void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, boolean isc HWR_ProcessPolygon(&Surf, planeVerts, nrPlaneVerts, PolyFlags, shader, false); - if (subsector) + if (subsector && cv_grhorizonlines.value) { // Horizon lines FOutVector horizonpts[6]; @@ -6402,6 +6404,7 @@ void HWR_AddCommands(void) CV_RegisterVar(&cv_grfakecontrast); CV_RegisterVar(&cv_grslopecontrast); + CV_RegisterVar(&cv_grhorizonlines); CV_RegisterVar(&cv_grfovchange); diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index 0b9437f5d..b98bc0893 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -188,6 +188,7 @@ extern consvar_t cv_grsolvetjoin; extern consvar_t cv_grspritebillboarding; extern consvar_t cv_grfakecontrast; extern consvar_t cv_grslopecontrast; +extern consvar_t cv_grhorizonlines; extern consvar_t cv_grfallbackplayermodel; extern consvar_t cv_grbatching; extern consvar_t cv_grrenderdistance;