Re-added uniform value encoding for materials (closes #26)