This detergent seriously de-funkified my work-out wear......
Some of my shirts developed really crusty funky pits, that Tide or whatever just up and ran away from...
Try Hexperformance ..it works
At least on My Under Armor and other work out stuff... I bet it can handle some hats