Add optimizations for batched rendering.