Rework MaterialResource a bit