Fix OpenGL2 ignoring last light grid point on each axis

Also change light grid bounds clamping to make it more clear what invalid
values are.
This commit is contained in:
Zack Middleton committed 2015-07-09 22:42:01 -05:00
1 parent 5768e2316a
commit 1bb2bc370d
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -151,7 +151,7 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent ) {
frac[i] = v - pos[i];
if ( pos[i] < 0 ) {
pos[i] = 0;
} else if ( pos[i] >= tr.world->lightGridBounds[i] - 1 ) {
} else if ( pos[i] > tr.world->lightGridBounds[i] - 1 ) {
pos[i] = tr.world->lightGridBounds[i] - 1;
}
}