本文整理汇总了C++中GPU_stack_link函数的典型用法代码示例。如果您正苦于以下问题:C++ GPU_stack_link函数的具体用法?C++ GPU_stack_link怎么用?C++ GPU_stack_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GPU_stack_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gpu_shader_seprgb
static int gpu_shader_seprgb(GPUMaterial *mat,
bNode *node,
bNodeExecData *UNUSED(execdata),
GPUNodeStack *in,
GPUNodeStack *out)
{
return GPU_stack_link(mat, node, "separate_rgb", in, out);
}
示例2: gpu_shader_curve_vec
static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
{
float *array;
int size;
curvemapping_table_RGBA(node->storage, &array, &size);
return GPU_stack_link(mat, "curves_vec", in, out, GPU_texture(size, array));
}
示例3: gpu_shader_rgb
static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
{
bNodeSocket *sock= node->outputs.first;
float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
GPUNodeLink *vec = GPU_uniform(col);
return GPU_stack_link(mat, "set_rgba", in, out, vec);
}
示例4: gpu_shader_valtorgb
static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
float *array;
int size;
colorband_table_RGBA(node->storage, &array, &size);
return GPU_stack_link(mat, "valtorgb", in, out, GPU_texture(size, array));
}
示例5: node_shader_gpu_subsurface_scattering
static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[5].link)
in[5].link = GPU_builtin(GPU_VIEW_NORMAL);
else
GPU_link(mat, "direction_transform_m4v3", in[5].link, GPU_builtin(GPU_VIEW_MATRIX), &in[5].link);
return GPU_stack_link(mat, "node_subsurface_scattering", in, out);
}
示例6: node_shader_gpu_tex_voronoi
static int node_shader_gpu_tex_voronoi(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[0].link)
in[0].link = GPU_attribute(CD_ORCO, "");
node_shader_gpu_tex_mapping(mat, node, in, out);
return GPU_stack_link(mat, "node_tex_voronoi", in, out);
}
示例7: node_shader_gpu_tex_coord
static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
GPUNodeLink *orco = GPU_attribute(CD_ORCO, "");
GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, "");
return GPU_stack_link(mat, "node_tex_coord", in, out,
GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL),
GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX), orco, mtface);
}
示例8: node_shader_gpu_output_world
static int node_shader_gpu_output_world(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
GPUNodeLink *outlink;
GPU_stack_link(mat, "node_output_world", in, out, &outlink);
GPU_material_output_link(mat, outlink);
return true;
}
示例9: gpu_shader_particle_info
static int gpu_shader_particle_info(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
return GPU_stack_link(mat, "particle_info", in, out,
GPU_builtin(GPU_PARTICLE_SCALAR_PROPS),
GPU_builtin(GPU_PARTICLE_LOCATION),
GPU_builtin(GPU_PARTICLE_VELOCITY),
GPU_builtin(GPU_PARTICLE_ANG_VELOCITY));
}
示例10: node_shader_gpu_tex_coord
static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
GPUNodeLink *orco = GPU_attribute(CD_ORCO, "");
GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, "");
GPUMatType type = GPU_Material_get_type(mat);
if (type == GPU_MATERIAL_TYPE_MESH) {
return GPU_stack_link(mat, "node_tex_coord", in, out,
GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL),
GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX),
GPU_builtin(GPU_CAMERA_TEXCO_FACTORS), orco, mtface);
}
else {
return GPU_stack_link(mat, "node_tex_coord_background", in, out,
GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL),
GPU_builtin(GPU_INVERSE_VIEW_MATRIX), GPU_builtin(GPU_INVERSE_OBJECT_MATRIX),
GPU_builtin(GPU_CAMERA_TEXCO_FACTORS), orco, mtface);
}
}
示例11: node_shader_gpu_layer_weight
static int node_shader_gpu_layer_weight(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[1].link)
in[1].link = GPU_builtin(GPU_VIEW_NORMAL);
else if (GPU_material_use_world_space_shading(mat)) {
GPU_link(mat, "direction_transform_m4v3", in[1].link, GPU_builtin(GPU_VIEW_MATRIX), &in[1].link);
}
return GPU_stack_link(mat, "node_layer_weight", in, out, GPU_builtin(GPU_VIEW_POSITION));
}
示例12: node_shader_gpu_tex_checker
static int node_shader_gpu_tex_checker(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[0].link) {
in[0].link = GPU_attribute(CD_ORCO, "");
GPU_link(mat, "generated_from_orco", in[0].link, &in[0].link);
}
node_shader_gpu_tex_mapping(mat, node, in, out);
return GPU_stack_link(mat, "node_tex_checker", in, out);
}
示例13: node_shader_gpu_tex_magic
static int node_shader_gpu_tex_magic(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
{
NodeTexMagic *tex = (NodeTexMagic*)node->storage;
float depth = tex->depth;
if (!in[0].link)
in[0].link = GPU_attribute(CD_ORCO, "");
node_shader_gpu_tex_mapping(mat, node, in, out);
return GPU_stack_link(mat, "node_tex_magic", in, out, GPU_uniform(&depth));
}
示例14: gpu_shader_output
static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
{
GPUNodeLink *outlink;
/*if(in[1].hasinput)
GPU_material_enable_alpha(mat);*/
GPU_stack_link(mat, "output_node", in, out, &outlink);
GPU_material_output_link(mat, outlink);
return 1;
}
示例15: node_shader_gpu_tex_gradient
static int node_shader_gpu_tex_gradient(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[0].link) {
in[0].link = GPU_attribute(CD_ORCO, "");
GPU_link(mat, "generated_from_orco", in[0].link, &in[0].link);
}
node_shader_gpu_tex_mapping(mat, node, in, out);
NodeTexGradient *tex = (NodeTexGradient *)node->storage;
float gradient_type = tex->gradient_type;
return GPU_stack_link(mat, "node_tex_gradient", in, out, GPU_uniform(&gradient_type));
}