Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 11 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ jobs:
mkdir -p build-vk-${{ matrix.btype }}
cmake -S . -B build-vk-${{ matrix.btype }} -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand All @@ -120,9 +118,7 @@ jobs:
mkdir -p build-gl-${{ matrix.btype }}
cmake -S . -B build-gl-${{ matrix.btype }} -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand Down Expand Up @@ -494,9 +490,7 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCI_BUILD=${{ (matrix.cc == 'gcc' && matrix.btype == 'Release') && 'ON' || 'OFF' }} \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=${{ (matrix.cc == 'gcc' && matrix.btype == 'Release') && 'ON' || 'OFF' }} \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=ON \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand Down Expand Up @@ -524,9 +518,7 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=ON \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand Down Expand Up @@ -578,9 +570,7 @@ jobs:
mkdir -p build-vk-asan
cmake -S . -B build-vk-asan \
-DCMAKE_BUILD_TYPE=Debug \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=ON \
-DBUILD_SERVER=ON \
Expand Down Expand Up @@ -618,9 +608,7 @@ jobs:
mkdir -p build-asan
cmake -S . -B build-asan -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=ON \
-DBUILD_SERVER=ON \
Expand Down Expand Up @@ -670,9 +658,7 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DBUILD_SERVER=ON \
-DUSE_VULKAN=ON \
-DRENDERER_DEFAULT=vulkan \
Expand Down Expand Up @@ -739,9 +725,7 @@ jobs:
mkdir -p build-vk-${{ matrix.btype }}
cmake -S . -B build-vk-${{ matrix.btype }} \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand All @@ -757,9 +741,7 @@ jobs:
mkdir -p build-gl-${{ matrix.btype }}
cmake -S . -B build-gl-${{ matrix.btype }} \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCI_BUILD=OFF \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DCI_BUILD=OFF \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand Down Expand Up @@ -836,9 +818,7 @@ jobs:
-DSDL2_INCLUDE_DIR="${SDL2_PREFIX}/include" \
-DSDL2_LIBRARY="${SDL2_PREFIX}/lib/libSDL2.dylib" \
-DOPENAL_INCLUDE_DIR="${OPENAL_PREFIX}/include" \
-DOPENAL_LIBRARY="${OPENAL_PREFIX}/lib/libopenal.dylib" \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DOPENAL_LIBRARY="${OPENAL_PREFIX}/lib/libopenal.dylib" \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand Down Expand Up @@ -878,9 +858,7 @@ jobs:
-DSDL2_INCLUDE_DIR="${SDL2_PREFIX}/include" \
-DSDL2_LIBRARY="${SDL2_PREFIX}/lib/libSDL2.dylib" \
-DOPENAL_INCLUDE_DIR="${OPENAL_PREFIX}/include" \
-DOPENAL_LIBRARY="${OPENAL_PREFIX}/lib/libopenal.dylib" \
-DUSE_STB_TRUETYPE=ON \
-DBUILD_FREETYPE=ON \
-DOPENAL_LIBRARY="${OPENAL_PREFIX}/lib/libopenal.dylib" \ -DBUILD_FREETYPE=ON \
-DENABLE_FORTIFY_SOURCE=OFF \
-DENABLE_ASAN=OFF \
-DBUILD_SERVER=ON \
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Vulkan PBR: **anisotropic visibility** for direct light; optional **IBL roughness stretch** from the anisotropy map (`r_pbr_iblAnisoStretch`); **clearcoat** base attenuation and **Charlie sheen** with optional fourth `sheenScale` roughness token.

### Removed
- Ghost CMake flag **`USE_STB_TRUETYPE`**: passed from `compile_engine.sh` and CI but never read by `CMakeLists.txt`.
- Dead **`USE_BANS`** server preprocessor blocks: ban commands and file-backed ban list were never compiled (macro never defined); auth-server **`banUser`/`banClient`** paths removed with the unused local ban system.
- Dead **`USE_TESS_NEEDS_NORMAL`** / **`USE_TESS_NEEDS_ST2`** renderer gates: defines were commented out so the conditional branches were already inactive; tessellation now always follows the active (always-on) copy path.
- Dead **`USE_OPENVDB`** VDB init messaging: OpenVDB was never wired at build time; startup log now reports NanoVDB only.
- Deprecated ROM cvar **`cg_stereoSeparation`**: no remaining consumers; registration removed from client init.
- Legacy `r_vfog*` engine cvars and `vk_vfog.c`/`vk_vfog.h`: volumetric fog is configured only via `r_volumetricFog*` (and map/`r_fog*` as documented). Editor `worldspawn` keys `vfog_*` remain separate map data, not console cvars.

### Security
Expand Down
1 change: 0 additions & 1 deletion scripts/compile_engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ fi
# CMake flags
CMAKE_FLAGS=(
"-DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
"-DUSE_STB_TRUETYPE=ON"
"-DUSE_FFMPEG=ON"
"-DUSE_DAV1D=ON"
"-DUSE_VPX=ON"
Expand Down
2 changes: 0 additions & 2 deletions src/client/cl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4270,8 +4270,6 @@ void CL_Init( void ) {

// cgame might not be initialized before menu is used
Cvar_Get ("cg_viewsize", "100", CVAR_ARCHIVE_ND );
// Make sure cg_stereoSeparation is zero as that variable is deprecated and should not be used anymore.
Cvar_Get ("cg_stereoSeparation", "0", CVAR_ROM);

#ifdef USE_FLUX
//
Expand Down
6 changes: 0 additions & 6 deletions src/renderers/vulkan/tr_animation.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,6 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface )
tempVert[1] += w->boneWeight * ( DotProduct( bone->matrix[1], w->offset ) + bone->matrix[1][3] );
tempVert[2] += w->boneWeight * ( DotProduct( bone->matrix[2], w->offset ) + bone->matrix[2][3] );

#ifdef USE_TESS_NEEDS_NORMAL
if ( tess.needsNormal )
#endif
{
tempNormal[0] += w->boneWeight * DotProduct( bone->matrix[0], v->normal );
tempNormal[1] += w->boneWeight * DotProduct( bone->matrix[1], v->normal );
Expand All @@ -425,9 +422,6 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface )
tess.xyz[baseVertex + j][1] = tempVert[1];
tess.xyz[baseVertex + j][2] = tempVert[2];

#ifdef USE_TESS_NEEDS_NORMAL
if ( tess.needsNormal )
#endif
{
tess.normal[baseVertex + j][0] = tempNormal[0];
tess.normal[baseVertex + j][1] = tempNormal[1];
Expand Down
9 changes: 0 additions & 9 deletions src/renderers/vulkan/tr_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define USE_VBO_GRID /* put SF_GRID to VBO */
#endif

//#define USE_TESS_NEEDS_NORMAL
//#define USE_TESS_NEEDS_ST2

#define SH_COEFF_COUNT 9

#include "../../qcommon/q_shared.h"
Expand Down Expand Up @@ -2115,12 +2112,6 @@ typedef struct shaderCommands_s
#endif

// info extracted from current shader
#ifdef USE_TESS_NEEDS_NORMAL
int needsNormal;
#endif
#ifdef USE_TESS_NEEDS_ST2
int needsST2;
#endif

int numPasses;
shaderStage_t **xstages;
Expand Down
3 changes: 0 additions & 3 deletions src/renderers/vulkan/tr_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,9 +1078,6 @@ static qboolean SurfIsOffscreen( const drawSurf_t *drawSurf, qboolean *isMirror
RB_BeginSurface( shader, fogNum );
#ifdef USE_VBO
tess.allowVBO = qfalse;
#endif
#ifdef USE_TESS_NEEDS_NORMAL
tess.needsNormal = qtrue;
#endif
rb_surfaceTable[ *drawSurf->surface ]( drawSurf->surface );

Expand Down
10 changes: 0 additions & 10 deletions src/renderers/vulkan/tr_shade.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,6 @@ void RB_BeginSurface( shader_t *shader, int fogNum ) {
tess.dlightUpdateParams = qtrue;
}

#ifdef USE_TESS_NEEDS_NORMAL
tess.needsNormal = state->needsNormal || tess.dlightPass || r_shownormals->integer ||
( backEnd.currentEntity == &tr.worldEntity &&
( ( r_shDebugView && r_shDebugView->integer ) ||
( r_shWorldLighting && r_shWorldLighting->integer && r_shLighting && r_shLighting->integer ) ) );
#endif

#ifdef USE_TESS_NEEDS_ST2
tess.needsST2 = state->needsST2;
#endif

tess.numIndexes = 0;
tess.numVertexes = 0;
Expand Down
21 changes: 0 additions & 21 deletions src/renderers/vulkan/tr_surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,6 @@ static void RB_SurfaceTriangles( const srfTriangles_t *srf ) {
xyz[1] = dv->xyz[1];
xyz[2] = dv->xyz[2];

#ifdef USE_TESS_NEEDS_NORMAL
if ( tess.needsNormal )
#endif
{
normal[0] = dv->normal[0];
normal[1] = dv->normal[1];
Expand All @@ -433,9 +430,6 @@ static void RB_SurfaceTriangles( const srfTriangles_t *srf ) {
texCoords0[0] = dv->st[0];
texCoords0[1] = dv->st[1];

#ifdef USE_TESS_NEEDS_ST2
if ( tess.needsST2 )
#endif
{
texCoords1[0] = dv->lightmap[0];
texCoords1[1] = dv->lightmap[1];
Expand Down Expand Up @@ -988,9 +982,6 @@ static void RB_SurfaceFace( const srfSurfaceFace_t *surf ) {

numPoints = surf->numPoints;

#ifdef USE_TESS_NEEDS_NORMAL
if ( tess.needsNormal )
#endif
{
if ( surf->normals ) {
// per-vertex normals for non-coplanar faces
Expand All @@ -1017,9 +1008,6 @@ static void RB_SurfaceFace( const srfSurfaceFace_t *surf ) {
#ifdef USE_VK_PBR
tess.texCoords[0][ndx][0] = v[6];
tess.texCoords[0][ndx][1] = v[7];
#ifdef USE_TESS_NEEDS_ST2
if ( tess.needsST2 )
#endif
{
tess.texCoords[1][ndx][0] = v[8];
tess.texCoords[1][ndx][1] = v[9];
Expand All @@ -1032,9 +1020,6 @@ static void RB_SurfaceFace( const srfSurfaceFace_t *surf ) {
#else
tess.texCoords[0][ndx][0] = v[3];
tess.texCoords[0][ndx][1] = v[4];
#ifdef USE_TESS_NEEDS_ST2
if ( tess.needsST2 )
#endif
{
tess.texCoords[1][ndx][0] = v[5];
tess.texCoords[1][ndx][1] = v[6];
Expand Down Expand Up @@ -1300,17 +1285,11 @@ static void RB_SurfaceGrid( srfGridMesh_t *cv ) {
xyz[2] = dv->xyz[2];
texCoords0[0] = dv->st[0];
texCoords0[1] = dv->st[1];
#ifdef USE_TESS_NEEDS_ST2
if ( tess.needsST2 )
#endif
{
texCoords1[0] = dv->lightmap[0];
texCoords1[1] = dv->lightmap[1];
texCoords1 += 2;
}
#ifdef USE_TESS_NEEDS_NORMAL
if ( tess.needsNormal )
#endif
{
normal[0] = dv->normal[0];
normal[1] = dv->normal[1];
Expand Down
6 changes: 0 additions & 6 deletions src/renderers/vulkan/vk_vbo.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,12 +765,6 @@ void R_BuildWorldVBO( msurface_t *surf, int surfCount )
initItem( vbo->items + i + 1 );
RB_BeginSurface( sf->shader, 0 );
tess.allowVBO = qfalse; // block execution of VBO path as we need to tesselate geometry
#ifdef USE_TESS_NEEDS_NORMAL
tess.needsNormal = qtrue;
#endif
#ifdef USE_TESS_NEEDS_ST2
tess.needsST2 = qtrue;
#endif
// tesselate
rb_surfaceTable[ *sf->data ]( sf->data ); // VBO_PushData() may be called multiple times there
// setup colors and texture coordinates
Expand Down
11 changes: 2 additions & 9 deletions src/renderers/vulkan/vk_vdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OpenVDB / NanoVDB integration implementation.
Loading pipeline:
1. FS_ReadFile loads the .vdb/.nvdb from game filesystem
2. For NanoVDB: parse the flat buffer header directly (no dependencies)
3. For OpenVDB: use the library if USE_OPENVDB is defined
3. NanoVDB is the supported on-disk format
4. Grid data stored in a linear float array for CPU sampling
5. VDB_UploadToGPU creates a 3D texture for shader access
6. VDB_BindAsFogDensity connects to the volumetric fog system
Expand Down Expand Up @@ -439,11 +439,7 @@ void VDB_Init( void ) {
ri.Cvar_SetDescription( r_vdbMajorantBrick,
"Brick size for OpenVDB majorant macrocells (delta-tracking segment bounds; arXiv:2211.09997)." );

#ifdef USE_OPENVDB
ri.Printf( PRINT_ALL, "VDB: initialized (OpenVDB + NanoVDB)\n" );
#else
ri.Printf( PRINT_ALL, "VDB: initialized (NanoVDB only, compile with USE_OPENVDB for full support)\n" );
#endif
ri.Printf( PRINT_ALL, "VDB: initialized (NanoVDB)\n" );
VDB_RegisterConsoleCommands();
}

Expand Down Expand Up @@ -608,9 +604,6 @@ vdbHandle_t VDB_Load( const char *filename, const char *gridName ) {

if ( !VDB_NanoVDB_ResolveGrid( fileBuf, len, gridName, &gridPtr ) ) {
ri.Printf( PRINT_WARNING, "VDB: %s is not a valid NanoVDB file (or unsupported grid type)\n", filename );
#ifdef USE_OPENVDB
ri.Printf( PRINT_ALL, "VDB: attempting OpenVDB load...\n" );
#endif
grids[slot].active = qfalse;
numGrids--;
ri.FS_FreeFile( buf );
Expand Down
17 changes: 0 additions & 17 deletions src/server/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,6 @@ typedef struct {

} serverStatic_t;

#ifdef USE_BANS
#define SERVER_MAXBANS 1024
// Structure for managing bans
typedef struct
{
netadr_t ip;
// For a CIDR-Notation type suffix
int subnet;

qboolean isexception;
} serverBan_t;
#endif

//=============================================================================

Expand Down Expand Up @@ -312,11 +300,6 @@ extern cvar_t *sv_levelTimeReset;
extern cvar_t *sv_filter;
extern cvar_t *sv_voipProximity;

#ifdef USE_BANS
extern cvar_t *sv_banFile;
extern serverBan_t serverBans[SERVER_MAXBANS];
extern int serverBansCount;
#endif

//===========================================================

Expand Down
Loading
Loading