function loadMetallicRoughness(loader, metallicRoughnessInfo, frameState) {
  const {
    baseColorTexture,
    metallicRoughnessTexture,
    baseColorFactor,
    metallicFactor,
    roughnessFactor,
  } = metallicRoughnessInfo;

  const metallicRoughness = new MetallicRoughness();
  if (defined(baseColorTexture)) {
    metallicRoughness.baseColorTexture = loadTexture(
      loader,
      baseColorTexture,
      frameState,
    );
  }
  if (defined(metallicRoughnessTexture)) {
    metallicRoughness.metallicRoughnessTexture = loadTexture(
      loader,
      metallicRoughnessTexture,
      frameState,
    );
  }
  metallicRoughness.baseColorFactor = fromArray(Cartesian4, baseColorFactor);
  metallicRoughness.metallicFactor = metallicFactor;
  metallicRoughness.roughnessFactor = roughnessFactor;

  return metallicRoughness;
}
Load textures and parse factors for a metallic-roughness PBR model in a glTF material
@param {GltfLoader} loader
@param {object} metallicRoughnessInfo The contents of a pbrMetallicRoughness property in the parsed glTF JSON
@param {FrameState} frameState
@returns {ModelComponents.MetallicRoughness}
@private