diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-10 21:28:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-10 21:28:01 +0400 |
commit | 8fd52b34330354f5a8d285fd0888ffe7e72895b1 (patch) | |
tree | d1142e48eb9c6853c7078c6947c82c16ef78ca2a /intern/cycles/kernel/shaders/node_hair_bsdf.osl | |
parent | 3d4bbd278a426d72f54caef76cbc380a18e6a36a (diff) |
style cleanup
Diffstat (limited to 'intern/cycles/kernel/shaders/node_hair_bsdf.osl')
-rw-r--r-- | intern/cycles/kernel/shaders/node_hair_bsdf.osl | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/intern/cycles/kernel/shaders/node_hair_bsdf.osl b/intern/cycles/kernel/shaders/node_hair_bsdf.osl index d1d7d0fb6a6..54d4cb67c3b 100644 --- a/intern/cycles/kernel/shaders/node_hair_bsdf.osl +++ b/intern/cycles/kernel/shaders/node_hair_bsdf.osl @@ -19,8 +19,8 @@ #include "stdosl.h" shader node_hair_bsdf( - color Color = 0.8, - string component = "Reflection", + color Color = 0.8, + string component = "Reflection", float Offset = 0.0, float RoughnessU = 0.1, float RoughnessV = 1.0, @@ -28,29 +28,30 @@ shader node_hair_bsdf( output closure color BSDF = 0) { float IsStrand; - float roughnessh = clamp(RoughnessU, 0.001,1.0); - float roughnessv = clamp(RoughnessV, 0.001,1.0); + float roughnessh = clamp(RoughnessU, 0.001, 1.0); + float roughnessv = clamp(RoughnessV, 0.001, 1.0); getattribute("geom:is_curve", IsStrand); - if (!IsStrand) { - if (backfacing()) - BSDF = transparent(); - else { - if (component == "Reflection") - BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0); - else - BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0); + if (!IsStrand) { + if (backfacing()) { + BSDF = transparent(); + } + else { + if (component == "Reflection") + BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0); + else + BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0); } } - else { - if (backfacing()) - BSDF = transparent(); - else { - if (component == "Reflection") - BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, dPdu, -Offset); - else - BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, dPdu, -Offset); + else { + if (backfacing()) { + BSDF = transparent(); + } + else { + if (component == "Reflection") + BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, dPdu, -Offset); + else + BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, dPdu, -Offset); } } } - |