Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-08-26 14:14:57 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-01 15:57:39 +0300
commit60119daef569f647c3004360daf657739461b750 (patch)
tree6553b5a16777fdc32afa3fe07dd7d017bc6d1c80 /intern/cycles/kernel/integrator/subsurface_disk.h
parent50df9caef01a4225db216d9c4c0515134f7a37bf (diff)
Cycles: remove old Sobol pattern, simplify sampling dimensions
The multi-dimensional Sobol pattern required us to carefully use as low dimensions as possible, as quality goes down in higher dimensions. Now that we have two sampling patterns that are at least as good, there is no need to keep it around and the implementation can be simplified. Differential Revision: https://developer.blender.org/D15788
Diffstat (limited to 'intern/cycles/kernel/integrator/subsurface_disk.h')
-rw-r--r--intern/cycles/kernel/integrator/subsurface_disk.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/integrator/subsurface_disk.h b/intern/cycles/kernel/integrator/subsurface_disk.h
index 77763f702d8..bc4189f6b56 100644
--- a/intern/cycles/kernel/integrator/subsurface_disk.h
+++ b/intern/cycles/kernel/integrator/subsurface_disk.h
@@ -26,7 +26,7 @@ ccl_device_inline bool subsurface_disk(KernelGlobals kg,
{
float disk_u, disk_v;
- path_state_rng_2D(kg, &rng_state, PRNG_BSDF_U, &disk_u, &disk_v);
+ path_state_rng_2D(kg, &rng_state, PRNG_SUBSURFACE_DISK, &disk_u, &disk_v);
/* Read shading point info from integrator state. */
const float3 P = INTEGRATOR_STATE(state, ray, P);
@@ -163,7 +163,7 @@ ccl_device_inline bool subsurface_disk(KernelGlobals kg,
}
/* Use importance resampling, sampling one of the hits proportional to weight. */
- const float r = lcg_step_float(&lcg_state) * sum_weights;
+ const float r = path_state_rng_1D(kg, &rng_state, PRNG_SUBSURFACE_DISK_RESAMPLE) * sum_weights;
float partial_sum = 0.0f;
for (int hit = 0; hit < num_eval_hits; hit++) {