Commit: 72ea3f954ce596e90a01dc244ee53d6c0e482374
Author: Omar Emara
Date:   Sun Nov 14 12:49:23 2021 +0200
Branches: viewport-compositor
https://developer.blender.org/rB72ea3f954ce596e90a01dc244ee53d6c0e482374

Viewport Compositor: Port RGB node

This patch ports the RGB node to the viewport compositor.

===================================================================

M       source/blender/nodes/composite/nodes/node_composite_rgb.cc

===================================================================

diff --git a/source/blender/nodes/composite/nodes/node_composite_rgb.cc 
b/source/blender/nodes/composite/nodes/node_composite_rgb.cc
index 332e56e26b1..276a4301286 100644
--- a/source/blender/nodes/composite/nodes/node_composite_rgb.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_rgb.cc
@@ -34,6 +34,16 @@ static void cmp_node_rgb_declare(NodeDeclarationBuilder &b)
 
 }  // namespace blender::nodes
 
+static int node_composite_gpu_rgb(GPUMaterial *mat,
+                                  bNode *node,
+                                  bNodeExecData *UNUSED(execdata),
+                                  GPUNodeStack *in,
+                                  GPUNodeStack *out)
+{
+  GPUNodeLink *link = GPU_uniformbuf_link_out(mat, node, out, 0);
+  return GPU_stack_link(mat, node, "set_rgba", in, out, link);
+}
+
 void register_node_type_cmp_rgb(void)
 {
   static bNodeType ntype;
@@ -41,6 +51,7 @@ void register_node_type_cmp_rgb(void)
   cmp_node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, 0);
   ntype.declare = blender::nodes::cmp_node_rgb_declare;
   node_type_size_preset(&ntype, NODE_SIZE_SMALL);
+  node_type_gpu(&ntype, node_composite_gpu_rgb);
 
   nodeRegisterType(&ntype);
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to