refactor shader code.