   float LdotH = clamp(dot(l, h), 0.0, 1.0);
   float VdotH = clamp(dot(v, h), 0.0, 1.0);
 
-  // based on glTF Viewer implementation: https://github.com/KhronosGroup/glTF-Sample-Viewer/blob/master/source/Renderer/shaders/pbr.frag
-  //float indexOfRefraction = 1.5;
-  //float specularWeight = 1.0;
+  vec3 f0 = pbrParameters.f0;
+  float reflectance = max(max(f0.r, f0.g), f0.b);
+  vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
+  vec3 F = fresnelSchlick2(f0, f90, VdotH);
 
-  // dielectrics us f0 = 0.04, metals use albedo as f0
-  metallic = clamp(metallic, 0.0, 1.0);
-  vec3 f0 = vec3(0.04);
-  vec3 specularColor = mix(f0, baseColor.rgb, metallic);
-  float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);
-  vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
-  vec3 r0 = specularColor.rgb;
-  vec3 F = fresnelSchlick2(r0, r90, VdotH);
-
-  // roughness is authored as perceptual roughness
-  // square it to get material roughness
-  roughness = clamp(roughness, 0.0, 1.0);
-  float alpha = roughness * roughness;
+  float alpha = pbrParameters.roughness;
   float G = smithVisibilityGGX(alpha, NdotL, NdotV);
   float D = GGX(alpha, NdotH);
   vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);
 
-  // diffuse only applies to dielectrics.
-  vec3 diffuseColor = baseColor.rgb * (1.0 - f0) * (1.0 - metallic);
+  vec3 diffuseColor = pbrParameters.diffuseColor;
   // F here represents the specular contribution
   vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);
 
   // Lo = kD * albedo/pi + specular * Li * NdotL
-  vec3 color = (diffuseContribution + specularContribution) + NdotL * lightColorHdr;
-
-  vec3 ambient = vec3(0.03) * baseColor.rgb * occlusion;
-  color += emissive + ambient;
-
-  return vec4(color, 1.0);
+  return (diffuseContribution + specularContribution) + NdotL * lightColorHdr;
 }

    return roughnessSquared / (M_PI * f * f);
}

/**
 * Compute an HDR color according to the physically-based-rendering Metallic Roughness model.
 *

 * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
 * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
 */
vec3 czm_pbrLighting(
    vec3 positionEC, // p
    vec3 normalEC, // n
    vec3 lightDirectionEC, // l
    vec3 lightColorHdr, // L (radiance)... is this already attenuated?
    PbrParameters pbrParameters
) {
  vec3 v = -normalize(positionEC);
  vec3 l = normalize(lightDirectionEC);
  vec3 h = normalize(v + l);
  vec3 n = normalEC;
