MaterialX: add support for Vector nodes #27

Merged
Bogdan Nagirniak merged 13 commits from Vasyl-Pidhirskyi/blender:BLEN-525 into matx-export-material 2023-09-22 10:03:45 +02:00
3 changed files with 8 additions and 2 deletions
Showing only changes of commit 6ce685899a - Show all commits

View File

@ -72,6 +72,7 @@ static int gpu_shader_bump(GPUMaterial *mat,
}
NODE_SHADER_MATERIALX_BEGIN
#ifdef WITH_MATERIALX
{
NodeItem strength = get_input_value("Strength", NodeItem::Type::Float);
NodeItem distance = get_input_value("Distance", NodeItem::Type::Float);
@ -93,6 +94,7 @@ NODE_SHADER_MATERIALX_BEGIN
return res;
}
#endif
NODE_SHADER_MATERIALX_END
} // namespace blender::nodes::node_shader_bump_cc

View File

@ -38,6 +38,7 @@ static int gpu_shader_displacement(GPUMaterial *mat,
}
NODE_SHADER_MATERIALX_BEGIN
#ifdef WITH_MATERIALX
{
/* NOTE: Normal input and Space feature don't have an implementation in MaterialX.*/
NodeItem midlevel = get_input_value("Midlevel", NodeItem::Type::Float);
@ -50,6 +51,7 @@ NODE_SHADER_MATERIALX_BEGIN
return res;
}
#endif
NODE_SHADER_MATERIALX_END
} // namespace blender::nodes::node_shader_displacement_cc

View File

@ -42,9 +42,10 @@ static int gpu_shader_vector_displacement(GPUMaterial *mat,
}
NODE_SHADER_MATERIALX_BEGIN
#ifdef WITH_MATERIALX
{
/* NOTE: Space feature don't have an implementation in MaterialX.*/
NodeItem midlevel = get_input_value("midlevel", NodeItem::Type::Float);
/* NOTE: Midlevel input and Space feature don't have an implementation in MaterialX.*/
// NodeItem midlevel = get_input_value("midlevel", NodeItem::Type::Float);
NodeItem vector = get_input_link("Vector", NodeItem::Type::Vector3);
NodeItem scale = get_input_value("Scale", NodeItem::Type::Float);
@ -54,6 +55,7 @@ NODE_SHADER_MATERIALX_BEGIN
return res;
}
#endif
NODE_SHADER_MATERIALX_END
} // namespace blender::nodes::node_shader_vector_displacement_cc