I have several mesh instances which use the same material. Is it possible to set different shader uniforms for each mesh instance or do I have to use unique material for each mesh instance?
I’m trying to do it as follow, but it doesn’t work.
let entities: pc.Entity; // Create entities (each entity's model use the same material) entities.model.meshInstance.material.setParameter("uColor", [1, 0, 0]); // Unfortunatelly, now all entities use uColor se to [1, 0, 0]
I think I have to set the uniform value for each instance every frame before it’s going to be rendered. But how to do that?