![]() |
Blender V2.61 - r43446
|
#include <math.h>#include <float.h>#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_color_types.h"#include "DNA_customdata_types.h"#include "DNA_ID.h"#include "DNA_image_types.h"#include "DNA_material_types.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_texture_types.h"#include "BKE_blender.h"#include "BKE_colortools.h"#include "BKE_global.h"#include "BKE_image.h"#include "BKE_main.h"#include "BKE_material.h"#include "BKE_node.h"#include "BKE_texture.h"#include "BKE_library.h"#include "NOD_shader.h"#include "node_util.h"#include "BLI_math.h"#include "BLI_blenlib.h"#include "BLI_rand.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "IMB_imbuf_types.h"#include "IMB_imbuf.h"#include "RE_pipeline.h"#include "RE_shader_ext.h"#include "GPU_material.h"Go to the source code of this file.
Classes | |
| struct | ShaderCallData |
Defines | |
| #define | GEOM_OUT_GLOB 0 |
| #define | GEOM_OUT_LOCAL 1 |
| #define | GEOM_OUT_VIEW 2 |
| #define | GEOM_OUT_ORCO 3 |
| #define | GEOM_OUT_UV 4 |
| #define | GEOM_OUT_NORMAL 5 |
| #define | GEOM_OUT_VCOL 6 |
| #define | GEOM_OUT_VCOL_ALPHA 7 |
| #define | GEOM_OUT_FRONTBACK 8 |
| #define | MAT_IN_COLOR 0 |
| #define | MAT_IN_SPEC 1 |
| #define | MAT_IN_REFL 2 |
| #define | MAT_IN_NORMAL 3 |
| #define | MAT_IN_MIR 4 |
| #define | MAT_IN_AMB 5 |
| #define | MAT_IN_EMIT 6 |
| #define | MAT_IN_SPECTRA 7 |
| #define | MAT_IN_RAY_MIRROR 8 |
| #define | MAT_IN_ALPHA 9 |
| #define | MAT_IN_TRANSLUCENCY 10 |
| #define | NUM_MAT_IN 11 |
| #define | MAT_OUT_COLOR 0 |
| #define | MAT_OUT_ALPHA 1 |
| #define | MAT_OUT_NORMAL 2 |
| #define | MAT_OUT_DIFFUSE 3 |
| #define | MAT_OUT_SPEC 4 |
| #define | MAT_OUT_AO 5 |
Typedefs | |
| typedef struct ShaderCallData | ShaderCallData |
Functions | |
| void | node_ID_title_cb (void *node_v, void *unused_v) |
| void | nodestack_get_vec (float *in, short type_in, bNodeStack *ns) |
| void | node_gpu_stack_from_data (struct GPUNodeStack *gs, int type, struct bNodeStack *ns) |
| void | node_data_from_gpu_stack (struct bNodeStack *ns, struct GPUNodeStack *gs) |
| void | node_shader_gpu_tex_mapping (struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out) |
| void | ntreeExecGPUNodes (struct bNodeTreeExec *exec, struct GPUMaterial *mat, int do_outputs) |
| void | node_shader_pass_on (void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) |
| int | gpu_shader_pass_on (struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out) |
Definition in file node_shader_util.h.
| #define GEOM_OUT_FRONTBACK 8 |
Definition at line 96 of file node_shader_util.h.
Referenced by node_shader_exec_geom().
| #define GEOM_OUT_GLOB 0 |
Definition at line 88 of file node_shader_util.h.
Referenced by node_shader_exec_geom(), and ntreeShaderGetTexcoMode().
| #define GEOM_OUT_LOCAL 1 |
Definition at line 89 of file node_shader_util.h.
Referenced by node_shader_exec_geom().
| #define GEOM_OUT_NORMAL 5 |
Definition at line 93 of file node_shader_util.h.
Referenced by node_shader_exec_geom(), and ntreeShaderGetTexcoMode().
| #define GEOM_OUT_ORCO 3 |
Definition at line 91 of file node_shader_util.h.
Referenced by node_shader_exec_geom(), and ntreeShaderGetTexcoMode().
| #define GEOM_OUT_UV 4 |
Definition at line 92 of file node_shader_util.h.
Referenced by node_shader_exec_geom(), and ntreeShaderGetTexcoMode().
| #define GEOM_OUT_VCOL 6 |
Definition at line 94 of file node_shader_util.h.
Referenced by node_shader_exec_geom(), and ntreeShaderGetTexcoMode().
| #define GEOM_OUT_VCOL_ALPHA 7 |
Definition at line 95 of file node_shader_util.h.
Referenced by node_shader_exec_geom(), and ntreeShaderGetTexcoMode().
| #define GEOM_OUT_VIEW 2 |
Definition at line 90 of file node_shader_util.h.
Referenced by node_shader_exec_geom(), and ntreeShaderGetTexcoMode().
| #define MAT_IN_ALPHA 9 |
Definition at line 109 of file node_shader_util.h.
Referenced by gpu_shader_material(), node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_AMB 5 |
Definition at line 105 of file node_shader_util.h.
Referenced by gpu_shader_material(), node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_COLOR 0 |
Definition at line 100 of file node_shader_util.h.
Referenced by gpu_shader_material(), node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_EMIT 6 |
Definition at line 106 of file node_shader_util.h.
Referenced by gpu_shader_material(), node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_MIR 4 |
Definition at line 104 of file node_shader_util.h.
Referenced by node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_NORMAL 3 |
Definition at line 103 of file node_shader_util.h.
Referenced by gpu_shader_material(), and node_shader_exec_material().
| #define MAT_IN_RAY_MIRROR 8 |
Definition at line 108 of file node_shader_util.h.
Referenced by node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_REFL 2 |
Definition at line 102 of file node_shader_util.h.
Referenced by gpu_shader_material(), node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_SPEC 1 |
Definition at line 101 of file node_shader_util.h.
Referenced by gpu_shader_material(), node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_SPECTRA 7 |
Definition at line 107 of file node_shader_util.h.
Referenced by node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_IN_TRANSLUCENCY 10 |
Definition at line 110 of file node_shader_util.h.
Referenced by node_shader_exec_material(), and nodeShaderSynchronizeID().
| #define MAT_OUT_ALPHA 1 |
Definition at line 115 of file node_shader_util.h.
Referenced by gpu_shader_material(), and node_shader_exec_material().
| #define MAT_OUT_AO 5 |
Definition at line 119 of file node_shader_util.h.
Referenced by node_shader_exec_material().
| #define MAT_OUT_COLOR 0 |
Definition at line 114 of file node_shader_util.h.
Referenced by gpu_shader_material(), and node_shader_exec_material().
| #define MAT_OUT_DIFFUSE 3 |
Definition at line 117 of file node_shader_util.h.
Referenced by gpu_shader_material(), and node_shader_exec_material().
| #define MAT_OUT_NORMAL 2 |
Definition at line 116 of file node_shader_util.h.
Referenced by gpu_shader_material(), and node_shader_exec_material().
| #define MAT_OUT_SPEC 4 |
Definition at line 118 of file node_shader_util.h.
Referenced by gpu_shader_material(), and node_shader_exec_material().
| #define NUM_MAT_IN 11 |
Definition at line 111 of file node_shader_util.h.
Referenced by gpu_shader_material(), and node_shader_exec_material().
| typedef struct ShaderCallData ShaderCallData |
| int gpu_shader_pass_on | ( | struct GPUMaterial * | mat, |
| struct bNode * | node, | ||
| void * | nodedata, | ||
| struct GPUNodeStack * | in, | ||
| struct GPUNodeStack * | out | ||
| ) |
| void node_data_from_gpu_stack | ( | struct bNodeStack * | ns, |
| struct GPUNodeStack * | gs | ||
| ) |
Definition at line 271 of file node_shader_util.c.
References bNodeStack::data, GPUNodeStack::link, GPUNodeStack::sockettype, and bNodeStack::sockettype.
Referenced by data_from_gpu_stack_list(), and group_gpu_copy_inputs().
| void node_gpu_stack_from_data | ( | struct GPUNodeStack * | gs, |
| int | type, | ||
| struct bNodeStack * | ns | ||
| ) |
Definition at line 243 of file node_shader_util.c.
References copy_v4_v4(), bNodeStack::data, GPU_FLOAT, GPU_NONE, GPU_VEC3, GPU_VEC4, GPUNodeStack::hasinput, bNodeStack::hasinput, GPUNodeStack::hasoutput, bNodeStack::hasoutput, GPUNodeStack::link, GPUNodeStack::name, SOCK_FLOAT, SOCK_RGBA, SOCK_SHADER, SOCK_VECTOR, GPUNodeStack::sockettype, bNodeStack::sockettype, GPUNodeStack::type, GPUNodeStack::vec, and bNodeStack::vec.
Referenced by gpu_stack_from_data_list(), and group_gpu_move_outputs().
| void node_ID_title_cb | ( | void * | node_v, |
| void * | unused_v | ||
| ) |
| void node_shader_gpu_tex_mapping | ( | struct GPUMaterial * | mat, |
| struct bNode * | node, | ||
| struct GPUNodeStack * | in, | ||
| struct GPUNodeStack * | out | ||
| ) |
| void node_shader_pass_on | ( | void * | data, |
| int | thread, | ||
| struct bNode * | node, | ||
| void * | nodedata, | ||
| struct bNodeStack ** | in, | ||
| struct bNodeStack ** | out | ||
| ) |
| void nodestack_get_vec | ( | float * | in, |
| short | type_in, | ||
| bNodeStack * | ns | ||
| ) |
Definition at line 41 of file node_shader_util.c.
References copy_v3_v3(), copy_v4_v4(), SOCK_FLOAT, SOCK_RGBA, SOCK_VECTOR, bNodeStack::sockettype, and bNodeStack::vec.
Referenced by node_shader_exec_curve_rgb(), node_shader_exec_curve_vec(), node_shader_exec_mapping(), node_shader_exec_material(), node_shader_exec_mix_rgb(), node_shader_exec_normal(), node_shader_exec_output(), node_shader_exec_squeeze(), node_shader_exec_texture(), node_shader_exec_valtorgb(), and node_shader_exec_vect_math().
| void ntreeExecGPUNodes | ( | struct bNodeTreeExec * | exec, |
| struct GPUMaterial * | mat, | ||
| int | do_outputs | ||
| ) |
Definition at line 320 of file node_shader_util.c.
References bNodeExec::data, data_from_gpu_stack_list(), bNode::flag, gpu_stack_from_data_list(), bNodeType::gpuextfunc, bNodeType::gpufunc, bNodeType::gpumutefunc, bNode::inputs, MAX_SOCKET, bNodeType::nclass, bNodeExec::node, NODE_CLASS_OUTPUT, NODE_DO_OUTPUT, node_get_stack(), NODE_MUTED, bNodeTreeExec::nodeexec, bNode::outputs, bNodeTreeExec::stack, stack, and bNode::typeinfo.
Referenced by gpu_group_execute(), and ntreeGPUMaterialNodes().