   surface.emissive = Material.glow.rgb * Material.glow.a;
   if (flag_glow && flag_glowTexture) surface.emissive *= getPixel(GlowTexture, UV).rgb;
 
-  float roughness = Material.roughness;
-  if (flag_roughnessTexture) roughness *= getPixel(RoughnessTexture, UV).g;
-  roughness = max(roughness, .05);
-  surface.roughness2 = roughness * roughness;
+  surface.roughness = Material.roughness;
+  if (flag_roughnessTexture) surface.roughness *= getPixel(RoughnessTexture, UV).g;
+  surface.roughness = max(surface.roughness, .05);
+  surface.roughness2 = surface.roughness * surface.roughness;
 
   surface.occlusion = 1.;
   if (flag_ambientOcclusion) surface.occlusion *= getPixel(OcclusionTexture, UV).r * Material.occlusionStrength;

}

float D_GGX(const Surface surface, float NoH) {
  float alpha2 = surface.roughness2 * surface.roughness2;
  float denom = (NoH * NoH) * (alpha2 - 1.) + 1.;
  return alpha2 / (PI * denom * denom);
}

  vec3 diffuse;
  vec3 emissive;
  float metalness;
  float roughness;
  float roughness2;
  float occlusion;
  float clearcoat;
