refactoring shader