forked from blender/blender
MaterialX: code improvements #34
@ -42,7 +42,7 @@ static int gpu_shader_bevel(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: This node doesn't have an implementation in MaterialX.*/
|
||||
/* NOTE: This node isn't supported by MaterialX.*/
|
||||
return get_input_link("Normal", NodeItem::Type::Vector3);
|
||||
}
|
||||
#endif
|
||||
|
@ -319,7 +319,7 @@ NODE_SHADER_MATERIALX_BEGIN
|
||||
{"base_color", get_input_value("Base Color", NodeItem::Type::Color3)},
|
||||
{"subsurface", get_input_value("Subsurface", NodeItem::Type::Float)},
|
||||
{"subsurface_scale", get_input_value("Subsurface Scale", NodeItem::Type::Float)},
|
||||
{"subsurface_radius", get_input_value("Subsurface Radius", NodeItem::Type::Vector3)},
|
||||
{"subsurface_radius", get_input_value("Subsurface Radius", NodeItem::Type::Color3)},
|
||||
//{"subsurface_ior", get_input_value("Subsurface IOR", NodeItem::Type::Vector3)},
|
||||
{"subsurface_anisotropy", get_input_value("Subsurface Anisotropy", NodeItem::Type::Float)},
|
||||
{"metallic", get_input_value("Metallic", NodeItem::Type::Float)},
|
||||
|
@ -61,7 +61,7 @@ static int node_shader_gpu_geometry(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: Some outputs don't have an implementation in MaterialX.*/
|
||||
/* NOTE: Some outputs aren't supported by MaterialX.*/
|
||||
NodeItem res = empty();
|
||||
std::string name = socket_out_->name;
|
||||
|
||||
|
@ -35,7 +35,7 @@ static int node_shader_gpu_light_path(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* This node isn't supported by MaterialX. Only default values returned. */
|
||||
/* NOTE: This node isn't supported by MaterialX. Only default values returned. */
|
||||
if (STREQ(socket_out_->name, "Is Camera Ray")) {
|
||||
return val(1.0f);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ static int node_shader_gpu_object_info(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: Some outputs don't have an implementation in MaterialX.*/
|
||||
/* NOTE: Some outputs isn't supported by MaterialX.*/
|
||||
NodeItem res = empty();
|
||||
std::string name = socket_out_->name;
|
||||
|
||||
|
@ -37,7 +37,7 @@ static int gpu_shader_particle_info(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: This node doesn't have an implementation in MaterialX.*/
|
||||
/* NOTE: This node isn't supported by MaterialX.*/
|
||||
return get_output_default(socket_out_->name, NodeItem::Type::Any);
|
||||
}
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@ static int node_shader_gpu_point_info(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: This node doesn't have an implementation in MaterialX.*/
|
||||
/* NOTE: This node isn't supported by MaterialX.*/
|
||||
return get_output_default(socket_out_->name, NodeItem::Type::Any);
|
||||
}
|
||||
#endif
|
||||
|
@ -74,7 +74,7 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: Some outputs don't have an implementation in MaterialX.*/
|
||||
/* NOTE: Some outputs aren't supported by MaterialX.*/
|
||||
NodeItem res = empty();
|
||||
std::string name = socket_out_->name;
|
||||
|
||||
|
@ -260,6 +260,7 @@ static void sh_node_noise_build_multi_function(NodeMultiFunctionBuilder &builder
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: Some inputs aren't supported by MaterialX.*/
|
||||
NodeItem scale = get_input_value("Scale", NodeItem::Type::Float);
|
||||
NodeItem detail = get_input_default("Detail", NodeItem::Type::Float);
|
||||
NodeItem lacunarity = get_input_value("Lacunarity", NodeItem::Type::Float);
|
||||
|
@ -43,7 +43,7 @@ static int node_shader_gpu_wireframe(GPUMaterial *mat,
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* NOTE: This node doesn't have an implementation in MaterialX.*/
|
||||
/* NOTE: This node isn't supported by MaterialX.*/
|
||||
return get_output_default(socket_out_->name, NodeItem::Type::Float);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user