mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Cull envprobes that aren't connected to any visible area
This commit is contained in:
parent
9a1ccf644a
commit
1870c57308
2 changed files with 15 additions and 0 deletions
|
@ -1840,6 +1840,13 @@ void idRenderBackend::DBG_ShowViewEnvprobes()
|
|||
RenderEnvprobeLocal* vProbe = tr.primaryWorld->envprobeDefs[i];
|
||||
if( vProbe )
|
||||
{
|
||||
// check for being closed off behind a door
|
||||
if( r_useLightAreaCulling.GetBool()
|
||||
&& vProbe->areaNum != -1 && !viewDef->connectedAreas[ vProbe->areaNum ] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
viewEnvprobes.AddUnique( vProbe );
|
||||
}
|
||||
}
|
||||
|
@ -1897,6 +1904,8 @@ void idRenderBackend::DBG_ShowViewEnvprobes()
|
|||
barycentricWeights.Set( a, b, c );
|
||||
}
|
||||
|
||||
idLib::Printf( "bary weights %.2f %.2f %.2f\n", barycentricWeights.x, barycentricWeights.y, barycentricWeights.z );
|
||||
|
||||
idMat3 axis;
|
||||
axis.Identity();
|
||||
|
||||
|
|
|
@ -508,6 +508,12 @@ static void R_FindClosestEnvironmentProbes()
|
|||
RenderEnvprobeLocal* vProbe = tr.primaryWorld->envprobeDefs[i];
|
||||
if( vProbe )
|
||||
{
|
||||
// check for being closed off behind a door
|
||||
if( r_useLightAreaCulling.GetBool() && vProbe->areaNum != -1 && !tr.viewDef->connectedAreas[ vProbe->areaNum ] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
viewEnvprobes.AddUnique( vProbe );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue