The first time I heard about the racism in Japan was probably in high school or thereabouts, regarding US solders having babies with Vietnamese and Japanese women, and the mixed-race babies (and often the native mothers) being viewed and treated as outcasts.
My information on the racism in Japan, or at least in Tokyo, is rather recent. It is estimated that at least 80 percent of landlords in Tokyo will not rent to a Gaijin. For the ones that will, there's a whole bunch of hoops you need to jump through, including having a local phone number in Japan, a local bank account there, an agent to negotiate with the landlord, a local character reference, and a local emergency contact. A bad tenant is a bad reflection on the landlord and the agent. They won't want some ignorance Gaijin throwing wild parties, or worse, setting out the wrong garbage on the wrong day. If you don't speak Japanese, your chances of renting drop from 20% to about 5%. If you're married to a Japanese citizen and she speaks Japanese but you don't, it's still only about 5% because, sheesh, your wife had the nerve to marry a Gaijin for cryin' out loud and that reflects badly on all of Japan. When in Rome do as the Romans do. When in Tokyo, oh, multiculturalism isn't even a thing.