Optimizing cube rendering.