diff options
author | Karsten Schwenk <macnihilist@gmx.net> | 2014-06-08 14:16:28 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-06-14 15:49:57 +0400 |
commit | 8ce1090d4e8160165281be4b0827dbc1ba28dc8a (patch) | |
tree | e65ed8a8bcebab84c50da6a286fa845c6a8ae92e /intern/cycles/kernel/svm/svm_closure.h | |
parent | f5cb0cf1a50350e32b6fec5056f23a20606c7ea0 (diff) |
Cycles: Ashikhmin-Shirley anisotropic BSDF
* Ashikhmin-Shirley anisotropic BSDF was added as closure
* Anisotropic BSDF node now has two distributions
Reviewers: brecht, dingto
Differential Revision: https://developer.blender.org/D549
Diffstat (limited to 'intern/cycles/kernel/svm/svm_closure.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_closure.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index a7982c64c49..d68b9371061 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -269,7 +269,8 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * break; } - case CLOSURE_BSDF_WARD_ID: { + case CLOSURE_BSDF_WARD_ID: + case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID: { #ifdef __CAUSTICS_TRICKS__ if(kernel_data.integrator.no_caustics && (path_flag & PATH_RAY_DIFFUSE)) break; @@ -301,7 +302,11 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * sc->data1 = roughness/(1.0f - anisotropy); } - sd->flag |= bsdf_ward_setup(sc); + if (type == CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID) + sd->flag |= bsdf_ashikhmin_shirley_setup(sc); + else + sd->flag |= bsdf_ward_setup(sc); + #else sd->flag |= bsdf_diffuse_setup(sc); #endif |