Exemplo n.º 1
0
static int gpu_group_execute(GPUMaterial *mat, bNode *node, bNodeExecData *execdata, GPUNodeStack *in, GPUNodeStack *out)
{
	bNodeTreeExec *exec = execdata->data;
	
	group_gpu_copy_inputs(node, in, exec->stack);
	#if 0	/* XXX NODE_GROUP_EDIT is deprecated, depends on node space */
	ntreeExecGPUNodes(exec, mat, (node->flag & NODE_GROUP_EDIT));
	#else
	ntreeExecGPUNodes(exec, mat, 0);
	#endif
	group_gpu_move_outputs(node, out, exec->stack);
	
	return 1;
}
Exemplo n.º 2
0
static int gpu_group_execute(GPUMaterial *mat, bNode *node, void *nodedata, GPUNodeStack *in, GPUNodeStack *out)
{
	bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
	
	group_gpu_copy_inputs(node, in, exec->stack);
	ntreeExecGPUNodes(exec, mat, (node->flag & NODE_GROUP_EDIT));
	group_gpu_move_outputs(node, out, exec->stack);
	
	return 1;
}
Exemplo n.º 3
0
void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat, short compatibility)
{
	/* localize tree to create links for reroute and mute */
	bNodeTree *localtree = ntreeLocalize(ntree);
	bNodeTreeExec *exec;

	exec = ntreeShaderBeginExecTree(localtree);
	ntreeExecGPUNodes(exec, mat, 1, compatibility);
	ntreeShaderEndExecTree(exec);

	ntreeFreeTree_ex(localtree, false);
	MEM_freeN(localtree);
}
Exemplo n.º 4
0
void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat, short compatibility)
{
	/* localize tree to create links for reroute and mute */
	bNodeTree *localtree = ntreeLocalize(ntree);
	bNodeTreeExec *exec;

	/* Perform all needed modifications on the tree in order to support
	 * displacement/bump mapping.
	 */
	ntree_shader_relink_displacement(localtree, compatibility);

	exec = ntreeShaderBeginExecTree(localtree);
	ntreeExecGPUNodes(exec, mat, 1, compatibility);
	ntreeShaderEndExecTree(exec);

	ntreeFreeTree_ex(localtree, false);
	MEM_freeN(localtree);
}