本文整理汇总了C++中GPU_stack_link函数的典型用法代码示例。如果您正苦于以下问题:C++ GPU_stack_link函数的具体用法?C++ GPU_stack_link怎么用?C++ GPU_stack_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GPU_stack_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:dfelinto,项目名称:blender,代码行数:8,代码来源:node_shader_sepcombRGB.c
示例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));
}
开发者ID:BHCLL,项目名称:blendocv,代码行数:8,代码来源:node_shader_curves.c
示例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);
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:8,代码来源:node_shader_rgb.c
示例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));
}
开发者ID:244xiao,项目名称:blender,代码行数:8,代码来源:node_shader_valToRgb.c
示例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);
}
开发者ID:DarkDefender,项目名称:blender-npr-tess2,代码行数:9,代码来源:node_shader_subsurface_scattering.c
示例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);
}
开发者ID:Andrewson3D,项目名称:blender-for-vray,代码行数:9,代码来源:node_shader_tex_voronoi.c
示例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);
}
开发者ID:244xiao,项目名称:blender,代码行数:9,代码来源:node_shader_tex_coord.c
示例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;
}
开发者ID:DarkDefender,项目名称:blender-npr-tess2,代码行数:9,代码来源:node_shader_output_world.c
示例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));
}
开发者ID:flair2005,项目名称:mechanical-blender,代码行数:9,代码来源:node_shader_particle_info.c
示例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);
}
}
开发者ID:Andrewson3D,项目名称:blender-for-vray,代码行数:19,代码来源:node_shader_tex_coord.c
示例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));
}
开发者ID:lukastoenne,项目名称:blender,代码行数:10,代码来源:node_shader_layer_weight.c
示例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);
}
开发者ID:DarkDefender,项目名称:blender-npr-tess2,代码行数:11,代码来源:node_shader_tex_checker.c
示例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));
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:12,代码来源:node_shader_tex_magic.c
示例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;
}
开发者ID:mik0001,项目名称:Blender,代码行数:12,代码来源:node_shader_output.c
示例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));
}
开发者ID:DarkDefender,项目名称:blender-npr-tess2,代码行数:13,代码来源:node_shader_tex_gradient.c
示例16: gpu_shader_math
static int gpu_shader_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
{
static const char *names[] = {"math_add", "math_subtract", "math_multiply",
"math_divide", "math_sine", "math_cosine", "math_tangent", "math_asin",
"math_acos", "math_atan", "math_pow", "math_log", "math_min", "math_max",
"math_round", "math_less_than", "math_greater_than"};
switch (node->custom1) {
case 0:
case 1:
case 2:
case 3:
case 10:
case 11:
case 12:
case 13:
case 15:
case 16:
GPU_stack_link(mat, names[node->custom1], NULL, out,
GPU_socket(&in[0]), GPU_socket(&in[1]));
break;
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 14:
if(in[0].hasinput || !in[1].hasinput)
GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[0]));
else
GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[1]));
break;
default:
return 0;
}
return 1;
}
开发者ID:mik0001,项目名称:Blender,代码行数:39,代码来源:node_shader_math.c
示例17: node_shader_gpu_ambient_occlusion
static int node_shader_gpu_ambient_occlusion(GPUMaterial *mat,
bNode *node,
bNodeExecData *UNUSED(execdata),
GPUNodeStack *in,
GPUNodeStack *out)
{
if (!in[2].link) {
GPU_link(mat, "world_normals_get", &in[2].link);
}
GPU_material_flag_set(mat, GPU_MATFLAG_DIFFUSE);
return GPU_stack_link(mat, node, "node_ambient_occlusion", in, out);
}
开发者ID:dfelinto,项目名称:blender,代码行数:14,代码来源:node_shader_ambient_occlusion.c
示例18: node_shader_gpu_bsdf_glass
static int node_shader_gpu_bsdf_glass(GPUMaterial *mat,
bNode *node,
bNodeExecData *UNUSED(execdata),
GPUNodeStack *in,
GPUNodeStack *out)
{
if (!in[3].link) {
GPU_link(mat, "world_normals_get", &in[3].link);
}
GPU_material_flag_set(mat, GPU_MATFLAG_GLOSSY | GPU_MATFLAG_REFRACT);
return GPU_stack_link(mat, node, "node_bsdf_glass", in, out, GPU_constant(&node->ssr_id));
}
开发者ID:dfelinto,项目名称:blender,代码行数:14,代码来源:node_shader_bsdf_glass.c
示例19: node_shader_gpu_tex_environment
static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
Image *ima = (Image *)node->id;
ImageUser *iuser = NULL;
NodeTexImage *tex = node->storage;
int isdata = tex->color_space == SHD_COLORSPACE_NONE;
if (!ima)
return GPU_stack_link(mat, "node_tex_environment_empty", in, out);
if (!in[0].link) {
GPUMatType type = GPU_Material_get_type(mat);
if (type == GPU_MATERIAL_TYPE_MESH)
in[0].link = GPU_builtin(GPU_VIEW_POSITION);
else
GPU_link(mat, "background_transform_to_world", GPU_builtin(GPU_VIEW_POSITION), &in[0].link);
}
node_shader_gpu_tex_mapping(mat, node, in, out);
if (tex->projection == SHD_PROJ_EQUIRECTANGULAR)
GPU_stack_link(mat, "node_tex_environment_equirectangular", in, out, GPU_image(ima, iuser, isdata));
else
GPU_stack_link(mat, "node_tex_environment_mirror_ball", in, out, GPU_image(ima, iuser, isdata));
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
GPU_material_do_color_management(mat))
{
GPU_link(mat, "srgb_to_linearrgb", out[0].link, &out[0].link);
}
BKE_image_release_ibuf(ima, ibuf, NULL);
return true;
}
开发者ID:mgschwan,项目名称:blensor,代码行数:36,代码来源:node_shader_tex_environment.c
示例20: node_shader_gpu_tex_noise
static int node_shader_gpu_tex_noise(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_texco", GPU_builtin(GPU_VIEW_POSITION), in[0].link, &in[0].link);
}
node_shader_gpu_tex_mapping(mat, node, in, out);
return GPU_stack_link(mat, node, "node_tex_noise", in, out);
}
开发者ID:dfelinto,项目名称:blender,代码行数:15,代码来源:node_shader_tex_noise.c
注:本文中的GPU_stack_link函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论