mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Round moc buffer width and height
This commit is contained in:
parent
b3a22ffc7e
commit
abff15168b
1 changed files with 14 additions and 2 deletions
|
@ -520,8 +520,20 @@ void R_FillMaskedOcclusionBufferWithModels( viewDef_t* viewDef )
|
|||
|
||||
int startTime = Sys_Microseconds();
|
||||
|
||||
const int viewWidth = viewDef->viewport.x2 - viewDef->viewport.x1 + 1;
|
||||
const int viewHeight = viewDef->viewport.y2 - viewDef->viewport.y1 + 1;
|
||||
int viewWidth = viewDef->viewport.x2 - viewDef->viewport.x1 + 1;
|
||||
int viewHeight = viewDef->viewport.y2 - viewDef->viewport.y1 + 1;
|
||||
|
||||
if( viewWidth & 7 )
|
||||
{
|
||||
// must be multiple of 8
|
||||
viewWidth = ( viewWidth + 7 ) & ~7;
|
||||
}
|
||||
|
||||
if( viewHeight & 3 )
|
||||
{
|
||||
// must be multiple of 4
|
||||
viewHeight = ( viewHeight + 3 ) & ~3;
|
||||
}
|
||||
|
||||
const float zNear = ( viewDef->renderView.cramZNear ) ? ( r_znear.GetFloat() * 0.25f ) : r_znear.GetFloat();
|
||||
|
||||
|
|
Loading…
Reference in a new issue