[Bf-blender-cvs] [9ae8cec47a2] cycles_path_guiding: Fix potential correlation issues with PRNG_GUIDING
Brecht Van Lommel
noreply at git.blender.org
Thu Aug 25 21:57:39 CEST 2022
Commit: 9ae8cec47a275c285681ed625f9c523b96d74384
Author: Brecht Van Lommel
Date: Thu Aug 25 21:44:53 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB9ae8cec47a275c285681ed625f9c523b96d74384
Fix potential correlation issues with PRNG_GUIDING
===================================================================
M intern/cycles/kernel/integrator/shade_volume.h
M intern/cycles/kernel/integrator/shader_eval.h
M intern/cycles/kernel/types.h
===================================================================
diff --git a/intern/cycles/kernel/integrator/shade_volume.h b/intern/cycles/kernel/integrator/shade_volume.h
index f3fb0edf2ba..e7bc069b1d8 100644
--- a/intern/cycles/kernel/integrator/shade_volume.h
+++ b/intern/cycles/kernel/integrator/shade_volume.h
@@ -1057,7 +1057,7 @@ ccl_device_inline void shader_prepare_volume_guiding(KernelGlobals kg,
// if (fabsf(mean_cosine) < 0.1f ) { // for now we only support HG phase function with very
// low anisotropy
if (true) {
- grand = path_state_rng_1D(kg, rng_state, PRNG_GUIDING);
+ grand = path_state_rng_1D_hash(kg, rng_state, 0xa172f2f0);
pgl_point3f pgl_P = openpgl::cpp::Point3(P[0], P[1], P[2]);
pgl_point3f pgl_W = openpgl::cpp::Vector3(W[0], W[1], W[2]);
diff --git a/intern/cycles/kernel/integrator/shader_eval.h b/intern/cycles/kernel/integrator/shader_eval.h
index b3f99d752c4..866387cdf1b 100644
--- a/intern/cycles/kernel/integrator/shader_eval.h
+++ b/intern/cycles/kernel/integrator/shader_eval.h
@@ -113,7 +113,7 @@ ccl_device_inline void shader_prepare_surface_guiding(KernelGlobals kg,
if (guiding && surface_guiding) {
- grand = path_state_rng_1D(kg, rng_state, PRNG_GUIDING);
+ grand = path_state_rng_1D_hash(kg, rng_state, 0xa172f2f0);
for (int i = 0; i < sd->num_closure; i++) {
ShaderClosure *sc = &sd->closure[i];
diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h
index 40907060b8a..746b3bf9231 100644
--- a/intern/cycles/kernel/types.h
+++ b/intern/cycles/kernel/types.h
@@ -174,8 +174,6 @@ enum PathTraceDimension {
PRNG_SCATTER_DISTANCE = 7,
PRNG_BOUNCE_NUM = 8,
- PRNG_GUIDING = 9,
-
PRNG_BEVEL_U = 6, /* reuse volume dimension, correlation won't harm */
PRNG_BEVEL_V = 7,
};
More information about the Bf-blender-cvs
mailing list