Blender V2.61 - r43446
|
#include "node_texture_util.h"
#include "NOD_texture.h"
#include "RE_shader_ext.h"
Go to the source code of this file.
Defines | |
#define | I 2 |
#define | COMMON_INPUTS |
#define | ProcNoInputs(name) |
#define | ProcDef(name) |
#define | TexDef(TEXTYPE, outputs, name, Name) |
#define | C outputs_color_only |
#define | CV outputs_both |
Typedefs | |
typedef void(* | MapFn )(Tex *tex, bNodeStack **in, TexParams *p, short thread) |
Functions | |
static void | do_proc (float *result, TexParams *p, float *col1, float *col2, char is_normal, Tex *tex, short thread) |
static void | texfn (float *result, TexParams *p, bNode *node, bNodeStack **in, char is_normal, MapFn map_inputs, short thread) |
static int | count_outputs (bNode *node) |
static void | voronoi_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (voronoi) | |
ProcNoInputs (blend) | |
static void | magic_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (magic) | |
static void | marble_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (marble) | |
static void | clouds_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (clouds) | |
static void | distnoise_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (distnoise) | |
static void | wood_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (wood) | |
static void | musgrave_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (musgrave) | |
ProcNoInputs (noise) | |
static void | stucci_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread) |
ProcDef (stucci) | |
Variables | |
static bNodeSocketTemplate | outputs_both [] |
static bNodeSocketTemplate | outputs_color_only [] |
static bNodeSocketTemplate | voronoi_inputs [] |
Definition in file node_texture_proc.c.
#define C outputs_color_only |
Definition at line 313 of file node_texture_proc.c.
Referenced by TransformWriter::add_node_transform_ob(), bpy_atexit(), BPy_SetContext(), CTX_create(), ED_render_scene_update(), ewa_eval(), exec_retargetArctoArc(), FHT2D(), LbmFsgrSolver::getLesOmega(), imagewraposa_aniso(), imp2radangle(), initTransform(), load_file(), main(), ArmatureImporter::make_armatures(), TNT::matmult(), md5_process_block(), nearest_point_in_tri_surface(), TNT::operator*(), TNT::operator+(), TNT::operator-(), TNT::operator/(), pyop_as_string(), pyop_call(), pyop_poll(), pyrna_func_call(), pyrna_register_class(), pyrna_struct_getattro(), pyrna_struct_setattro(), pyrna_unregister_class(), TNT::QR_factor(), render_animation(), render_frame(), retargetArctoArc(), rna_property_update(), run_python(), run_python_console(), set_addons(), set_end_frame(), set_engine(), set_extension(), set_image_type(), set_output(), set_scene(), set_skip_frame(), set_start_frame(), transform_modal(), transformApply(), transformEnd(), ui_but_anim_expression_create(), vertex_group_poll_edit(), and WM_event_add_ui_handler().
#define COMMON_INPUTS |
{ SOCK_RGBA, 1, "Color 1", 0.0f, 0.0f, 0.0f, 1.0f }, \ { SOCK_RGBA, 1, "Color 2", 1.0f, 1.0f, 1.0f, 1.0f }
Definition at line 55 of file node_texture_proc.c.
Referenced by ProcDef(), and ProcNoInputs().
#define CV outputs_both |
Definition at line 314 of file node_texture_proc.c.
#define I 2 |
Definition at line 54 of file node_texture_proc.c.
Referenced by AtmospherePixleShader(), BOP_4PointIntersect(), bsdf_microfacet_beckmann_eval_transmit(), bsdf_microfacet_ggx_eval_transmit(), clouds_map_inputs(), distnoise_map_inputs(), fresnel_dielectric(), magic_map_inputs(), marble_map_inputs(), musgrave_map_inputs(), DiagSplit::partition_edge(), shader_setup_from_displace(), shader_setup_from_sample(), stucci_map_inputs(), KX_ObjectActuator::Update(), voronoi_map_inputs(), and wood_map_inputs().
#define ProcDef | ( | name | ) |
static void name##_colorfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \ { \ texfn(result, p, node, in, 0, &name##_map_inputs, thread); \ } \ static void name##_normalfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \ { \ texfn(result, p, node, in, 1, &name##_map_inputs, thread); \ } \ static void name##_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) \ { \ int outs = count_outputs(node); \ if(outs >= 1) tex_output(node, in, out[0], &name##_colorfn, data); \ if(outs >= 2) tex_output(node, in, out[1], &name##_normalfn, data); \ }
Definition at line 123 of file node_texture_proc.c.
#define ProcNoInputs | ( | name | ) |
static void name##_map_inputs(Tex *UNUSED(tex), bNodeStack **UNUSED(in), TexParams *UNUSED(p), short UNUSED(thread)) \ {}
Definition at line 119 of file node_texture_proc.c.
#define TexDef | ( | TEXTYPE, | |
outputs, | |||
name, | |||
Name | |||
) |
void register_node_type_tex_proc_##name(bNodeTreeType *ttype) \ { \ static bNodeType ntype; \ \ node_type_base(ttype, &ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW|NODE_OPTIONS); \ node_type_socket_templates(&ntype, name##_inputs, outputs); \ node_type_size(&ntype, 140, 80, 140); \ node_type_init(&ntype, init); \ node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \ node_type_exec(&ntype, name##_exec); \ \ nodeRegisterType(ttype, &ntype); \ }
Definition at line 298 of file node_texture_proc.c.
typedef void(* MapFn)(Tex *tex, bNodeStack **in, TexParams *p, short thread) |
Definition at line 86 of file node_texture_proc.c.
static void clouds_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 205 of file node_texture_proc.c.
References I, Tex::noisesize, and tex_input_value().
static int count_outputs | ( | bNode * | node | ) | [static] |
Definition at line 107 of file node_texture_proc.c.
References ListBase::first, bNodeSocket::next, and bNode::outputs.
static void distnoise_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 218 of file node_texture_proc.c.
References Tex::dist_amount, I, Tex::noisesize, and tex_input_value().
static void do_proc | ( | float * | result, |
TexParams * | p, | ||
float * | col1, | ||
float * | col2, | ||
char | is_normal, | ||
Tex * | tex, | ||
short | thread | ||
) | [static] |
Definition at line 60 of file node_texture_proc.c.
References TexParams::co, copy_v4_v4(), TexParams::dxt, TexParams::dyt, MA_RAMP_BLEND, TexParams::mtex, multitex_nodes(), TexResult::nor, NULL, TexParams::osatex, ramp_blend(), TexParams::shi, TEX_RGB, TexResult::tin, and TexResult::tr.
Referenced by texfn().
static void magic_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 179 of file node_texture_proc.c.
References I, tex_input_value(), and Tex::turbul.
static void marble_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 192 of file node_texture_proc.c.
References I, Tex::noisesize, tex_input_value(), and Tex::turbul.
static void musgrave_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 250 of file node_texture_proc.c.
References I, Tex::mg_H, Tex::mg_lacunarity, Tex::mg_octaves, Tex::noisesize, Tex::ns_outscale, and tex_input_value().
ProcDef | ( | wood | ) |
Definition at line 237 of file node_texture_proc.c.
References COMMON_INPUTS, PROP_UNSIGNED, and SOCK_FLOAT.
ProcDef | ( | voronoi | ) |
Definition at line 163 of file node_texture_proc.c.
References COMMON_INPUTS.
ProcDef | ( | magic | ) |
Definition at line 183 of file node_texture_proc.c.
References COMMON_INPUTS, PROP_UNSIGNED, and SOCK_FLOAT.
ProcDef | ( | stucci | ) |
Definition at line 280 of file node_texture_proc.c.
References default_tex(), MEM_callocN(), Tex::stype, TEX_BANDNOISE, TEX_NODE_PROC, TEX_WOOD, and Tex::type.
ProcDef | ( | marble | ) |
Definition at line 197 of file node_texture_proc.c.
References COMMON_INPUTS, PROP_UNSIGNED, and SOCK_FLOAT.
ProcDef | ( | musgrave | ) |
Definition at line 258 of file node_texture_proc.c.
References COMMON_INPUTS.
ProcDef | ( | clouds | ) |
Definition at line 209 of file node_texture_proc.c.
References COMMON_INPUTS, PROP_UNSIGNED, and SOCK_FLOAT.
ProcDef | ( | distnoise | ) |
Definition at line 223 of file node_texture_proc.c.
References COMMON_INPUTS, PROP_UNSIGNED, and SOCK_FLOAT.
ProcNoInputs | ( | noise | ) |
Definition at line 265 of file node_texture_proc.c.
References COMMON_INPUTS, PROP_UNSIGNED, and SOCK_FLOAT.
ProcNoInputs | ( | blend | ) |
Definition at line 170 of file node_texture_proc.c.
References COMMON_INPUTS, PROP_UNSIGNED, and SOCK_FLOAT.
static void stucci_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 275 of file node_texture_proc.c.
References I, Tex::noisesize, tex_input_value(), and Tex::turbul.
static void texfn | ( | float * | result, |
TexParams * | p, | ||
bNode * | node, | ||
bNodeStack ** | in, | ||
char | is_normal, | ||
MapFn | map_inputs, | ||
short | thread | ||
) | [static] |
Definition at line 88 of file node_texture_proc.c.
References do_proc(), bNode::storage, and tex_input_rgba().
Referenced by tex_output().
static void voronoi_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 153 of file node_texture_proc.c.
References I, Tex::noisesize, Tex::ns_outscale, tex_input_value(), Tex::vn_w1, Tex::vn_w2, Tex::vn_w3, and Tex::vn_w4.
static void wood_map_inputs | ( | Tex * | tex, |
bNodeStack ** | in, | ||
TexParams * | p, | ||
short | thread | ||
) | [static] |
Definition at line 232 of file node_texture_proc.c.
References I, Tex::noisesize, tex_input_value(), and Tex::turbul.
bNodeSocketTemplate outputs_both[] [static] |
{ { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f }, { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION }, { -1, 0, "" } }
Definition at line 43 of file node_texture_proc.c.
bNodeSocketTemplate outputs_color_only[] [static] |
{ { SOCK_RGBA, 0, "Color" }, { -1, 0, "" } }
Definition at line 48 of file node_texture_proc.c.
bNodeSocketTemplate voronoi_inputs[] [static] |
{ COMMON_INPUTS, { SOCK_FLOAT, 1, "W1", 1.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, { SOCK_FLOAT, 1, "W2", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, { SOCK_FLOAT, 1, "W3", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, { SOCK_FLOAT, 1, "W4", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, { SOCK_FLOAT, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.01f, 10.0f, PROP_UNSIGNED }, { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 4.0f, PROP_UNSIGNED }, { -1, 0, "" } }
Definition at line 141 of file node_texture_proc.c.