54 GPU_link(mat,
"node_tex_coord_position", &in[0].link);
62 GPU_link(mat,
"node_tex_environment_equirectangular", in[0].link, &in[0].link);
70 GPU_link(mat,
"node_tex_environment_mirror_ball", in[0].link, &in[0].link);
76 static const char *
names[] = {
77 "node_tex_image_linear",
78 "node_tex_image_cubic",
81 switch (
tex->interpolation) {
97 if (
out[0].hasoutput && ima) {
109 GPU_link(mat,
"color_alpha_premultiply",
out[0].link, &
out[0].link);
void BKE_imageuser_default(struct ImageUser *iuser)
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
#define SH_NODE_TEX_ENVIRONMENT
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_TEXTURE
void nodeRegisterType(struct bNodeType *ntype)
void BKE_texture_mapping_default(struct TexMapping *texmap, int type)
void BKE_texture_colormapping_default(struct ColorMapping *colormap)
@ IMA_ALPHA_CHANNEL_PACKED
#define SHD_PROJ_EQUIRECTANGULAR
#define SHD_INTERP_CLOSEST
#define SHD_INTERP_LINEAR
#define TEXMAP_TYPE_POINT
GPUNodeLink * GPU_image(GPUMaterial *mat, struct Image *ima, struct ImageUser *iuser, eGPUSamplerState sampler_state)
bool GPU_material_flag_get(const GPUMaterial *mat, eGPUMaterialFlag flag)
@ GPU_MATFLAG_LOOKDEV_HACK
bool GPU_link(GPUMaterial *mat, const char *name,...)
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
bool IMB_colormanagement_space_name_is_data(const char *name)
ColorManagedColorspaceSettings colorspace_settings
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
static void node_shader_init_tex_environment(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_tex_environment()
void node_shader_gpu_tex_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *UNUSED(out))
void node_shader_gpu_bump_tex_coord(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeLink **link)
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)
void node_image_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *label, int maxlen)
void(* labelfunc)(const struct bNodeTree *ntree, const struct bNode *node, char *label, int maxlen)
NodeDeclareFunction declare