15 b.add_input<
decl::Float>(
N_(
"Strength")).default_value(1.0f).min(0.0f).max(10.0f);
16 b.add_input<
decl::Color>(
N_(
"Color")).default_value({0.5f, 0.5f, 1.0f, 1.0f});
53 strength = in[0].
link;
55 else if (
node->original) {
67 newnormal = in[1].
link;
69 else if (
node->original) {
78 const char *color_to_normal_fnc_name =
"color_to_normal_new_shading";
80 color_to_normal_fnc_name =
"color_to_blender_normal_new_shading";
83 GPU_link(mat, color_to_normal_fnc_name, newnormal, &newnormal);
95 GPU_link(mat,
"normal_transform_object_to_world", newnormal, &newnormal);
103 GPU_link(mat,
"node_normal_map_mix", strength, newnormal, &
out[0].link);
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size)
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
#define NODE_CLASS_OP_VECTOR
void nodeRegisterType(struct bNodeType *ntype)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define SHD_SPACE_TANGENT
#define SHD_SPACE_BLENDER_OBJECT
#define SHD_SPACE_BLENDER_WORLD
GPUNodeLink * GPU_attribute(GPUMaterial *mat, eCustomDataType type, const char *name)
GPUNodeLink * GPU_constant(const float *num)
@ GPU_MATFLAG_OBJECT_INFO
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
GPUNodeLink * GPU_uniform(const float *num)
bool GPU_link(GPUMaterial *mat, const char *name,...)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value SH_NODE_NORMAL_MAP
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
static void node_shader_buts_normal_map(uiLayout *layout, bContext *C, PointerRNA *ptr)
static int gpu_shader_normal_map(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
static void node_shader_init_normal_map(bNodeTree *UNUSED(ntree), bNode *node)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_sh_normal_map()
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
struct GPUNodeLink * link
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
NodeDeclareFunction declare