19 *r_disabled_hint =
TIP_(
"Not a shader node tree");
27 const char **r_disabled_hint)
30 *r_disabled_hint =
TIP_(
"Not a shader or geometry node tree");
95 memset(gs, 0,
sizeof(*gs));
168 switch (sub_activity) {
181 bNode *inactivenode =
nullptr, *activetexnode =
nullptr, *activegroup =
nullptr;
182 bool hasgroup =
false;
189 if (
node->flag & sub_activity) {
190 activetexnode =
node;
219 return activetexnode;
227 if (tnode && ((tnode->
flag & sub_activity) || !inactivenode)) {
260 for (n = 0, nodeexec =
exec->nodeexec; n < exec->totnodes; n++, nodeexec++) {
266 if ((output_node !=
nullptr) && (
node == output_node)) {
275 if (
node->typeinfo->gpu_fn) {
279 if (
node->typeinfo->gpu_fn(mat,
node, &nodeexec->
data, gpuin, gpuout)) {
289 GPU_link(mat,
"differentiate_texco", *link, link);
311 static float max[3] = {FLT_MAX, FLT_MAX, FLT_MAX};
312 static float min[3] = {-FLT_MAX, -FLT_MAX, -FLT_MAX};
313 GPUNodeLink *tmin, *tmax, *tmat0, *tmat1, *tmat2, *tmat3;
322 GPU_link(mat,
"mapping_mat4", in[0].link, tmat0, tmat1, tmat2, tmat3, tmin, tmax, &in[0].link);
325 GPU_link(mat,
"vector_normalize", in[0].link, &in[0].link);
#define NODE_CLASS_OUTPUT
void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
#define NODE_CLASS_TEXTURE
#define SH_NODE_ATTRIBUTE
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v4(float r[4])
#define NODE_ACTIVE_TEXTURE
#define NODE_ACTIVE_PAINT_CANVAS
#define TEXMAP_TYPE_NORMAL
#define TEXMAP_UNIT_MATRIX
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
GPUNodeLink * GPU_attribute(GPUMaterial *mat, eCustomDataType type, const char *name)
GPUNodeLink * GPU_uniform(const float *num)
bool GPU_link(GPUMaterial *mat, const char *name,...)
const float * IMB_colormanagement_get_xyz_to_scene_linear(void)
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 Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block SH_NODE_TEX_IMAGE
void search_link_ops_for_basic_node(GatherLinkSearchOpParams ¶ms)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
color xyz_to_rgb(float x, float y, float z)
void node_get_stack(bNode *node, bNodeStack *stack, bNodeStack **in, bNodeStack **out)
bNode * nodeGetActiveTexture(bNodeTree *ntree)
void node_shader_gpu_tex_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *UNUSED(out))
bool sh_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree, const char **r_disabled_hint)
void node_shader_gpu_default_tex_coord(GPUMaterial *mat, bNode *node, GPUNodeLink **link)
void node_data_from_gpu_stack(bNodeStack *ns, GPUNodeStack *gs)
static bool sh_fn_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree, const char **r_disabled_hint)
void node_shader_gpu_bump_tex_coord(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeLink **link)
static void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
void get_XYZ_to_RGB_for_gpu(XYZ_to_RGB *data)
void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, bNode *output_node)
static void gpu_stack_from_data_list(GPUNodeStack *gs, ListBase *sockets, bNodeStack **ns)
void sh_fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
bool nodeSupportsActiveFlag(const bNode *node, int sub_activity)
bNode * nodeGetActivePaintCanvas(bNodeTree *ntree)
static void data_from_gpu_stack_list(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs)
void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
static bNode * node_get_active(bNodeTree *ntree, int sub_activity)
static void exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
void node_insert_link_default(bNodeTree *ntree, bNode *node, bNodeLink *link)
struct GPUNodeLink * link
bool(* poll)(struct bNodeType *ntype, struct bNodeTree *nodetree, const char **r_disabled_hint)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
void(* insert_link)(struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link)