Fix T53349: AO bounces not working correct with OpenCL.

This commit is contained in:
Mathieu Menuet 2017-11-26 15:50:36 +01:00 committed by Brecht Van Lommel
parent 311da4cd16
commit 83e80db56e
Notes: blender-bot 2023-02-14 10:32:59 +01:00
Referenced by issue #53349, Cycles - difference between OpenCL and CUDA with AO simplify
1 changed files with 5 additions and 5 deletions

View File

@ -59,6 +59,11 @@ ccl_device_forceinline bool kernel_path_scene_intersect(
{
uint visibility = path_state_ray_visibility(kg, state);
if(path_state_ao_bounce(kg, state)) {
visibility = PATH_RAY_SHADOW;
ray->t = kernel_data.background.ao_distance;
}
#ifdef __HAIR__
float difl = 0.0f, extmax = 0.0f;
uint lcg_state = 0;
@ -74,11 +79,6 @@ ccl_device_forceinline bool kernel_path_scene_intersect(
lcg_state = lcg_state_init_addrspace(state, 0x51633e2d);
}
if(path_state_ao_bounce(kg, state)) {
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);