diff options
Diffstat (limited to 'intern/cycles/kernel/shaders/node_attribute.osl')
-rw-r--r-- | intern/cycles/kernel/shaders/node_attribute.osl | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/intern/cycles/kernel/shaders/node_attribute.osl b/intern/cycles/kernel/shaders/node_attribute.osl index 67183e9ffe0..336543cc130 100644 --- a/intern/cycles/kernel/shaders/node_attribute.osl +++ b/intern/cycles/kernel/shaders/node_attribute.osl @@ -16,26 +16,24 @@ #include "stdosl.h" -shader node_attribute( - string bump_offset = "center", - string name = "", - output point Vector = point(0.0, 0.0, 0.0), - output color Color = 0.0, - output float Fac = 0.0) +shader node_attribute(string bump_offset = "center", + string name = "", + output point Vector = point(0.0, 0.0, 0.0), + output color Color = 0.0, + output float Fac = 0.0) { - getattribute(name, Color); - Vector = point(Color); - getattribute(name, Fac); + getattribute(name, Color); + Vector = point(Color); + getattribute(name, Fac); - if (bump_offset == "dx") { - Color += Dx(Color); - Vector += Dx(Vector); - Fac += Dx(Fac); - } - else if (bump_offset == "dy") { - Color += Dy(Color); - Vector += Dy(Vector); - Fac += Dy(Fac); - } + if (bump_offset == "dx") { + Color += Dx(Color); + Vector += Dx(Vector); + Fac += Dx(Fac); + } + else if (bump_offset == "dy") { + Color += Dy(Color); + Vector += Dy(Vector); + Fac += Dy(Fac); + } } - |