diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2017-04-11 01:53:31 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2017-04-11 02:07:49 +0300 |
commit | ef816f9cff54056f0bb3c986737cb35c770fbe4b (patch) | |
tree | 5deb16634d3f10122df2c1fc3544d6050e8bc431 /intern/cycles/kernel | |
parent | 8b0fbb909b158916a8161b4e8bca848fdbe3879d (diff) |
Cycles: Fix the AO replacement option in the split kernel
Currently the code for it was inside the hair-specific part, so it wouldn't be enabled in hairless renders.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/split/kernel_scene_intersect.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/split/kernel_scene_intersect.h b/intern/cycles/kernel/split/kernel_scene_intersect.h index 684760eedee..5dc94caec85 100644 --- a/intern/cycles/kernel/split/kernel_scene_intersect.h +++ b/intern/cycles/kernel/split/kernel_scene_intersect.h @@ -59,6 +59,11 @@ ccl_device void kernel_scene_intersect(KernelGlobals *kg) /* intersect scene */ uint visibility = path_state_ray_visibility(kg, &state); + if(state.bounce > kernel_data.integrator.ao_bounces) { + visibility = PATH_RAY_SHADOW; + ray.t = kernel_data.background.ao_distance; + } + #ifdef __HAIR__ float difl = 0.0f, extmax = 0.0f; uint lcg_state = 0; @@ -75,11 +80,6 @@ ccl_device void kernel_scene_intersect(KernelGlobals *kg) lcg_state = lcg_state_init(&rng, state.rng_offset, state.sample, 0x51633e2d); } - if(state.bounce > kernel_data.integrator.ao_bounces) { - visibility = PATH_RAY_SHADOW; - ray.t = kernel_data.background.ao_distance; - } - bool hit = scene_intersect(kg, ray, visibility, &isect, &lcg_state, difl, extmax); #else bool hit = scene_intersect(kg, ray, visibility, &isect, NULL, 0.0f, 0.0f); |