Refactor shader compilation into a central manager.