mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
new cvar r_alwaysmaxlod for PCVR build
This commit is contained in:
parent
9387dea98f
commit
8e7c1f69a4
7 changed files with 22 additions and 3 deletions
|
@ -2185,7 +2185,8 @@ void G2API_AddSkinGore(CGhoul2Info_v &ghoul2,SSkinGoreData &gore)
|
|||
|
||||
int lod;
|
||||
ResetGoreTag();
|
||||
const int lodbias=Com_Clamp ( 0, 2,G2_DecideTraceLod(ghoul2[0],r_lodbias->integer));
|
||||
const int lodbias= r_alwaysmaxlod->integer ? 0 :
|
||||
Com_Clamp ( 0, 2,G2_DecideTraceLod(ghoul2[0],r_lodbias->integer));
|
||||
const int maxLod =Com_Clamp (0,ghoul2[0].currentModel->numLods,3); //limit to the number of lods the main model has
|
||||
for(lod=lodbias;lod<maxLod;lod++)
|
||||
{
|
||||
|
|
|
@ -842,6 +842,11 @@ static int G2_ComputeLOD( trRefEntity_t *ent, const model_t *currentModel, int l
|
|||
return(0);
|
||||
}
|
||||
|
||||
if (r_alwaysmaxlod->integer)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (r_lodbias->integer > lodBias)
|
||||
{
|
||||
lodBias = r_lodbias->integer;
|
||||
|
|
|
@ -55,6 +55,7 @@ cvar_t *r_dynamiclight;
|
|||
// rjr - removed for hacking cvar_t *r_dlightBacks;
|
||||
|
||||
cvar_t *r_lodbias;
|
||||
cvar_t *r_alwaysmaxlod;
|
||||
cvar_t *r_lodscale;
|
||||
|
||||
cvar_t *r_norefresh;
|
||||
|
@ -1555,6 +1556,11 @@ void R_Register( void )
|
|||
//
|
||||
r_lodCurveError = ri.Cvar_Get( "r_lodCurveError", "250", CVAR_ARCHIVE_ND );
|
||||
r_lodbias = ri.Cvar_Get( "r_lodbias", "-2", CVAR_ARCHIVE_ND );
|
||||
#ifdef _WIN32
|
||||
r_alwaysmaxlod = ri.Cvar_Get( "r_alwaysmaxlod", "1", CVAR_ARCHIVE_ND );
|
||||
#else
|
||||
r_alwaysmaxlod = ri.Cvar_Get("r_alwaysmaxlod", "0", CVAR_ARCHIVE_ND);
|
||||
#endif
|
||||
r_flares = ri.Cvar_Get ("r_flares", "1", CVAR_ARCHIVE_ND );
|
||||
r_lodscale = ri.Cvar_Get( "r_lodscale", "10", CVAR_ARCHIVE_ND );
|
||||
|
||||
|
|
|
@ -1103,6 +1103,7 @@ extern cvar_t *r_texturebitslm; // number of desired lightmap texture bits
|
|||
extern cvar_t *r_measureOverdraw; // enables stencil buffer overdraw measurement
|
||||
|
||||
extern cvar_t *r_lodbias; // push/pull LOD transitions
|
||||
extern cvar_t * r_alwaysmaxlod; // force best LOD
|
||||
extern cvar_t *r_lodscale;
|
||||
|
||||
extern cvar_t *r_primitives; // "0" = based on compiled vertex array existance
|
||||
|
|
|
@ -197,6 +197,11 @@ static int R_ComputeLOD( trRefEntity_t *ent ) {
|
|||
return(0);
|
||||
}
|
||||
|
||||
if (r_alwaysmaxlod->integer)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
// multiple LODs exist, so compute projected bounding sphere
|
||||
// and use that as a criteria for selecting LOD
|
||||
// if ( tr.currentModel->md3[0] )
|
||||
|
|
|
@ -722,7 +722,7 @@ Ghoul2 Insert End
|
|||
// if we have a valid model and are biased
|
||||
// so that we won't see any higher detail ones,
|
||||
// stop loading them
|
||||
if ( lod <= r_lodbias->integer ) {
|
||||
if ( r_alwaysmaxlod->integer || lod <= r_lodbias->integer ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1612,7 +1612,8 @@ static void RB_SurfaceLathe()
|
|||
VectorSet2( l_oldpt, e->axis[0][0], e->axis[0][1] );
|
||||
|
||||
// do scalability stuff...r_lodbias 0-3
|
||||
int lod = r_lodbias->integer + 1;
|
||||
int lod = r_alwaysmaxlod->integer ? 1 :
|
||||
r_lodbias->integer + 1;
|
||||
if ( lod > 4 )
|
||||
{
|
||||
lod = 4;
|
||||
|
|
Loading…
Reference in a new issue