Skip to content

Commit f950769

Browse files
Shadow LOD fix for parallel lights
1 parent 0eaaea4 commit f950769

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

neo/renderer/tr_frontend_addlights.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,15 @@ static void R_AddSingleLight( viewLight_t* vLight )
302302
}
303303

304304
flod *= numLods;
305-
lod = idMath::Ftoi( flod );
306305

307-
if( lod < 0 )
306+
if( flod < 0 )
308307
{
309-
lod = 0;
308+
flod = 0;
310309
}
311-
else if( lod >= numLods )
310+
311+
lod = idMath::Ftoi( flod );
312+
313+
if( lod >= numLods )
312314
{
313315
//lod = numLods - 1;
314316
}
@@ -329,7 +331,7 @@ static void R_AddSingleLight( viewLight_t* vLight )
329331
}
330332

331333
// never give ultra quality for point lights
332-
if( lod == 0 && light->parms.pointLight )
334+
if( lod == 0 && light->parms.pointLight && !light->parms.parallel )
333335
{
334336
lod = 1;
335337
}

0 commit comments

Comments
 (0)