forked from blender/blender
MaterialX: code improvements #34
@ -319,7 +319,7 @@ NODE_SHADER_MATERIALX_BEGIN
|
|||||||
{"base_color", get_input_value("Base Color", NodeItem::Type::Color3)},
|
{"base_color", get_input_value("Base Color", NodeItem::Type::Color3)},
|
||||||
{"subsurface", get_input_value("Subsurface", NodeItem::Type::Float)},
|
{"subsurface", get_input_value("Subsurface", NodeItem::Type::Float)},
|
||||||
{"subsurface_scale", get_input_value("Subsurface Scale", NodeItem::Type::Float)},
|
{"subsurface_scale", get_input_value("Subsurface Scale", NodeItem::Type::Float)},
|
||||||
{"subsurface_radius", get_input_value("Subsurface Radius", NodeItem::Type::Color3)},
|
{"subsurface_radius", get_input_value("Subsurface Radius", NodeItem::Type::Vector3)},
|
||||||
//{"subsurface_ior", get_input_value("Subsurface IOR", NodeItem::Type::Vector3)},
|
//{"subsurface_ior", get_input_value("Subsurface IOR", NodeItem::Type::Vector3)},
|
||||||
{"subsurface_anisotropy", get_input_value("Subsurface Anisotropy", NodeItem::Type::Float)},
|
{"subsurface_anisotropy", get_input_value("Subsurface Anisotropy", NodeItem::Type::Float)},
|
||||||
{"metallic", get_input_value("Metallic", NodeItem::Type::Float)},
|
{"metallic", get_input_value("Metallic", NodeItem::Type::Float)},
|
||||||
@ -525,7 +525,8 @@ NODE_SHADER_MATERIALX_BEGIN
|
|||||||
NodeItem anisotropic = in["anisotropic"];
|
NodeItem anisotropic = in["anisotropic"];
|
||||||
NodeItem rotation = in["anisotropic_rotation"];
|
NodeItem rotation = in["anisotropic_rotation"];
|
||||||
|
|
||||||
res = create_node("standard_surface",
|
res = create_node(
|
||||||
|
"standard_surface",
|
||||||
NodeItem::Type::SurfaceShader,
|
NodeItem::Type::SurfaceShader,
|
||||||
{{"base", val(1.0f)},
|
{{"base", val(1.0f)},
|
||||||
{"base_color", base_color},
|
{"base_color", base_color},
|
||||||
@ -542,7 +543,8 @@ NODE_SHADER_MATERIALX_BEGIN
|
|||||||
{"transmission_extra_roughness", roughness},
|
{"transmission_extra_roughness", roughness},
|
||||||
{"subsurface", in["subsurface"]},
|
{"subsurface", in["subsurface"]},
|
||||||
{"subsurface_color", base_color},
|
{"subsurface_color", base_color},
|
||||||
{"subsurface_radius", in["subsurface_radius"] * in["subsurface_scale"]},
|
{"subsurface_radius",
|
||||||
|
(in["subsurface_radius"] * in["subsurface_scale"]).convert(NodeItem::Type::Color3)},
|
||||||
{"subsurface_anisotropy", in["subsurface_anisotropy"]},
|
{"subsurface_anisotropy", in["subsurface_anisotropy"]},
|
||||||
{"sheen", in["sheen"]},
|
{"sheen", in["sheen"]},
|
||||||
{"sheen_color", in["sheen_tint"]},
|
{"sheen_color", in["sheen_tint"]},
|
||||||
|
Loading…
Reference in New Issue
Block a user