Skip to content

Commit

Permalink
Require MaterialX 1.38.6 as a minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Mar 9, 2024
1 parent 970d122 commit b422d84
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ find_package(pxr CONFIG REQUIRED)

# Find MaterialX library provided by the USD installation.
# Since we use UsdMtlx, using a custom MaterialX version leads to conflicts.
find_package(MaterialX REQUIRED HINTS ${pxr_DIR})
find_package(MaterialX 1.38.6 REQUIRED HINTS ${pxr_DIR})

# We need to open PNG and JPEG files in order to read the number of channels
# for shading node creation. OIIO should be provided by the USD installation.
Expand Down
4 changes: 0 additions & 4 deletions src/libguc/src/materialx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,15 +586,13 @@ namespace guc
}
}

#if MATERIALX_MINOR_VERSION > 38 || (MATERIALX_MINOR_VERSION == 38 && MATERIALX_BUILD_VERSION >= 5)
if (material->has_emissive_strength)
{
const cgltf_emissive_strength* emissiveStrength = &material->emissive_strength;

mx::InputPtr emissiveStrengthInput = shaderNode->addInput("emissive_strength", MTLX_TYPE_FLOAT);
emissiveStrengthInput->setValue(emissiveStrength->emissive_strength);
}
#endif

if (material->has_clearcoat)
{
Expand Down Expand Up @@ -648,7 +646,6 @@ namespace guc
iorInput->setValue(ior->ior);
}

#if MATERIALX_MINOR_VERSION > 38 || (MATERIALX_MINOR_VERSION == 38 && MATERIALX_BUILD_VERSION >= 6)
if (material->has_iridescence)
{
const cgltf_iridescence* iridescence = &material->iridescence;
Expand All @@ -663,7 +660,6 @@ namespace guc
mx::InputPtr iridescenceThicknessInput = shaderNode->addInput("iridescence_thickness", MTLX_TYPE_FLOAT);
setIridescenceThicknessInput(nodeGraph, iridescenceThicknessInput, iridescence);
}
#endif

if (material->has_specular)
{
Expand Down

0 comments on commit b422d84

Please sign in to comment.