Skip to content

Commit

Permalink
check if lights is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeneren committed Jan 6, 2020
1 parent 0800fb8 commit 10d830d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/render_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ __device__ inline float3 direct_integrator(
}
if (mi) {
L += estimate_sun(kernel_params, rand_state, ray_pos, ray_dir, gpu_vdb, ref_sphere, root, atmosphere) * beta;
L += estimate_point_light(kernel_params, lights, rand_state, ray_pos, ray_dir, gpu_vdb, ref_sphere, root) * beta;
if(lights.num_lights>0) L += estimate_point_light(kernel_params, lights, rand_state, ray_pos, ray_dir, gpu_vdb, ref_sphere, root) * beta;
}

if (kernel_params.emission_scale > 0 && mi) {
Expand Down

0 comments on commit 10d830d

Please sign in to comment.