Blender V2.61 - r43446
|
#include "node_shader_util.h"
Go to the source code of this file.
Functions | |
static void | node_shader_exec_material (void *data, bNode *node, bNodeStack **in, bNodeStack **out) |
static void | node_shader_init_material (bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) |
static GPUNodeLink * | gpu_get_input_link (GPUNodeStack *in) |
static int | gpu_shader_material (GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) |
void | register_node_type_sh_material (bNodeTreeType *ttype) |
void | register_node_type_sh_material_ext (bNodeTreeType *ttype) |
Variables | |
static bNodeSocketTemplate | sh_node_material_in [] |
static bNodeSocketTemplate | sh_node_material_out [] |
static bNodeSocketTemplate | sh_node_material_ext_in [] |
static bNodeSocketTemplate | sh_node_material_ext_out [] |
Definition in file node_shader_material.c.
static GPUNodeLink* gpu_get_input_link | ( | GPUNodeStack * | in | ) | [static] |
Definition at line 211 of file node_shader_material.c.
References GPU_uniform(), GPUNodeStack::link, and GPUNodeStack::vec.
Referenced by gpu_shader_material().
static int gpu_shader_material | ( | GPUMaterial * | mat, |
bNode * | node, | ||
GPUNodeStack * | in, | ||
GPUNodeStack * | out | ||
) | [static] |
Definition at line 219 of file node_shader_material.c.
References GPUShadeResult::alpha, GPUShadeInput::alpha, GPUShadeInput::amb, GPUShadeResult::combined, bNode::custom1, GPUShadeResult::diff, GPUShadeInput::emit, ListBase::first, gpu_get_input_link(), GPU_link(), GPU_shadeinput_set(), GPU_shaderesult_set(), i, bNode::id, bNode::inputs, link(), GPUNodeStack::link, bNodeSocket::link, MAT_IN_ALPHA, MAT_IN_AMB, MAT_IN_COLOR, MAT_IN_EMIT, MAT_IN_NORMAL, MAT_IN_REFL, MAT_IN_SPEC, MAT_OUT_ALPHA, MAT_OUT_COLOR, MAT_OUT_DIFFUSE, MAT_OUT_NORMAL, MAT_OUT_SPEC, bNodeSocket::next, NULL, NUM_MAT_IN, GPUShadeInput::refl, GPUShadeInput::rgb, SH_NODE_MAT_DIFF, SH_NODE_MAT_NEG, SH_NODE_MAT_SPEC, SH_NODE_MATERIAL_EXT, GPUShadeResult::spec, GPUShadeInput::specrgb, bNode::type, and GPUShadeInput::vn.
Referenced by register_node_type_sh_material(), and register_node_type_sh_material_ext().
static void node_shader_exec_material | ( | void * | data, |
bNode * | node, | ||
bNodeStack ** | in, | ||
bNodeStack ** | out | ||
) | [static] |
Definition at line 79 of file node_shader_material.c.
References ShadeResult::alpha, ShadeInput::alpha, ShadeInput::amb, ShadeResult::ao, ShadeResult::combined, copy_v3_v3(), copy_v4_v4(), bNode::custom1, data, ShadeResult::diff, ShadeInput::do_manage, ShadeInput::do_preview, ShadeInput::emit, ListBase::first, bNode::flag, Material::har, ShadeInput::har, i, bNode::id, bNode::inputs, bNodeSocket::link, ShadeInput::mat, MAT_IN_ALPHA, MAT_IN_AMB, MAT_IN_COLOR, MAT_IN_EMIT, MAT_IN_MIR, MAT_IN_NORMAL, MAT_IN_RAY_MIRROR, MAT_IN_REFL, MAT_IN_SPEC, MAT_IN_SPECTRA, MAT_IN_TRANSLUCENCY, MAT_OUT_ALPHA, MAT_OUT_AO, MAT_OUT_COLOR, MAT_OUT_DIFFUSE, MAT_OUT_NORMAL, MAT_OUT_SPEC, ShadeInput::mirr, negate_v3(), bNodeSocket::next, NODE_ACTIVE_ID, node_shader_lamp_loop, nodeAddToPreview(), ShadeInput::nodes, nodestack_get_vec(), normalize_v3(), NULL, NUM_MAT_IN, Material::r, ShadeInput::r, ShadeInput::ray_mirror, ShadeInput::refl, SH_NODE_MAT_DIFF, SH_NODE_MAT_NEG, SH_NODE_MAT_SPEC, SH_NODE_MATERIAL_EXT, ShaderCallData::shi, ShaderCallData::shr, SOCK_FLOAT, SOCK_VECTOR, ShadeResult::spec, ShadeInput::specr, ShadeInput::spectra, sub_v3_v3(), ShadeInput::translucency, bNode::type, bNodeStack::vec, ShadeInput::vn, ShadeInput::vno, ShadeInput::xs, and ShadeInput::ys.
Referenced by register_node_type_sh_material(), and register_node_type_sh_material_ext().
static void node_shader_init_material | ( | bNodeTree * | UNUSEDntree, |
bNode * | node, | ||
bNodeTemplate * | UNUSEDntemp | ||
) | [static] |
Definition at line 203 of file node_shader_material.c.
References bNode::custom1, SH_NODE_MAT_DIFF, and SH_NODE_MAT_SPEC.
Referenced by register_node_type_sh_material(), and register_node_type_sh_material_ext().
void register_node_type_sh_material | ( | bNodeTreeType * | ttype | ) |
Definition at line 303 of file node_shader_material.c.
References gpu_shader_material(), NODE_CLASS_INPUT, NODE_OLD_SHADING, NODE_OPTIONS, NODE_PREVIEW, node_shader_exec_material(), node_shader_init_material(), node_type_base(), node_type_compatibility(), node_type_exec(), node_type_gpu(), node_type_init(), node_type_size(), node_type_socket_templates(), nodeRegisterType(), and SH_NODE_MATERIAL.
Referenced by registerShaderNodes().
void register_node_type_sh_material_ext | ( | bNodeTreeType * | ttype | ) |
Definition at line 319 of file node_shader_material.c.
References gpu_shader_material(), NODE_CLASS_INPUT, NODE_OLD_SHADING, NODE_OPTIONS, NODE_PREVIEW, node_shader_exec_material(), node_shader_init_material(), node_type_base(), node_type_compatibility(), node_type_exec(), node_type_gpu(), node_type_init(), node_type_size(), node_type_socket_templates(), nodeRegisterType(), and SH_NODE_MATERIAL_EXT.
Referenced by registerShaderNodes().
bNodeSocketTemplate sh_node_material_ext_in[] [static] |
{ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION}, { SOCK_RGBA, 1, "Mirror", 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 1, "Ambient", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, { SOCK_FLOAT, 1, "Emit", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED}, { SOCK_FLOAT, 1, "SpecTra", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, { SOCK_FLOAT, 1, "Ray Mirror", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, { SOCK_FLOAT, 1, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED}, { SOCK_FLOAT, 1, "Translucency", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, { -1, 0, "" } }
Definition at line 54 of file node_shader_material.c.
bNodeSocketTemplate sh_node_material_ext_out[] [static] |
{ { SOCK_RGBA, 0, "Color"}, { SOCK_FLOAT, 0, "Alpha"}, { SOCK_VECTOR, 0, "Normal"}, { SOCK_RGBA, 0, "Diffuse"}, { SOCK_RGBA, 0, "Spec"}, { SOCK_RGBA, 0, "AO"}, { -1, 0, "" } }
Definition at line 69 of file node_shader_material.c.
bNodeSocketTemplate sh_node_material_in[] [static] |
{ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f}, { SOCK_FLOAT, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION}, { -1, 0, "" } }
Definition at line 37 of file node_shader_material.c.
bNodeSocketTemplate sh_node_material_out[] [static] |
{ { SOCK_RGBA, 0, "Color"}, { SOCK_FLOAT, 0, "Alpha"}, { SOCK_VECTOR, 0, "Normal"}, { -1, 0, "" } }
Definition at line 45 of file node_shader_material.c.