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 /source/blender/gpu | |
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 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_vector_math.glsl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_vector_math.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_vector_math.glsl index 60ed098beb3..4ad5d4232de 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_vector_math.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_vector_math.glsl @@ -150,3 +150,9 @@ void vector_math_faceforward( { outVector = faceforward(a, b, c); } + +void vector_math_multiply_add( + vec3 a, vec3 b, vec3 c, float scale, out vec3 outVector, out float outValue) +{ + outVector = a * b + c; +} |