Skip to content

Commit

Permalink
Increase default geometric detail on characters and patches
Browse files Browse the repository at this point in the history
This significantly reduces visible LOD transitions and
allows curves in level geometry to be more detailed.

Given how modern GPUs (even integrated graphics) can handle lots
of polygons well, this has very little performance cost nowadays.
  • Loading branch information
Calinou committed Oct 17, 2024
1 parent 84f3130 commit 27bf0ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions code/renderer/tr_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ static void R_Register( void )
ri.Cvar_CheckRange( r_mapGreyScale, "-1", "1", CV_FLOAT );
ri.Cvar_SetDescription(r_mapGreyScale, "Desaturate world map textures only, works independently from \\r_greyscale, negative values only desaturate lightmaps.");

r_subdivisions = ri.Cvar_Get( "r_subdivisions", "4", CVAR_ARCHIVE_ND | CVAR_LATCH );
r_subdivisions = ri.Cvar_Get( "r_subdivisions", "1", CVAR_ARCHIVE_ND | CVAR_LATCH );
ri.Cvar_SetDescription(r_subdivisions, "Distance to subdivide bezier curved surfaces. Higher values mean less subdivision and less geometric complexity.");

r_maxpolys = ri.Cvar_Get( "r_maxpolys", XSTRING( MAX_POLYS ), CVAR_LATCH );
Expand All @@ -1537,7 +1537,7 @@ static void R_Register( void )
r_lodCurveError = ri.Cvar_Get( "r_lodCurveError", "250", CVAR_ARCHIVE_ND );
ri.Cvar_CheckRange( r_lodCurveError, "-1", "8192", CV_FLOAT );
ri.Cvar_SetDescription( r_lodCurveError, "Level of detail error on curved surface grids. Higher values result in better quality at a distance." );
r_lodbias = ri.Cvar_Get( "r_lodbias", "0", CVAR_ARCHIVE_ND );
r_lodbias = ri.Cvar_Get( "r_lodbias", "-2", CVAR_ARCHIVE_ND );
ri.Cvar_SetDescription( r_lodbias, "Sets the level of detail of in-game models:\n -2: Ultra (further delays LOD transition in the distance)\n -1: Very High (delays LOD transition in the distance)\n 0: High\n 1: Medium\n 2: Low" );
r_znear = ri.Cvar_Get( "r_znear", "4", CVAR_CHEAT );
ri.Cvar_CheckRange( r_znear, "0.001", "200", CV_FLOAT );
Expand Down
4 changes: 2 additions & 2 deletions code/renderer2/tr_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ static void R_Register( void )
ri.Cvar_SetDescription( r_simpleMipMaps, "Whether or not to use a simple mipmapping algorithm or a more correct one:\n 0: off (proper linear filter)\n 1: on (for slower machines)" );
r_vertexLight = ri.Cvar_Get( "r_vertexLight", "0", CVAR_ARCHIVE | CVAR_LATCH );
ri.Cvar_SetDescription( r_vertexLight, "Set to 1 to use vertex light instead of lightmaps, collapse all multi-stage shaders into single-stage ones, might cause rendering artifacts." );
r_subdivisions = ri.Cvar_Get ("r_subdivisions", "4", CVAR_ARCHIVE | CVAR_LATCH);
r_subdivisions = ri.Cvar_Get ("r_subdivisions", "1", CVAR_ARCHIVE | CVAR_LATCH);
ri.Cvar_SetDescription(r_subdivisions, "Distance to subdivide bezier curved surfaces. Higher values mean less subdivision and less geometric complexity.");
r_greyscale = ri.Cvar_Get("r_greyscale", "0", CVAR_ARCHIVE | CVAR_LATCH);
ri.Cvar_CheckRange( r_greyscale, "0", "1", CV_FLOAT );
Expand Down Expand Up @@ -1257,7 +1257,7 @@ static void R_Register( void )
r_lodCurveError = ri.Cvar_Get( "r_lodCurveError", "250", CVAR_ARCHIVE );
ri.Cvar_CheckRange( r_lodCurveError, "-1", "8192", CV_FLOAT );
ri.Cvar_SetDescription( r_lodCurveError, "Level of detail error on curved surface grids. Higher values result in better quality at a distance." );
r_lodbias = ri.Cvar_Get( "r_lodbias", "0", CVAR_ARCHIVE );
r_lodbias = ri.Cvar_Get( "r_lodbias", "-2", CVAR_ARCHIVE );
ri.Cvar_SetDescription( r_lodbias, "Sets the level of detail of in-game models:\n -2: Ultra (further delays LOD transition in the distance)\n -1: Very High (delays LOD transition in the distance)\n 0: High\n 1: Medium\n 2: Low" );
r_flares = ri.Cvar_Get ("r_flares", "0", CVAR_ARCHIVE );
ri.Cvar_SetDescription( r_flares, "Enables corona effects on light sources." );
Expand Down
4 changes: 2 additions & 2 deletions code/renderervk/tr_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ static void R_Register( void )
ri.Cvar_CheckRange( r_mapGreyScale, "-1", "1", CV_FLOAT );
ri.Cvar_SetDescription(r_mapGreyScale, "Desaturate world map textures only, works independently from \\r_greyscale, negative values only desaturate lightmaps.");

r_subdivisions = ri.Cvar_Get( "r_subdivisions", "4", CVAR_ARCHIVE_ND | CVAR_LATCH );
r_subdivisions = ri.Cvar_Get( "r_subdivisions", "1", CVAR_ARCHIVE_ND | CVAR_LATCH );
ri.Cvar_SetDescription(r_subdivisions, "Distance to subdivide bezier curved surfaces. Higher values mean less subdivision and less geometric complexity.");

r_maxpolys = ri.Cvar_Get( "r_maxpolys", XSTRING( MAX_POLYS ), CVAR_LATCH );
Expand All @@ -1562,7 +1562,7 @@ static void R_Register( void )
r_lodCurveError = ri.Cvar_Get( "r_lodCurveError", "250", CVAR_ARCHIVE_ND );
ri.Cvar_CheckRange( r_lodCurveError, "-1", "8192", CV_FLOAT );
ri.Cvar_SetDescription( r_lodCurveError, "Level of detail error on curved surface grids. Higher values result in better quality at a distance." );
r_lodbias = ri.Cvar_Get( "r_lodbias", "0", CVAR_ARCHIVE_ND );
r_lodbias = ri.Cvar_Get( "r_lodbias", "-2", CVAR_ARCHIVE_ND );
ri.Cvar_SetDescription( r_lodbias, "Sets the level of detail of in-game models:\n -2: Ultra (further delays LOD transition in the distance)\n -1: Very High (delays LOD transition in the distance)\n 0: High\n 1: Medium\n 2: Low" );
r_flares = ri.Cvar_Get ("r_flares", "0", CVAR_ARCHIVE_ND );
ri.Cvar_SetDescription( r_flares, "Enables corona effects on light sources." );
Expand Down

0 comments on commit 27bf0ae

Please sign in to comment.