mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-13 22:22:05 +00:00
Fixed progressbar printing of baking cmds
This commit is contained in:
parent
4448296d74
commit
80c52c50c8
3 changed files with 22 additions and 2 deletions
|
@ -82,7 +82,7 @@ idCVar r_useValidationLayers( "r_useValidationLayers", "1", CVAR_INTEGER | CVAR_
|
|||
#if ID_MSAA
|
||||
idCVar r_antiAliasing( "r_antiAliasing", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_INTEGER | CVAR_NEW, " 0 = None\n 1 = TAA 1x\n 2 = TAA + SMAA 1x\n 3 = MSAA 2x\n 4 = MSAA 4x\n", 0, ANTI_ALIASING_MSAA_4X );
|
||||
#else
|
||||
idCVar r_antiAliasing( "r_antiAliasing", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_INTEGER | CVAR_NEW, " 0 = None\n 1 = SMAA 1x, 2 = TAA", 0, ANTI_ALIASING_TAA );
|
||||
idCVar r_antiAliasing( "r_antiAliasing", "2", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_INTEGER | CVAR_NEW, " 0 = None\n 1 = SMAA 1x, 2 = TAA", 0, ANTI_ALIASING_TAA );
|
||||
#endif
|
||||
// RB end
|
||||
idCVar r_vidMode( "r_vidMode", "0", CVAR_ARCHIVE | CVAR_RENDERER | CVAR_INTEGER, "fullscreen video mode number" );
|
||||
|
@ -154,7 +154,7 @@ idCVar r_useLightPortalCulling( "r_useLightPortalCulling", "1", CVAR_RENDERER |
|
|||
idCVar r_useLightAreaCulling( "r_useLightAreaCulling", "1", CVAR_RENDERER | CVAR_BOOL, "0 = off, 1 = on" );
|
||||
idCVar r_useLightScissors( "r_useLightScissors", "3", CVAR_RENDERER | CVAR_INTEGER, "0 = no scissor, 1 = non-clipped scissor, 2 = near-clipped scissor, 3 = fully-clipped scissor", 0, 3, idCmdSystem::ArgCompletion_Integer<0, 3> );
|
||||
idCVar r_useEntityPortalCulling( "r_useEntityPortalCulling", "1", CVAR_RENDERER | CVAR_INTEGER, "0 = none, 1 = cull frustum corners to plane, 2 = exact clip the frustum faces", 0, 2, idCmdSystem::ArgCompletion_Integer<0, 2> );
|
||||
idCVar r_clear( "r_clear", "2", CVAR_RENDERER, "force screen clear every frame, 1 = purple, 2 = black, 'r g b' = custom" );
|
||||
idCVar r_clear( "r_clear", "2", CVAR_RENDERER | CVAR_NOCHEAT, "force screen clear every frame, 1 = purple, 2 = black, 'r g b' = custom" );
|
||||
|
||||
idCVar r_offsetFactor( "r_offsetfactor", "0", CVAR_RENDERER | CVAR_FLOAT, "polygon offset parameter" );
|
||||
// RB: offset factor was 0, and units were -600 which caused some very ugly polygon offsets on Android so I reverted the values to the same as in Q3A
|
||||
|
|
|
@ -959,6 +959,14 @@ CONSOLE_COMMAND_SHIP( bakeEnvironmentProbes, "Bake environment probes", NULL )
|
|||
// make sure the game / draw thread has completed
|
||||
commonLocal.WaitGameThread();
|
||||
|
||||
// turn vsync off for faster capturing of the probes
|
||||
int oldVsync = r_swapInterval.GetInteger();
|
||||
r_swapInterval.SetInteger( 0 );
|
||||
|
||||
// turn off clear in between views so we keep the progress bar visible
|
||||
int oldClear = r_clear.GetInteger();
|
||||
r_clear.SetInteger( 0 );
|
||||
|
||||
// disable scissor, so we don't need to adjust all those rects
|
||||
r_useScissor.SetBool( false );
|
||||
|
||||
|
@ -1124,6 +1132,9 @@ CONSOLE_COMMAND_SHIP( bakeEnvironmentProbes, "Bake environment probes", NULL )
|
|||
}
|
||||
}
|
||||
|
||||
// generate .bimage file
|
||||
globalImages->ImageFromFile( job->filename, TF_LINEAR, TR_CLAMP, TD_R11G11B10F, CF_2D_PACKED_MIPCHAIN );
|
||||
|
||||
Mem_Free( job->outBuffer );
|
||||
|
||||
delete job;
|
||||
|
@ -1157,6 +1168,10 @@ CONSOLE_COMMAND_SHIP( bakeEnvironmentProbes, "Bake environment probes", NULL )
|
|||
idLib::Printf( "----------------------------------\n" );
|
||||
idLib::Printf( "Processed %i light probes\n", totalProcessedProbes );
|
||||
common->Printf( "Baked SH irradiance and GGX mip maps in %5.1f minutes\n\n", ( totalEnd - totalStart ) / ( 1000.0f * 60 ) );
|
||||
|
||||
// restore vsync setting
|
||||
r_swapInterval.SetInteger( oldVsync );
|
||||
r_clear.SetInteger( oldClear );
|
||||
}
|
||||
|
||||
CONSOLE_COMMAND( makeBrdfLUT, "make a GGX BRDF lookup table", NULL )
|
||||
|
|
|
@ -1162,6 +1162,10 @@ CONSOLE_COMMAND_SHIP( bakeLightGrids, "Bake irradiance/vis light grid data", NUL
|
|||
int oldVsync = r_swapInterval.GetInteger();
|
||||
r_swapInterval.SetInteger( 0 );
|
||||
|
||||
// turn off clear in between views so we keep the progress bar visible
|
||||
int oldClear = r_clear.GetInteger();
|
||||
r_clear.SetInteger( 0 );
|
||||
|
||||
idLib::Printf( "----------------------------------\n" );
|
||||
idLib::Printf( "Processing %i light probes in %i areas for %i bounces\n", totalProcessedProbes, totalProcessedAreas, bounces );
|
||||
//common->Printf( "ETA %5.1f minutes\n\n", ( totalEnd - totalStart ) / ( 1000.0f * 60 ) );
|
||||
|
@ -1441,5 +1445,6 @@ CONSOLE_COMMAND_SHIP( bakeLightGrids, "Bake irradiance/vis light grid data", NUL
|
|||
|
||||
// restore vsync setting
|
||||
r_swapInterval.SetInteger( oldVsync );
|
||||
r_clear.SetInteger( oldClear );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue