batching now supports materials.