Rework shader initialization and destruction.