diff options
author | Charlie Jolly <charlie> | 2021-06-04 18:53:50 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2021-06-04 18:59:28 +0300 |
commit | 00073651d420c852b271127fe453d2170471321a (patch) | |
tree | 7f4f63f70afc269f29dca3809513825c4e4bd66f /intern/cycles/kernel/shaders | |
parent | eb030204f198fe1b933380c63bd40f3dba58c105 (diff) |
Nodes: Add Multiply Add to Vector Math nodes
Cycles, Eevee, OSL, Geo, Attribute
This operator provides consistency with the standard math node. Allows users to use a single node instead of two nodes for this common operation.
Reviewed By: HooglyBoogly, brecht
Differential Revision: https://developer.blender.org/D10808
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r-- | intern/cycles/kernel/shaders/node_vector_math.osl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/kernel/shaders/node_vector_math.osl b/intern/cycles/kernel/shaders/node_vector_math.osl index 3963c23ea9c..c08d75b99ef 100644 --- a/intern/cycles/kernel/shaders/node_vector_math.osl +++ b/intern/cycles/kernel/shaders/node_vector_math.osl @@ -52,6 +52,9 @@ shader node_vector_math(string math_type = "add", else if (math_type == "faceforward") { Vector = compatible_faceforward(Vector1, Vector2, Vector3); } + else if (math_type == "multiply_add") { + Vector = Vector1 * Vector2 + Vector3; + } else if (math_type == "dot_product") { Value = dot(Vector1, Vector2); } |