您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GPU_stack_link函数代码示例

51自学网 2021-06-01 20:55:05
  C++
这篇教程C++ GPU_stack_link函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GPU_stack_link函数的典型用法代码示例。如果您正苦于以下问题:C++ GPU_stack_link函数的具体用法?C++ GPU_stack_link怎么用?C++ GPU_stack_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GPU_stack_link函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例21: gpu_shader_vect_math

static int gpu_shader_vect_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out){	static const char *names[] = {"vec_math_add", "vec_math_sub",		"vec_math_average", "vec_math_dot", "vec_math_cross",		"vec_math_normalize"};	switch (node->custom1) {		case 0:		case 1:		case 2:		case 3:		case 4:			GPU_stack_link(mat, names[node->custom1], in, out);			break;		case 5:			if (in[0].hasinput || !in[1].hasinput) {				/* use only first item and terminator */				GPUNodeStack tmp_in[2];				memcpy(&tmp_in[0], &in[0], sizeof(GPUNodeStack));				memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack));				GPU_stack_link(mat, names[node->custom1], tmp_in, out);			}			else {				/* use only second item and terminator */				GPUNodeStack tmp_in[2];				memcpy(&tmp_in[0], &in[1], sizeof(GPUNodeStack));				memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack));				GPU_stack_link(mat, names[node->custom1], tmp_in, out);			}			break;		default:			return 0;	}		return 1;}
开发者ID:Andrewson3D,项目名称:blender-for-vray,代码行数:36,


示例22: node_shader_gpu_blackbody

static int node_shader_gpu_blackbody(GPUMaterial *mat,                                     bNode *node,                                     bNodeExecData *UNUSED(execdata),                                     GPUNodeStack *in,                                     GPUNodeStack *out){  const int size = CM_TABLE + 1;  float *data = MEM_mallocN(sizeof(float) * size * 4, "blackbody texture");  blackbody_temperature_to_rgb_table(data, size, 965.0f, 12000.0f);  float layer;  GPUNodeLink *ramp_texture = GPU_color_band(mat, size, data, &layer);  return GPU_stack_link(mat, node, "node_blackbody", in, out, ramp_texture, GPU_constant(&layer));}
开发者ID:dfelinto,项目名称:blender,代码行数:16,



注:本文中的GPU_stack_link函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GP_ASSERT函数代码示例
C++ GPU_Log函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。