Move shader creation to helper function