diff options
author | Thomas Dinges <blender@dingto.org> | 2015-04-28 00:12:53 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2015-04-28 00:12:53 +0300 |
commit | 58a2b10a65872b2e4a3654a54a83e6f94bf4e229 (patch) | |
tree | 1e6683c31bf415c66e998ac1195d66b53779896e /intern/cycles/kernel | |
parent | a4965249ec035953249abd2bdc47a86c764f4040 (diff) |
Cycles: Initialize portal variable directly, so we can avoid the one NULL check.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/kernel_light.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h index d1b8db2c018..704fb49efc9 100644 --- a/intern/cycles/kernel/kernel_light.h +++ b/intern/cycles/kernel/kernel_light.h @@ -256,8 +256,6 @@ ccl_device float background_portal_pdf(KernelGlobals *kg, bool *is_possible) { float portal_pdf = 0.0f; - if(is_possible) - *is_possible = false; for(int p = 0; p < kernel_data.integrator.num_portals; p++) { if(p == ignore_portal) @@ -437,7 +435,7 @@ ccl_device float background_light_pdf(KernelGlobals *kg, float3 P, float3 direct float portal_sampling_pdf = kernel_data.integrator.portal_pdf; if(portal_sampling_pdf > 0.0f) { - bool is_possible; + bool is_possible = false; float portal_pdf = background_portal_pdf(kg, P, direction, -1, &is_possible); if(portal_pdf == 0.0f) { if(portal_sampling_pdf == 1.0f) { |