From 7879e7d26a056dc19021f6317b3256a4bde59da7 Mon Sep 17 00:00:00 2001 From: myT <> Date: Fri, 6 Dec 2024 18:12:29 +0100 Subject: [PATCH] disabled r_normalSmoothing by default --- code/renderer/tr_init.cpp | 5 ++++- code/renderer/tr_local.h | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/renderer/tr_init.cpp b/code/renderer/tr_init.cpp index eb18b53..ee2624d 100644 --- a/code/renderer/tr_init.cpp +++ b/code/renderer/tr_init.cpp @@ -484,7 +484,10 @@ static const cvarTableItem_t r_cvars[] = "Force default shader", CVARCAT_GRAPHICS | CVARCAT_DEBUGGING, "Forces it on all world surfaces except the sky", "" }, { - &r_normalSmoothing, "r_normalSmoothing", "1", CVAR_TEMP | CVAR_LATCH, CVART_BOOL, NULL, NULL, "compute smooth vertex normals", + // This option really needs to be disabled by default because: + // 1. A single mesh can be split into multiple surfaces, which screws everything up at the edges. + // 2. A lot of UGC contains duplicated vertices with slight offsets when it really shouldn't. + &r_normalSmoothing, "r_normalSmoothing", "0", CVAR_TEMP | CVAR_LATCH, CVART_BOOL, NULL, NULL, "compute smooth vertex normals", "Smooth vertex normals", CVARCAT_GRAPHICS, "Computes brand new vertex normals", "" }, { diff --git a/code/renderer/tr_local.h b/code/renderer/tr_local.h index 57a6fcd..343ef25 100644 --- a/code/renderer/tr_local.h +++ b/code/renderer/tr_local.h @@ -1167,8 +1167,8 @@ extern cvar_t *r_debugSort; extern cvar_t *r_debugUI; extern cvar_t *r_debugInput; -extern cvar_t *r_normalSmoothing; -extern cvar_t *r_normalAreaWeight; +extern cvar_t *r_normalSmoothing; +extern cvar_t *r_normalAreaWeight; void R_NoiseInit();