  We present a systematic study of the effects of shielding on the internal
quality factors (Qi) of Al and TiN microwave resonators designed for use in
quantum coherent circuits. Measurements were performed in an adiabatic
demagnetization refrigerator, where typical magnetic fields of 200 {\mu}T are
present at the unshielded sample stage. Radiation shielding consisted of 100 mK
and 500 mK Cu cans coated with infrared absorbing epoxy. Magnetic shields
consisted of Cryoperm 10 and Sn plating of the Cu cans. A 2.7 K radiation can
and coaxial thermalization filters were present in all measurements. TiN
samples with Qi = $1.3*10^6$ at 100 mK exhibited no significant variation in
quality factor when tested with limited shielding. In contrast, Al resonators
showed improved Qi with successive shielding, with the largest gains obtained
from the addition of the first radiation and magnetic shields and saturating
before the addition of Sn plating infrared absorbing epoxy.
