Cycles: Automatically detect HDRI resolution by default and use non-square sampling map
[blender.git] / intern / cycles / kernel / kernel_emission.h
index a5556c3be8fbe3d51164c94708e245a703dd69e0..524e2467ebc507318147baa321b993d77903bfb3 100644 (file)
@@ -319,9 +319,9 @@ ccl_device_noinline float3 indirect_background(KernelGlobals *kg,
 
 #ifdef __BACKGROUND_MIS__
        /* check if background light exists or if we should skip pdf */
-       int res = kernel_data.integrator.pdf_background_res;
+       int res_x = kernel_data.integrator.pdf_background_res_x;
 
-       if(!(state->flag & PATH_RAY_MIS_SKIP) && res) {
+       if(!(state->flag & PATH_RAY_MIS_SKIP) && res_x) {
                /* multiple importance sampling, get background light pdf for ray
                 * direction, and compute weight with respect to BSDF pdf */
                float pdf = background_light_pdf(kg, ray->P, ray->D);