Cycles: code refactoring, to do render layer visibility test a bit different,
[blender.git] / intern / cycles / render / integrator.cpp
index 9d129d8e8db07f1c48076845fbe7fa8f5b73e12e..47059a0a009207f8e326e3290ebc4b1492532956 100644 (file)
@@ -41,9 +41,8 @@ Integrator::Integrator()
        transparent_shadows = false;
 
        no_caustics = false;
-       blur_caustics = 0.0f;
-
        seed = 0;
+       layer_flag = ~0;
 
        need_update = true;
 }
@@ -81,9 +80,8 @@ void Integrator::device_update(Device *device, DeviceScene *dscene)
        kintegrator->transparent_shadows = transparent_shadows;
 
        kintegrator->no_caustics = no_caustics;
-       kintegrator->blur_caustics = blur_caustics;
-
        kintegrator->seed = hash_int(seed);
+       kintegrator->layer_flag = layer_flag << PATH_RAY_LAYER_SHIFT;
 
        /* sobol directions table */
        int dimensions = PRNG_BASE_NUM + (max_bounce + transparent_max_bounce + 2)*PRNG_BOUNCE_NUM;
@@ -115,7 +113,7 @@ bool Integrator::modified(const Integrator& integrator)
                transparent_probalistic == integrator.transparent_probalistic &&
                transparent_shadows == integrator.transparent_shadows &&
                no_caustics == integrator.no_caustics &&
-               blur_caustics == integrator.blur_caustics &&
+               layer_flag == integrator.layer_flag &&
                seed == integrator.seed);
 }