Abstracted out some shader code.