|
Blender
V2.59
|
#include "../SHD_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 (bNode *node) |
| 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 (ListBase *lb) |
| void | register_node_type_sh_material_ext (ListBase *lb) |
Variables | |
| static bNodeSocketType | sh_node_material_in [] |
| static bNodeSocketType | sh_node_material_out [] |
| static bNodeSocketType | sh_node_material_ext_in [] |
| static bNodeSocketType | sh_node_material_ext_out [] |
Definition in file SHD_material.c.
| static GPUNodeLink* gpu_get_input_link | ( | GPUNodeStack * | in | ) | [static] |
Definition at line 215 of file SHD_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 223 of file SHD_material.c.
References GPUShadeInput::alpha, GPUShadeResult::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(), bNodeSocket::link, GPUNodeStack::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 81 of file SHD_material.c.
References ShadeResult::alpha, ShadeInput::alpha, ShadeInput::amb, ShadeResult::ao, ShadeResult::combined, copy_v4_v4(), bNode::custom1, 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, 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_VALUE, SOCK_VECTOR, ShadeResult::spec, ShadeInput::specr, ShadeInput::spectra, sub_v3_v3(), ShadeInput::translucency, bNode::type, bNodeStack::vec, VECCOPY, 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 | ( | bNode * | node | ) | [static] |
Definition at line 207 of file SHD_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 | ( | ListBase * | lb | ) |
Definition at line 307 of file SHD_material.c.
References gpu_shader_material(), NODE_CLASS_INPUT, NODE_OPTIONS, NODE_PREVIEW, node_shader_exec_material(), node_shader_init_material(), node_type_base(), node_type_exec(), node_type_gpu(), node_type_init(), node_type_size(), nodeRegisterType(), and SH_NODE_MATERIAL.
Referenced by registerShaderNodes().
| void register_node_type_sh_material_ext | ( | ListBase * | lb | ) |
Definition at line 322 of file SHD_material.c.
References gpu_shader_material(), NODE_CLASS_INPUT, NODE_OPTIONS, NODE_PREVIEW, node_shader_exec_material(), node_shader_init_material(), node_type_base(), node_type_exec(), node_type_gpu(), node_type_init(), node_type_size(), nodeRegisterType(), and SH_NODE_MATERIAL_EXT.
Referenced by registerShaderNodes().
bNodeSocketType sh_node_material_ext_in[] [static] |
{
{ SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
{ SOCK_RGBA, 1, "Mirror", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Ambient", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Emit", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "SpecTra", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Ray Mirror", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Translucency", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
}
Definition at line 56 of file SHD_material.c.
bNodeSocketType sh_node_material_ext_out[] [static] |
{
{ SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
{ SOCK_RGBA, 0, "Diffuse", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "AO", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
}
Definition at line 71 of file SHD_material.c.
bNodeSocketType sh_node_material_in[] [static] |
{
{ SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
{ -1, 0, "" }
}
Definition at line 39 of file SHD_material.c.
bNodeSocketType sh_node_material_out[] [static] |
{
{ SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
{ -1, 0, "" }
}
Definition at line 47 of file SHD_material.c.