refactored shader to be more universal