* adjust -light -trisoup to enable performance hack for games with low verts per lmed surf count (e.g. 64 in Q3):

-bsp -meta -mv 999 //get big lmed surfs with max verts count = max trisoup verts (-debugsurfaces to debug)
		-light -extlmhacksize 1024 -trisoup //gen shaders for external lms and mark as trisoup
This commit is contained in:
Garux 2024-02-26 22:41:10 +06:00
parent c8bf05af57
commit a3d438c4be
2 changed files with 10 additions and 6 deletions

View File

@ -1990,6 +1990,16 @@ static void LightWorld( bool fastAllocate, bool bounceStore ){
/* ydnar: store off lightmaps */ /* ydnar: store off lightmaps */
StoreSurfaceLightmaps( fastAllocate, true ); StoreSurfaceLightmaps( fastAllocate, true );
/* ydnar: optional force-to-trisoup */
if( trisoup ){
for( auto& ds : bspDrawSurfaces ){
if( ds.surfaceType == MST_PLANAR ){
ds.surfaceType = MST_TRIANGLE_SOUP;
ds.lightmapNum[ 0 ] = -3;
}
}
}
} }

View File

@ -201,12 +201,6 @@ void SmoothNormals(){
smoothed[ f ] = true; smoothed[ f ] = true;
} }
} }
/* ydnar: optional force-to-trisoup */
if ( trisoup && ds.surfaceType == MST_PLANAR ) {
ds.surfaceType = MST_TRIANGLE_SOUP;
ds.lightmapNum[ 0 ] = -3;
}
} }
/* bail if no surfaces have a shade angle */ /* bail if no surfaces have a shade angle */