Multi meshes possibly share same shaderMaterial with different uniforms?

Hello everyone,
I’m wondering is it possible that I can make meshes with same shader but different uniforms using same shaderMaterial? I have to produce thousands of meshes at the same time, it will stuck for a long time when creating the meshes.
Or is there any other ways to make the buildings’top in the pic with single material(maybe change uvs, but I just cant imagine how to do this)? I want to make it looks like outline0F2633A8-E5C0-4ad0-ACF3-9A39DEB3ED5F

You can update a uniform in the shadermaterial.onBindObservable observable:

shadermaterial.onBindObservable.add((mesh) => {
    if (mesh.name === "xxx") {
        shadermaterial.setFloat("myuniform", 1.2);
    } else if (mesh.name === "yyy") {
        shadermaterial.setFloat("myuniform", 1.7);
    }
});

It seems that the shader uses the last update of uniform, could you please point me out where is wrong?
https://www.babylonjs-playground.com/#2IFRKC#249

My mistake, in the onBindObservable you must directly update the value on the effect, not on the base class:

https://www.babylonjs-playground.com/#2IFRKC#251

It works! Thank you so much for helping me out!!