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:
Diffstat (limited to 'intern/cycles/kernel/kernel_path_state.h')
-rw-r--r--intern/cycles/kernel/kernel_path_state.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h
index 3e0ad81c187..fe4d38b10d6 100644
--- a/intern/cycles/kernel/kernel_path_state.h
+++ b/intern/cycles/kernel/kernel_path_state.h
@@ -19,12 +19,27 @@ CCL_NAMESPACE_BEGIN
ccl_device_inline void path_state_init(KernelGlobals *kg, PathState *state, RNG *rng, int sample)
{
state->flag = PATH_RAY_CAMERA|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
+
+ state->rng_offset = PRNG_BASE_NUM;
+ state->sample = sample;
+#ifdef __CMJ__
+ state->num_samples = kernel_data.integrator.aa_samples;
+#else
+ state->num_samples = 0;
+#endif
+
state->bounce = 0;
state->diffuse_bounce = 0;
state->glossy_bounce = 0;
state->transmission_bounce = 0;
state->transparent_bounce = 0;
+ state->min_ray_pdf = FLT_MAX;
+ state->ray_pdf = 0.0f;
+#ifdef __LAMP_MIS__
+ state->ray_t = 0.0f;
+#endif
+
#ifdef __VOLUME__
if(kernel_data.integrator.use_volumes) {
/* initialize volume stack with volume we are inside of */
@@ -88,6 +103,9 @@ ccl_device_inline void path_state_next(KernelGlobals *kg, PathState *state, int
state->flag |= PATH_RAY_GLOSSY|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
state->flag &= ~PATH_RAY_DIFFUSE;
}
+
+ /* random number generator next bounce */
+ state->rng_offset += PRNG_BOUNCE_NUM;
}
ccl_device_inline uint path_state_ray_visibility(KernelGlobals *kg, PathState *state)