Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions

node_shader_util.h File Reference

#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)

Detailed Description

Definition in file node_shader_util.h.


Define Documentation

#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
#define MAT_IN_AMB   5
#define MAT_IN_COLOR   0
#define MAT_IN_EMIT   6
#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
#define MAT_IN_SPEC   1
#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 Documentation


Function Documentation

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 
)
void node_gpu_stack_from_data ( struct GPUNodeStack gs,
int  type,
struct bNodeStack ns 
)
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 
)
void ntreeExecGPUNodes ( struct bNodeTreeExec exec,
struct GPUMaterial mat,
int  do_outputs 
)