[Bf-blender-cvs] [d8661ee2d5e] master: Cycles: Remove re-hashing done in BPT volume code

Sergey Sharybin noreply at git.blender.org
Mon Apr 24 21:48:07 CEST 2017


Commit: d8661ee2d5e76ef012b356eda93ea1a9ed8af325
Author: Sergey Sharybin
Date:   Mon Apr 24 21:47:17 2017 +0200
Branches: master
https://developer.blender.org/rBd8661ee2d5e76ef012b356eda93ea1a9ed8af325

Cycles: Remove re-hashing done in BPT volume code

Since 9d50175 this is no longer needed, at least not with the current
sampler we are using.

===================================================================

M	intern/cycles/kernel/kernel_path_branched.h

===================================================================

diff --git a/intern/cycles/kernel/kernel_path_branched.h b/intern/cycles/kernel/kernel_path_branched.h
index 36fd6c95fe7..085eb42325d 100644
--- a/intern/cycles/kernel/kernel_path_branched.h
+++ b/intern/cycles/kernel/kernel_path_branched.h
@@ -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);




More information about the Bf-blender-cvs mailing list