Implement BSDF Transparent shader #36

Merged
Bogdan Nagirniak merged 5 commits from BogdanNagirniak/blender:matx-transparent-shader into matx-export-material 2023-09-26 16:16:26 +02:00
Showing only changes of commit b5e4a4bbad - Show all commits

View File

@ -33,10 +33,12 @@ NODE_SHADER_MATERIALX_BEGIN
switch (to_type_) {
case NodeItem::Type::BSDF: {
NodeItem color = get_input_value("Color", NodeItem::Type::Color3);
/* Returning diffuse node as BSDF component */
return create_node("oren_nayar_diffuse_bsdf", NodeItem::Type::BSDF, {{"color", color}});
}
case NodeItem::Type::SurfaceOpacity: {
NodeItem color = get_input_value("Color", NodeItem::Type::Color3);
/* Returning: 1 - <average of color components> */
return val(1.0f) - color.dotproduct(val(1.0f / 3.0f));
}
default: