See licensee description of the issue:
The problem appears when I have two instanced materials with the same number of parameters. I've noticed that ShaderMapId has MaterialLayersParameterIDs where all LayerIDs are set to 00000000-0000-0000-0000-000000000000. Because of this hash calculated as a DDC key is the same for both different materials and then both materials are using the same shader (which is incorrect). This happens because all StateIds for UMaterialFunctionInstance are initially set to 0 and are never properly generated. I can fix this when I recreate the guid for UMaterialFunctionInstance doing something like this:
or just set StateId = FGuid::NewGuid();
in a UMaterialFunctionInstance constructor.
Unfortunately, this causes a constant shader compiling during each editor restart. Maybe You guys already have a solution for this problem or can give me some hint on how to fix this properly?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-117285 in the post.