42 float attr_hash = 0.0f;
50 GPU_link(mat,
"node_attribute_color", cd_attr, &cd_attr);
52 else if (
STREQ(attr->
name,
"temperature")) {
53 GPU_link(mat,
"node_attribute_temperature", cd_attr, &cd_attr);
63 reinterpret_cast<uint32_t *
>(&attr_hash));
85 return get_output_default(socket_out_->name, NodeItem::Type::Any);
100 ntype.
declare = file_ns::node_declare;
101 ntype.
draw_buttons = file_ns::node_shader_buts_attribute;
102 ntype.
initfunc = file_ns::node_shader_init_attribute;
105 ntype.
gpu_fn = file_ns::node_shader_gpu_attribute;
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
@ SHD_ATTRIBUTE_VIEW_LAYER
@ SHD_ATTRIBUTE_INSTANCER
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_layer_attribute(GPUMaterial *mat, const char *name)
GPUNodeLink * GPU_uniform_attribute(GPUMaterial *mat, const char *name, bool use_dupli, uint32_t *r_hash)
GPUNodeLink * GPU_attribute(GPUMaterial *mat, eCustomDataType type, const char *name)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
local_group_size(16, 16) .push_constant(Type b
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_register_type(bNodeType *ntype)
static int node_shader_gpu_attribute(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_shader_init_attribute(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_shader_buts_attribute(uiLayout *layout, bContext *, PointerRNA *ptr)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_attribute()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
void node_shader_gpu_bump_tex_coord(GPUMaterial *mat, bNode *, GPUNodeLink **link)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
NodeMaterialXFunction materialx_fn
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare