light: LightGrid: don't calculate lighting for occluded samples
This commit is contained in:
parent
5f31141ac1
commit
e1f40ad995
|
|
@ -1082,8 +1082,11 @@ static void LightGrid(bspdata_t *bspdata)
|
||||||
for (int x = x_range.begin(); x < x_range.end(); ++x) {
|
for (int x = x_range.begin(); x < x_range.end(); ++x) {
|
||||||
qvec3d world_point = grid_mins + (qvec3d{x,y,z} * grid_dist);
|
qvec3d world_point = grid_mins + (qvec3d{x,y,z} * grid_dist);
|
||||||
|
|
||||||
lightgrid_samples_t samples = CalcLightgridAtPoint(&bsp, world_point);
|
|
||||||
bool occluded = Light_PointInWorld(&bsp, world_point);
|
bool occluded = Light_PointInWorld(&bsp, world_point);
|
||||||
|
lightgrid_samples_t samples;
|
||||||
|
|
||||||
|
if (!occluded)
|
||||||
|
samples = CalcLightgridAtPoint(&bsp, world_point);
|
||||||
|
|
||||||
int sample_index = (GRIDSIZE * GRIDSIZE * z) + (GRIDSIZE * y) + x;
|
int sample_index = (GRIDSIZE * GRIDSIZE * z) + (GRIDSIZE * y) + x;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue