I made material that subdivides texture coordinates based on object scale. When material is applied on scaled StaticMeshActor, then it works as expected without an issue.
However, when I put it on the scaled InstancedStaticMeshComponent it breaks and makes material dark and full of artifacts.
I don’t understand why is that.
Here is the material:
TileByScale function:
It gives me warnings inside instance material (image is in the comments due to number of image limitation). It might be the issue, but I don’t know how to fix it. If I change Sampler Type to Grayscale it won’t compile at all and gives me errors.
I would be very grateful for any ideas on how to fix it.
Thank you.