20 #include "../node_shader_util.h"
25 {
SOCK_VECTOR,
N_(
"Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
PROP_NONE,
SOCK_HIDE_VALUE},
30 {
SOCK_RGBA,
N_(
"Color"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
PROP_NONE,
SOCK_NO_INTERNAL_LINK},
80 GPU_link(mat,
"node_tex_environment_equirectangular", in[0].link, &in[0].link);
88 GPU_link(mat,
"node_tex_environment_mirror_ball", in[0].link, &in[0].link);
94 static const char *
names[] = {
95 "node_tex_image_linear",
96 "node_tex_image_cubic",
99 switch (
tex->interpolation) {
113 GPU_link(mat, gpu_fn, in[0].link,
GPU_image(mat, ima, iuser, sampler), &out[0].link, &outalpha);
115 if (out[0].hasoutput) {
119 GPU_link(mat,
"color_alpha_clear", out[0].link, &out[0].link);
124 GPU_link(mat,
"color_alpha_clear", out[0].link, &out[0].link);
127 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)
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
#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 node_type_label(struct bNodeType *ntype, void(*labelfunc)(struct bNodeTree *ntree, struct bNode *, char *label, int maxlen))
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_builtin(eGPUBuiltin builtin)
GPUNodeLink * GPU_image(GPUMaterial *mat, struct Image *ima, struct ImageUser *iuser, eGPUSamplerState sampler_state)
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
void *(* MEM_callocN)(size_t len, const char *str)
static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
void register_node_type_sh_tex_environment(void)
static void node_shader_init_tex_environment(bNodeTree *UNUSED(ntree), bNode *node)
static bNodeSocketTemplate sh_node_tex_environment_in[]
static bNodeSocketTemplate sh_node_tex_environment_out[]
void node_shader_gpu_tex_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *UNUSED(out))
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
void node_shader_gpu_bump_tex_coord(GPUMaterial *mat, bNode *node, GPUNodeLink **link)
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(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen)
Compact definition of a node socket.