forked from bartvdbraak/blender
Cycles: small code fix for disabled code.
This commit is contained in:
parent
46945d805f
commit
5ebc88266e
@ -391,6 +391,10 @@ __device float light_sample_pdf(KernelGlobals *kg, LightSample *ls, float3 I, fl
|
||||
__device void light_select(KernelGlobals *kg, int index, float randu, float randv, float3 P, LightSample *ls, float *pdf)
|
||||
{
|
||||
regular_light_sample(kg, index, randu, randv, P, ls, pdf);
|
||||
|
||||
/* compute incoming direction and distance */
|
||||
if(ls->t != FLT_MAX)
|
||||
ls->D = normalize_len(ls->P - P, &ls->t);
|
||||
}
|
||||
|
||||
__device float light_select_pdf(KernelGlobals *kg, LightSample *ls, float3 I, float t)
|
||||
|
@ -365,7 +365,7 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
|
||||
|
||||
#ifdef __MULTI_LIGHT__
|
||||
/* index -1 means randomly sample from distribution */
|
||||
int i = (kernel_data.integrator.num_distribution)? -1: 0;
|
||||
int i = (kernel_data.integrator.num_all_lights)? 0: -1;
|
||||
|
||||
for(; i < kernel_data.integrator.num_all_lights; i++) {
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user