To fill cavities, several materials may be used. If the filling will show, a tooth-colored resin or porcelain is used. If not, a gold casting or a mixture of silver, mercury, and other metals called amalgam is commonly used.