From 60119daef569f647c3004360daf657739461b750 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 26 Aug 2022 13:14:57 +0200 Subject: 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 --- intern/cycles/kernel/integrator/subsurface_disk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern/cycles/kernel/integrator/subsurface_disk.h') 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++) { -- cgit v1.2.3