diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_accumulate.h | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_bake.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_passes.h | 7 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h index 79ea03f4f6f..7a57a2f33ff 100644 --- a/intern/cycles/kernel/kernel_accumulate.h +++ b/intern/cycles/kernel/kernel_accumulate.h @@ -195,7 +195,7 @@ ccl_device_inline void path_radiance_init(KernelGlobals *kg, PathRadiance *L) L->emission = make_float3(0.0f, 0.0f, 0.0f); L->background = make_float3(0.0f, 0.0f, 0.0f); L->ao = make_float3(0.0f, 0.0f, 0.0f); - L->shadow = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + L->shadow = make_float3(0.0f, 0.0f, 0.0f); L->mist = 0.0f; L->state.diffuse = make_float3(0.0f, 0.0f, 0.0f); @@ -439,9 +439,7 @@ ccl_device_inline void path_radiance_accum_light(KernelGlobals *kg, L->direct_volume += shaded_throughput * bsdf_eval->volume; if (is_lamp) { - L->shadow.x += shadow.x * shadow_fac; - L->shadow.y += shadow.y * shadow_fac; - L->shadow.z += shadow.z * shadow_fac; + L->shadow += shadow * shadow_fac; } } else { diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h index 2709a9da734..e876e5d8ca6 100644 --- a/intern/cycles/kernel/kernel_bake.h +++ b/intern/cycles/kernel/kernel_bake.h @@ -383,7 +383,7 @@ ccl_device void kernel_bake_evaluate( break; } case SHADER_EVAL_SHADOW: { - out = make_float3(L.shadow.x, L.shadow.y, L.shadow.z); + out = L.shadow; break; } case SHADER_EVAL_DIFFUSE: { diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index 753cf4561b2..239c01fc57a 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -326,9 +326,10 @@ ccl_device_inline void kernel_write_light_passes(KernelGlobals *kg, kernel_write_pass_float3(buffer + kernel_data.film.pass_transmission_color, L->color_transmission); if (light_flag & PASSMASK(SHADOW)) { - float4 shadow = L->shadow; - shadow.w = kernel_data.film.pass_shadow_scale; - kernel_write_pass_float4(buffer + kernel_data.film.pass_shadow, shadow); + float3 shadow = L->shadow; + kernel_write_pass_float4( + buffer + kernel_data.film.pass_shadow, + make_float4(shadow.x, shadow.y, shadow.z, kernel_data.film.pass_shadow_scale)); } if (light_flag & PASSMASK(MIST)) kernel_write_pass_float(buffer + kernel_data.film.pass_mist, 1.0f - L->mist); diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index fc9cc73a704..77e134da4b0 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -522,7 +522,7 @@ typedef ccl_addr_space struct PathRadiance { float3 indirect_transmission; float3 indirect_volume; - float4 shadow; + float3 shadow; float mist; #endif |