Cycles: fixes for OpenCL build after pass changes, patch by Daniel Genrich.
This commit is contained in:
@@ -220,7 +220,7 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
|
||||
|
||||
path_radiance_init(&L, kernel_data.film.use_light_pass);
|
||||
|
||||
#ifdef __EMISSION__
|
||||
#if defined(__EMISSION__) || defined(__BACKGROUND__)
|
||||
float ray_pdf = 0.0f;
|
||||
#endif
|
||||
PathState state;
|
||||
@@ -239,11 +239,13 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
|
||||
if(kernel_data.background.transparent && (state.flag & PATH_RAY_CAMERA)) {
|
||||
L_transparent += average(throughput);
|
||||
}
|
||||
#ifdef __BACKGROUND__
|
||||
else {
|
||||
/* sample background shader */
|
||||
float3 L_background = indirect_background(kg, &ray, state.flag, ray_pdf);
|
||||
path_radiance_accum_background(&L, throughput, L_background, state.bounce);
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user