There was a time, not long ago, when gay and lesbian characters in Hollywood films were colored in various shades of badness. (Google “queer-coded Disney villains” and pages of hits will appear.)

In the Japanese film industry, LGBTQ characters have edged closer to the mainstream in recent years, though not often as moral exemplars. In the recent comedy “Natchan’s Little Secrets,” for example, the film’s gay protagonist tells two pals that all they knew about their suddenly deceased drag queen friend were her fetishes and taste in men. The subtext: Gay relationships revolve around shallow sex.

The title of Daishi Matsunaga’s groundbreaking new film "Egoist," which is based on the eponymous semi-autobiographical novel by Makoto Takayama, hints at more of the same when a gay fashion magazine editor (Ryohei Suzuki) turns his hot personal trainer (Hio Miyazawa) into his compensated lover.