diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-25 00:30:43 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-25 00:33:49 +0300 |
commit | 87cff57207ca05602794e5dd1d7f08cd7818fbb6 (patch) | |
tree | f4542ede2f23936609ae25119f238e2b7e5764aa /intern/cycles/kernel/svm/svm_closure.h | |
parent | 41ed59e0ebe23d99f3cc394d03ff629417e6115a (diff) |
Fix T44123: Cycles SSS renders black in recent builds
Issue was introduced in 01ee21f where i didn't notice *_setup()
function only doing partial initialization, and some of parameters
are expected to be initialized by callee function.
This was hitting only some setups, so tests with benchmark scenes
didn't unleash issues. Now it should all be fine.
This is to go to the 2.74 branch and we actually might re-AHOY.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_closure.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_closure.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index 07ac7104e68..db9f442083e 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -27,8 +27,11 @@ ccl_device void svm_node_glass_setup(ShaderData *sd, ShaderClosure *sc, int type sc->data2 = 0.0f; sd->flag |= bsdf_refraction_setup(sc); } - else + else { + sc->data0 = 0.0f; + sc->data1 = 0.0f; sd->flag |= bsdf_reflection_setup(sc); + } } else if(type == CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID) { sc->data0 = roughness; @@ -384,6 +387,8 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * * spawned by transmission from the front */ sc->weight = make_float3(1.0f, 1.0f, 1.0f); sc->N = N; + sc->data0 = 0.0f; + sc->data1 = 0.0f; sd->flag |= bsdf_transparent_setup(sc); } } @@ -529,6 +534,7 @@ ccl_device void svm_node_closure_volume(KernelGlobals *kg, ShaderData *sd, float if(sc) { sc->data0 = param2; /* g */ + sc->data1 = 0.0f; sd->flag |= volume_henyey_greenstein_setup(sc); } break; |