consolidate some parsing functions that were pretty much identical for vertex/fragmen...