Fix clipping bug

This commit is contained in:
Magnus Norddahl 2016-10-19 14:32:28 +02:00
parent ef70ba0985
commit 6a7bb43ce1

View file

@ -1492,7 +1492,7 @@ bool cullhalfspace(float clipdistance1, float clipdistance2, float &t1, float &t
t1 = MAX(-clipdistance1 / (clipdistance2 - clipdistance1), t1); t1 = MAX(-clipdistance1 / (clipdistance2 - clipdistance1), t1);
if (clipdistance2 < 0.0f) if (clipdistance2 < 0.0f)
t2 = MIN(1.0f - clipdistance2 / (clipdistance1 - clipdistance2), t2); t2 = MIN(1.0f + clipdistance2 / (clipdistance1 - clipdistance2), t2);
return false; return false;
} }