   if (_hasMap(diffuseMapLayerIndex)) {
     data.materialDiffuse =
         texture(sampler2DArray(textureArray, textureSampler),
-                vec3(uv * diffuseMapScale, diffuseMapLayerIndex))
+                vec3(uv * mat.diffuseMapScale, diffuseMapLayerIndex))
             .rgb +
         vec3(mat.diffuse);
   } else {

    data.worldNormal =
        mat3(tw, bw, nw) *
        normalize((texture(sampler2DArray(textureArray, textureSampler),
                           vec3(uv * normalMapScale, mat.normalIndex))
                       .rgb) *
                      2.0 -
                  1.0)


  vec2 metalRoughness;
  if (_hasMap(metalRoughnessMapLayerIndex)) {
    metalRoughness = texture(sampler2DArray(textureArray, textureSampler),
                             vec3(uv * mat.metalRoughnessMapScale,
                                  metalRoughnessMapLayerIndex))
                         .rg;

    data.materialMetalness = metalRoughness.r + mat.metalness;
    data.materialRoughness = metalRoughness.g + mat.roughness;
