diff options
-rw-r--r-- | intern/cycles/kernel/kernel_shader.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index f935858f8ba..879160312cf 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -619,7 +619,10 @@ __device float3 shader_bsdf_ao(KernelGlobals *kg, ShaderData *sd, float ao_facto } } - *N = normalize(*N); + if(is_zero(*N)) + *N = sd->N; + else + *N = normalize(*N); return eval; #else |