mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Print time results at the end of all baking commands
This commit is contained in:
parent
3786c3aa51
commit
460719336e
3 changed files with 28 additions and 15 deletions
|
@ -978,11 +978,23 @@ CONSOLE_COMMAND( bakeEnvironmentProbes, "Bake environment probes", NULL )
|
|||
|
||||
tr.takingEnvprobe = true;
|
||||
|
||||
int start = Sys_Milliseconds();
|
||||
int totalProcessedProbes = 0;
|
||||
int totalStart = Sys_Milliseconds();
|
||||
|
||||
idLib::Printf( "Shooting %i environment probes...\n", tr.primaryWorld->envprobeDefs.Num() );
|
||||
for( int i = 0; i < tr.primaryWorld->envprobeDefs.Num(); i++ )
|
||||
{
|
||||
RenderEnvprobeLocal* def = tr.primaryWorld->envprobeDefs[i];
|
||||
if( def == NULL )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
CommandlineProgressBar progressBar( tr.primaryWorld->envprobeDefs.Num(), sysWidth, sysHeight );
|
||||
totalProcessedProbes++;
|
||||
}
|
||||
|
||||
idLib::Printf( "Shooting %i environment probes...\n", totalProcessedProbes );
|
||||
|
||||
CommandlineProgressBar progressBar( totalProcessedProbes, sysWidth, sysHeight );
|
||||
progressBar.Start();
|
||||
|
||||
for( int i = 0; i < tr.primaryWorld->envprobeDefs.Num(); i++ )
|
||||
|
@ -1115,9 +1127,7 @@ CONSOLE_COMMAND( bakeEnvironmentProbes, "Bake environment probes", NULL )
|
|||
|
||||
tr.envprobeJobs.Clear();
|
||||
|
||||
int end = Sys_Milliseconds();
|
||||
|
||||
common->Printf( "convolved probes in %5.1f seconds\n\n", ( end - start ) * 0.001f );
|
||||
int totalEnd = Sys_Milliseconds();
|
||||
|
||||
//--------------------------------------------
|
||||
// LOAD CONVOLVED OCTAHEDRONS INTO THE GPU
|
||||
|
@ -1133,6 +1143,10 @@ CONSOLE_COMMAND( bakeEnvironmentProbes, "Bake environment probes", NULL )
|
|||
def->irradianceImage->Reload( false );
|
||||
def->radianceImage->Reload( false );
|
||||
}
|
||||
|
||||
idLib::Printf( "----------------------------------\n" );
|
||||
idLib::Printf( "Processed %i light probes\n", totalProcessedProbes );
|
||||
common->Printf( "Baked light grid irradiance in %5.1f seconds\n\n", ( totalEnd - totalStart ) / ( 1000.0f ) );
|
||||
}
|
||||
|
||||
CONSOLE_COMMAND( makeBrdfLUT, "make a GGX BRDF lookup table", NULL )
|
||||
|
|
|
@ -1086,14 +1086,13 @@ CONSOLE_COMMAND( bakeLightGrids, "Bake irradiance/vis light grid data", NULL )
|
|||
|
||||
area->lightGrid.SetupLightGrid( area->globalBounds, tr.primaryWorld->mapName, tr.primaryWorld, a, limit );
|
||||
|
||||
#if 1
|
||||
int numGridPoints = area->lightGrid.CountValidGridPoints();
|
||||
if( numGridPoints == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
idLib::Printf( "Shooting %i grid probes area %i...\n", numGridPoints, a );
|
||||
idLib::Printf( "Shooting %i grid probes in area %i...\n", numGridPoints, a );
|
||||
|
||||
totalProcessedAreas++;
|
||||
totalProcessedProbes += numGridPoints;
|
||||
|
@ -1349,22 +1348,20 @@ CONSOLE_COMMAND( bakeLightGrids, "Bake irradiance/vis light grid data", NULL )
|
|||
end = Sys_Milliseconds();
|
||||
|
||||
common->Printf( "computed light grid irradiance for area %i in %5.1f seconds\n\n", a, ( end - start ) * 0.001f );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int totalEnd = Sys_Milliseconds();
|
||||
|
||||
idLib::Printf( "----------------------------------\n" );
|
||||
idLib::Printf( "Processed %i light probes in %i areas\n", totalProcessedProbes, totalProcessedAreas );
|
||||
common->Printf( "Baked light grid irradiance in %5.1f minutes\n\n", ( totalEnd - totalStart ) / ( 1000.0f * 60 ) );
|
||||
|
||||
// everything went ok so let's save the configurations to disc
|
||||
// so we can load the texture atlases with the correct subdivisions next time
|
||||
filename.Format( "%s.lightgrid", baseName.c_str() );
|
||||
tr.primaryWorld->WriteLightGridsToFile( filename );
|
||||
|
||||
tr.primaryWorld->LoadLightGridImages();
|
||||
|
||||
idLib::Printf( "----------------------------------\n" );
|
||||
idLib::Printf( "Processed %i light probes in %i areas\n", totalProcessedProbes, totalProcessedAreas );
|
||||
common->Printf( "Baked light grid irradiance in %5.1f minutes\n\n", ( totalEnd - totalStart ) / ( 1000.0f * 60 ) );
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
7z a RBDOOM-3-BFG-1.3.0.31-base_bakedlightdata.7z -r base/env/ base/maps/*.lightgrid -x!generated
|
||||
7z a RBDOOM-3-BFG-1.3.0.31-basegame_bakedlightdata.7z -r base/env/ base/maps/*.lightgrid -x!generated
|
||||
|
||||
for i in `ls *7z*`; do sha256sum $i >> SHA256SUMS.txt; done
|
||||
|
|
Loading…
Reference in a new issue