Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_particle_info.c
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| }; | }; | ||||
| static void node_shader_exec_particle_info(void *data, int UNUSED(thread), bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), bNodeStack **UNUSED(in), bNodeStack **out) | static void node_shader_exec_particle_info(void *data, int UNUSED(thread), bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), bNodeStack **UNUSED(in), bNodeStack **out) | ||||
| { | { | ||||
| ShadeInput *shi = ((ShaderCallData *)data)->shi; | ShadeInput *shi = ((ShaderCallData *)data)->shi; | ||||
| RE_instance_get_particle_info(shi->obi, out[0]->vec, out[1]->vec, out[2]->vec, out[3]->vec, out[4]->vec, out[5]->vec, out[6]->vec); | RE_instance_get_particle_info(shi->obi, out[0]->vec, out[1]->vec, out[2]->vec, out[3]->vec, out[4]->vec, out[5]->vec, out[6]->vec); | ||||
| } | } | ||||
| static int gpu_shader_particle_info(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int gpu_shader_particle_info(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| return GPU_stack_link(mat, "particle_info", in, out, | return GPU_stack_link(mat, node, "particle_info", in, out, | ||||
| GPU_builtin(GPU_PARTICLE_SCALAR_PROPS), | GPU_builtin(GPU_PARTICLE_SCALAR_PROPS), | ||||
| GPU_builtin(GPU_PARTICLE_LOCATION), | GPU_builtin(GPU_PARTICLE_LOCATION), | ||||
| GPU_builtin(GPU_PARTICLE_VELOCITY), | GPU_builtin(GPU_PARTICLE_VELOCITY), | ||||
| GPU_builtin(GPU_PARTICLE_ANG_VELOCITY)); | GPU_builtin(GPU_PARTICLE_ANG_VELOCITY)); | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_particle_info(void) | void register_node_type_sh_particle_info(void) | ||||
| Show All 12 Lines | |||||