Temperature-dependent sputtering of metals and insulators