From 00073651d420c852b271127fe453d2170471321a Mon Sep 17 00:00:00 2001 From: Charlie Jolly Date: Fri, 4 Jun 2021 16:53:50 +0100 Subject: 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 --- .../gpu/shaders/material/gpu_shader_material_vector_math.glsl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/gpu') 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; +} -- cgit v1.2.3