/Engine/Source/Developer/MaterialUtilities/Public/MaterialUtilities.h
Tries to optimize the sample array (will set to const value if all samples are equal)
static void OptimizeSampleArray ( [TArray](API\Runtime\Core\Containers\TArray)< [FColor](API\Runtime\Core\Math\FColor) > & InSamples, FIntPoint & InSampleSize )