Cycles: Remove re-hashing done in BPT volume code
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Apr 2017 19:47:17 +0000 (21:47 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Apr 2017 19:48:01 +0000 (21:48 +0200)
Since 9d50175 this is no longer needed, at least not with the current
sampler we are using.

intern/cycles/kernel/kernel_path_branched.h

index 36fd6c95fe72e120a30bd489ddf9ccf95c6ba469..085eb42325d5f6cda6d3e24be42fefce91544ba3 100644 (file)
@@ -337,11 +337,6 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in
                                float num_samples_inv = 1.0f/num_samples;
 
                                for(int j = 0; j < num_samples; j++) {
-                                       /* workaround to fix correlation bug in T38710, can find better solution
-                                        * in random number generator later, for now this is done here to not impact
-                                        * performance of rendering without volumes */
-                                       RNG tmp_rng = cmj_hash(*rng, state.rng_offset);
-
                                        PathState ps = state;
                                        Ray pray = ray;
                                        float3 tp = throughput;
@@ -352,8 +347,8 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in
                                        /* scatter sample. if we use distance sampling and take just one
                                         * sample for direct and indirect light, we could share this
                                         * computation, but makes code a bit complex */
-                                       float rphase = path_state_rng_1D_for_decision(kg, &tmp_rng, &ps, PRNG_PHASE);
-                                       float rscatter = path_state_rng_1D_for_decision(kg, &tmp_rng, &ps, PRNG_SCATTER_DISTANCE);
+                                       float rphase = path_state_rng_1D_for_decision(kg, rng, &ps, PRNG_PHASE);
+                                       float rscatter = path_state_rng_1D_for_decision(kg, rng, &ps, PRNG_SCATTER_DISTANCE);
 
                                        VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg,
                                                &ps, &pray, &sd, &tp, rphase, rscatter, &volume_segment, NULL, false);