Our artists would like to work with base materials that contain a lot of static switches, and be able to apply the material instances across a wide range of mesh types (meaning they want to tick a lot of UsedWith flags).
Currently, UsedWith flags are only on UMaterials, so whenever a MaterialInstance is created with a static parameter set, it generates a lot of shaders that might not actually be needed. For example, the MaterialInstance might only be used on ParticleSprites, but not Beams or Mesh Particles.
Have you thought about allowing Material Instances to have their own UsedWith flags? Would the work involved be much more difficult than changing MaterialShared.cpp so that the FMaterialResource::IsUsedWith* functions check the MaterialInstance member before falling back to the Material?