forked from blender/blender
MaterialX: Implement export of Input nodes #20
@ -67,6 +67,19 @@ static int node_shader_gpu_vertex_color(GPUMaterial *mat,
|
||||
return GPU_stack_link(mat, node, "node_vertex_color", in, out, vertexColorLink);
|
||||
}
|
||||
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
{
|
||||
/* TODO: some output expected be implemented within the next iteration (see nodedef
|
||||
* <geomcolor>)*/
|
||||
NodeItem res = val(MaterialX::Color4(1.0f, 0.0f, 1.0f, 1.0f));
|
||||
BogdanNagirniak marked this conversation as resolved
|
||||
if (STREQ(socket_out_->name, "Alpha")) {
|
||||
res = res.extract(3);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
NODE_SHADER_MATERIALX_END
|
||||
|
||||
} // namespace blender::nodes::node_shader_vertex_color_cc
|
||||
|
||||
void register_node_type_sh_vertex_color()
|
||||
@ -82,6 +95,7 @@ void register_node_type_sh_vertex_color()
|
||||
node_type_storage(
|
||||
&ntype, "NodeShaderVertexColor", node_free_standard_storage, node_copy_standard_storage);
|
||||
ntype.gpu_fn = file_ns::node_shader_gpu_vertex_color;
|
||||
ntype.materialx_fn = file_ns::node_shader_materialx;
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
start from empty()