From 92022218c2f2ae22f0ee6da56210420417f0ca90 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 27 May 2015 00:13:32 +0500 Subject: Cycles: Code cleanup, split kernel --- .../kernel/split/kernel_next_iteration_setup.h | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'intern/cycles/kernel/split/kernel_next_iteration_setup.h') diff --git a/intern/cycles/kernel/split/kernel_next_iteration_setup.h b/intern/cycles/kernel/split/kernel_next_iteration_setup.h index ea07a5f3447..2dbdabc5fd3 100644 --- a/intern/cycles/kernel/split/kernel_next_iteration_setup.h +++ b/intern/cycles/kernel/split/kernel_next_iteration_setup.h @@ -81,14 +81,16 @@ ccl_device char kernel_next_iteration_setup( { char enqueue_flag = 0; - /* Load kernel globals structure and ShaderData structure */ + /* Load kernel globals structure and ShaderData structure. */ KernelGlobals *kg = (KernelGlobals *)globals; ShaderData *sd = (ShaderData *)shader_data; PathRadiance *L = 0x0; ccl_global PathState *state = 0x0; - /* Path radiance update for AO/Direct_lighting's shadow blocked */ - if(IS_FLAG(ray_state, ray_index, RAY_SHADOW_RAY_CAST_DL) || IS_FLAG(ray_state, ray_index, RAY_SHADOW_RAY_CAST_AO)) { + /* Path radiance update for AO/Direct_lighting's shadow blocked. */ + if(IS_FLAG(ray_state, ray_index, RAY_SHADOW_RAY_CAST_DL) || + IS_FLAG(ray_state, ray_index, RAY_SHADOW_RAY_CAST_AO)) + { state = &PathState_coop[ray_index]; L = &PathRadiance_coop[ray_index]; float3 _throughput = throughput_coop[ray_index]; @@ -97,7 +99,12 @@ ccl_device char kernel_next_iteration_setup( float3 shadow = LightRay_ao_coop[ray_index].P; char update_path_radiance = LightRay_ao_coop[ray_index].t; if(update_path_radiance) { - path_radiance_accum_ao(L, _throughput, AOAlpha_coop[ray_index], AOBSDF_coop[ray_index], shadow, state->bounce); + path_radiance_accum_ao(L, + _throughput, + AOAlpha_coop[ray_index], + AOBSDF_coop[ray_index], + shadow, + state->bounce); } REMOVE_RAY_FLAG(ray_state, ray_index, RAY_SHADOW_RAY_CAST_AO); } @@ -107,7 +114,13 @@ ccl_device char kernel_next_iteration_setup( char update_path_radiance = LightRay_dl_coop[ray_index].t; if(update_path_radiance) { BsdfEval L_light = BSDFEval_coop[ray_index]; - path_radiance_accum_light(L, _throughput, &L_light, shadow, 1.0f, state->bounce, ISLamp_coop[ray_index]); + path_radiance_accum_light(L, + _throughput, + &L_light, + shadow, + 1.0f, + state->bounce, + ISLamp_coop[ray_index]); } REMOVE_RAY_FLAG(ray_state, ray_index, RAY_SHADOW_RAY_CAST_DL); } -- cgit v1.2.3