40 float dummy_matrix[4][4];
41 dummy_matrix[3][3] = 0.0f;
61 "vector_math_normalize",
78 NodeItem res = empty();
79 std::string
name = socket_out_->identifier;
82 res = texcoord_node();
84 else if (
name ==
"Normal") {
85 res = create_node(
"normal", NodeItem::Type::Vector3, {{
"space", val(std::string(
"world"))}});
87 else if (
name ==
"Object") {
89 "position", NodeItem::Type::Vector3, {{
"space", val(std::string(
"object"))}});
92 res = get_output_default(
name, NodeItem::Type::Any);
110 ntype.
ui_name =
"Texture Coordinate";
112 "Retrieve multiple types of texture coordinates.\nTypically used as inputs for texture "
116 ntype.
declare = file_ns::node_declare;
117 ntype.
draw_buttons = file_ns::node_shader_buts_tex_coord;
118 ntype.
gpu_fn = file_ns::node_shader_gpu_tex_coord;
#define SH_NODE_TEX_COORD
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
#define BLT_I18NCONTEXT_ID_TEXTURE
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_attribute(GPUMaterial *mat, eCustomDataType type, const char *name)
bool GPU_link(GPUMaterial *mat, const char *name,...)
GPUNodeLink * GPU_uniform(const float *num)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void node_register_type(bNodeType &ntype)
static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
static void node_shader_buts_tex_coord(uiLayout *layout, bContext *, PointerRNA *ptr)
VecBase< float, 4 > float4
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_tex_coord()
void sh_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_shader_gpu_bump_tex_coord(GPUMaterial *mat, bNode *, GPUNodeLink **link)
NodeMaterialXFunction materialx_fn
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)