forked from bartvdbraak/blender
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.
This commit is contained in:
parent
69a216d343
commit
d8661ee2d5
@ -337,11 +337,6 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in
|
|||||||
float num_samples_inv = 1.0f/num_samples;
|
float num_samples_inv = 1.0f/num_samples;
|
||||||
|
|
||||||
for(int j = 0; j < num_samples; j++) {
|
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;
|
PathState ps = state;
|
||||||
Ray pray = ray;
|
Ray pray = ray;
|
||||||
float3 tp = throughput;
|
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
|
/* scatter sample. if we use distance sampling and take just one
|
||||||
* sample for direct and indirect light, we could share this
|
* sample for direct and indirect light, we could share this
|
||||||
* computation, but makes code a bit complex */
|
* computation, but makes code a bit complex */
|
||||||
float rphase = path_state_rng_1D_for_decision(kg, &tmp_rng, &ps, PRNG_PHASE);
|
float rphase = path_state_rng_1D_for_decision(kg, rng, &ps, PRNG_PHASE);
|
||||||
float rscatter = path_state_rng_1D_for_decision(kg, &tmp_rng, &ps, PRNG_SCATTER_DISTANCE);
|
float rscatter = path_state_rng_1D_for_decision(kg, rng, &ps, PRNG_SCATTER_DISTANCE);
|
||||||
|
|
||||||
VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg,
|
VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg,
|
||||||
&ps, &pray, &sd, &tp, rphase, rscatter, &volume_segment, NULL, false);
|
&ps, &pray, &sd, &tp, rphase, rscatter, &volume_segment, NULL, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user