shader parsing refactored