Refactor material handling to allow per-face vertex attributes.