forked from blender/blender
MaterialX: Implement export of Input nodes #20
@ -71,6 +71,27 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat,
|
||||
return 1;
|
||||
}
|
||||
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
{
|
||||
/* TODO: Partially implemented, some nodes don't have an implementation in MaterialX 1.38.6.
|
||||
* some outputs expected be implemented within the next iteration*/
|
||||
BogdanNagirniak marked this conversation as resolved
Outdated
|
||||
|
||||
CLG_LogRef *LOG_MATERIALX_SHADER = materialx::LOG_MATERIALX_SHADER;
|
||||
|
||||
NodeItem res = val(MaterialX::Vector2(1.0f, 1.0f));
|
||||
const char *output_name = socket_out_->name;
|
||||
|
||||
if (STREQ(output_name, "UV")) {
|
||||
res = texcoord_node();
|
||||
}
|
||||
else {
|
||||
CLOG_WARN(LOG_MATERIALX_SHADER, "Unimplemented output %s", output_name);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
NODE_SHADER_MATERIALX_END
|
||||
|
||||
} // namespace blender::nodes::node_shader_tex_coord_cc
|
||||
|
||||
/* node type definition */
|
||||
@ -84,6 +105,7 @@ void register_node_type_sh_tex_coord()
|
||||
ntype.declare = file_ns::node_declare;
|
||||
ntype.draw_buttons = file_ns::node_shader_buts_tex_coord;
|
||||
ntype.gpu_fn = file_ns::node_shader_gpu_tex_coord;
|
||||
ntype.materialx_fn = file_ns::node_shader_materialx;
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
This node I think has to be implemented in this PR