What determines whether a metamorphic rock is foliated or nonfoliated?

Answer:
i think its the third.
temperature,pressure and the original type of rock