function processSpecularGlossinessUniforms(
  specularGlossiness,
  uniformMap,
  shaderBuilder,
  defaultTexture,
  disableTextures,
) {
  const {
    diffuseTexture,
    diffuseFactor,
    specularGlossinessTexture,
    specularFactor,
    glossinessFactor,
  } = specularGlossiness;

  shaderBuilder.addDefine(
    "USE_SPECULAR_GLOSSINESS",
    undefined,
    ShaderDestination.FRAGMENT,
  );

  if (defined(diffuseTexture) && !disableTextures) {
    processTexture(
      shaderBuilder,
      uniformMap,
      diffuseTexture,
      "u_diffuseTexture",
      "DIFFUSE",
      defaultTexture,
    );
  }

  if (
    defined(diffuseFactor) &&
    !Cartesian4.equals(diffuseFactor, SpecularGlossiness.DEFAULT_DIFFUSE_FACTOR)
  ) {
    shaderBuilder.addUniform(
      "vec4",
      "u_diffuseFactor",
      ShaderDestination.FRAGMENT,
    );
    uniformMap.u_diffuseFactor = function () {
      return specularGlossiness.diffuseFactor;
    };
    shaderBuilder.addDefine(
      "HAS_DIFFUSE_FACTOR",
      undefined,
      ShaderDestination.FRAGMENT,
    );
  }

  if (defined(specularGlossinessTexture) && !disableTextures) {
    processTexture(
      shaderBuilder,
      uniformMap,
      specularGlossinessTexture,
      "u_specularGlossinessTexture",
      "SPECULAR_GLOSSINESS",
      defaultTexture,
    );
  }

  if (
    defined(specularFactor) &&
    !Cartesian3.equals(
      specularFactor,
      SpecularGlossiness.DEFAULT_SPECULAR_FACTOR,
    )
  ) {
    shaderBuilder.addUniform(
      "vec3",
      "u_legacySpecularFactor",
      ShaderDestination.FRAGMENT,
    );
    uniformMap.u_legacySpecularFactor = function () {
      return specularGlossiness.specularFactor;
    };
    shaderBuilder.addDefine(
      "HAS_LEGACY_SPECULAR_FACTOR",
      undefined,
      ShaderDestination.FRAGMENT,
    );
  }

  if (
    defined(glossinessFactor) &&
    glossinessFactor !== SpecularGlossiness.DEFAULT_GLOSSINESS_FACTOR
  ) {
    shaderBuilder.addUniform(
      "float",
      "u_glossinessFactor",
      ShaderDestination.FRAGMENT,
    );
    uniformMap.u_glossinessFactor = function () {
      return specularGlossiness.glossinessFactor;
    };
    shaderBuilder.addDefine(
      "HAS_GLOSSINESS_FACTOR",
      undefined,
      ShaderDestination.FRAGMENT,
    );
  }
}
Add uniforms and defines for the KHR_materials_pbrSpecularGlossiness extension

@param {ModelComponents.SpecularGlossiness} specularGlossiness
@param {Object<string, Function>} uniformMap The uniform map to modify.
@param {ShaderBuilder} shaderBuilder
@param {Texture} defaultTexture
@param {boolean} disableTextures
@private