Skip to content

Commit

Permalink
Shadow LOD fix for parallel lights
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBeckebans committed May 11, 2014
1 parent 0eaaea4 commit f950769
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions neo/renderer/tr_frontend_addlights.cpp
Expand Up @@ -302,13 +302,15 @@ static void R_AddSingleLight( viewLight_t* vLight )
}

flod *= numLods;
lod = idMath::Ftoi( flod );

if( lod < 0 )
if( flod < 0 )
{
lod = 0;
flod = 0;
}
else if( lod >= numLods )

lod = idMath::Ftoi( flod );

if( lod >= numLods )
{
//lod = numLods - 1;
}
Expand All @@ -329,7 +331,7 @@ static void R_AddSingleLight( viewLight_t* vLight )
}

// never give ultra quality for point lights
if( lod == 0 && light->parms.pointLight )
if( lod == 0 && light->parms.pointLight && !light->parms.parallel )
{
lod = 1;
}
Expand Down

0 comments on commit f950769

Please sign in to comment.