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
4 changes: 0 additions & 4 deletions src/renderers/opengl/tr_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1567,15 +1567,11 @@ static void R_LoadSurfaces( const lump_t *surfs, const lump_t *verts, const lump
}
}

#ifdef PATCH_STITCHING
R_StitchAllPatches();
#endif

R_FixSharedVertexLodError();

#ifdef PATCH_STITCHING
R_MovePatchSurfacesToHunk();
#endif

ri.Printf( PRINT_ALL, "...loaded %d faces, %i meshes, %i trisurfs, %i flares\n",
numFaces, numMeshes, numTriSurfs, numFlares );
Expand Down
11 changes: 0 additions & 11 deletions src/renderers/opengl/tr_curve.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height,
// copy the results out to a grid
size = (width * height - 1) * sizeof( drawVert_t ) + sizeof( *grid );

#ifdef PATCH_STITCHING
grid = /*ri.Hunk_Alloc*/ ri.Malloc( size );
Com_Memset(grid, 0, size);

Expand All @@ -301,16 +300,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height,

grid->heightLodError = /*ri.Hunk_Alloc*/ ri.Malloc( height * 4 );
Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 );
#else
grid = ri.Hunk_Alloc( size );
Com_Memset(grid, 0, size);

grid->widthLodError = ri.Hunk_Alloc( width * 4 );
Com_Memcpy( grid->widthLodError, errorTable[0], width * 4 );

grid->heightLodError = ri.Hunk_Alloc( height * 4 );
Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 );
#endif

grid->width = width;
grid->height = height;
Expand Down
2 changes: 0 additions & 2 deletions src/renderers/opengl/tr_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1674,8 +1674,6 @@ CURVE TESSELATION
============================================================
*/

#define PATCH_STITCHING

srfGridMesh_t *R_SubdividePatchToGrid( int width, int height,
drawVert_t points[MAX_PATCH_SIZE*MAX_PATCH_SIZE] );
srfGridMesh_t *R_GridInsertColumn( srfGridMesh_t *grid, int column, int row, vec3_t point, float loderror );
Expand Down
4 changes: 0 additions & 4 deletions src/renderers/vulkan/tr_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,15 +1771,11 @@ static void R_LoadSurfaces( const lump_t *surfs, const lump_t *verts, const lump
}
}

#ifdef PATCH_STITCHING
R_StitchAllPatches();
#endif

R_FixSharedVertexLodError();

#ifdef PATCH_STITCHING
R_MovePatchSurfacesToHunk();
#endif

ri.Printf( PRINT_ALL, "...loaded %d faces, %i meshes, %i trisurfs, %i flares\n",
numFaces, numMeshes, numTriSurfs, numFlares );
Expand Down
11 changes: 0 additions & 11 deletions src/renderers/vulkan/tr_curve.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height,
// copy the results out to a grid
size = (width * height - 1) * sizeof( srfVert_t ) + sizeof( *grid );

#ifdef PATCH_STITCHING
grid = /*ri.Hunk_Alloc*/ ri.Malloc( size );
Com_Memset(grid, 0, size);

Expand All @@ -434,16 +433,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height,

grid->heightLodError = /*ri.Hunk_Alloc*/ ri.Malloc( height * 4 );
Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 );
#else
grid = ri.Hunk_Alloc( size );
Com_Memset(grid, 0, size);

grid->widthLodError = ri.Hunk_Alloc( width * 4 );
Com_Memcpy( grid->widthLodError, errorTable[0], width * 4 );

grid->heightLodError = ri.Hunk_Alloc( height * 4 );
Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 );
#endif

grid->width = width;
grid->height = height;
Expand Down
3 changes: 0 additions & 3 deletions src/renderers/vulkan/tr_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif

#define USE_VBO // store static world geometry in VBO
#define USE_FOG_COLLAPSE // not compatible with legacy dlights
#define MAX_REAL_DLIGHTS (MAX_DLIGHTS*2)
#define MAX_LITSURFS (MAX_DRAWSURFS)
#define MAX_FLARES 256
Expand Down Expand Up @@ -2136,8 +2135,6 @@ CURVE TESSELATION
============================================================
*/

#define PATCH_STITCHING

srfGridMesh_t *R_SubdividePatchToGrid( int width, int height,
srfVert_t points[MAX_PATCH_SIZE*MAX_PATCH_SIZE] );
srfGridMesh_t *R_GridInsertColumn( srfGridMesh_t *grid, int column, int row, vec3_t point, float loderror );
Expand Down
4 changes: 0 additions & 4 deletions src/renderers/vulkan/tr_shade.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,14 +1275,12 @@ static void RB_IterateStagesGeneric( const shaderCommands_t *input )

is_pbr_surface = qfalse;

#ifdef USE_FOG_COLLAPSE
if ( fogCollapse ) {
VK_SetFogParams( &uniform, &fog_stage );
VectorCopy( backEnd.or.viewOrigin, uniform.eyePos );
vk_update_descriptor( VK_DESC_FOG_COLLAPSE, tr.fogImage->descriptor );
pushUniform = qtrue;
} else
#endif
{
fog_stage = 0;
if ( tess_flags & TESS_VPOS ) {
Expand Down Expand Up @@ -1943,9 +1941,7 @@ void RB_StageIteratorGeneric( void )
return;
}

#ifdef USE_FOG_COLLAPSE
fogCollapse = tess.fogNum && tess.shader->fogPass && tess.shader->fogCollapse;
#endif
worldShOverride = ( r_shDebugView && r_shDebugView->integer == 3 );

// call shader function
Expand Down
4 changes: 0 additions & 4 deletions src/renderers/vulkan/tr_shader.c
Original file line number Diff line number Diff line change
Expand Up @@ -4191,7 +4191,6 @@ static shader_t *FinishShader( void ) {

#ifdef USE_VULKAN

#ifdef USE_FOG_COLLAPSE
if ( vk.maxBoundDescriptorSets >= 6 && !(shader.contentFlags & CONTENTS_FOG) && shader.fogPass != FP_NONE ) {
fogCollapse = qtrue;
if ( stage == 1 ) {
Expand Down Expand Up @@ -4243,7 +4242,6 @@ static shader_t *FinishShader( void ) {
// if there is no fogs - assume that we can apply all color optimizations without any restrictions
fogCollapse = qtrue;
}
#endif

shader.tessFlags = TESS_XYZ;

Expand Down Expand Up @@ -4521,7 +4519,6 @@ static shader_t *FinishShader( void ) {
}


#ifdef USE_FOG_COLLAPSE
if ( fogCollapse && tr.numFogs > 0 ) {
Vk_Pipeline_Def fog_def;
Vk_Pipeline_Def fog_def_mirror;
Expand Down Expand Up @@ -4552,7 +4549,6 @@ static shader_t *FinishShader( void ) {

shader.fogCollapse = qtrue;
}
#endif
}
}
#endif // USE_VULKAN
Expand Down
Loading