What determines whether a metamorphic rock is foliated or non-foliated?

the presence or absence of mineral crystals

the water content as a percentage of the rock volume

the number of remaining gas molecules

temperature, pressure, and the original type of rock