After a long dry spell, M. Night Shyamalan, once acclaimed as the next Spielberg (or even Hitchcock) on the basis of his early success, took a couple of steps forward—at least in terms of popular acceptance—with “The Visit” and “Split.” He now goes backwards—in more ways than one—with “Glass.” The picture is the finale to a trilogy he’s been envisioning ever since “Unbreakable” in 2000: he was finally able to resume the project with “Split” seventeen years later, and its unexpectedly big boxoffice has allowed him to proceed to the third installment. But this lugubrious, pretentious movie will prove, to put it mildly, a crushing disappointment to Shyamalan’s admirers as well as everyone else.

“Unbreakable” was, of course, a divisive film. It did reasonably well financially, largely on the basis of expectations deriving from “The Sixth Sense,” but, without revealing overmuch about the plot, which might still be a mystery to some, many viewers found the seriousness with which it treated the mythos of superhero-dom rather ludicrous, and the treatment of it ponderous. For most of its running-time, “Split” seemed altogether unrelated to it. It was about Kevin Wendell Crumb, a serial killer with split personalities, played to the hilt by James McAvoy in a thoroughly hammy but technically impressive performance, and Casey (Anya Taylor-Joy) one of the girls terrorized by him and the one who escaped his grasp.

Only at the very end of “Split” was David Dunn (Bruce Willis), the gloomy protagonist of “Unbreakable,” briefly reintroduced to set up “Glass,” which also returns Dunn’s antagonist from the first film, Elijah Price (Samuel L. Jackson), known by the titular nickname because of his affliction—bones so weak that they are easily shattered. After the revelations that closed “Unbreakable,” Elijah has been incarcerated at a Philadelphia mental hospital for nineteen years, apparently a helpless vegetable.

At the start of “Glass,” David, a grim vigilante in a rain slicker aided by his computer-savvy son Joseph (Spencer Treat Clark), captures Kevin and saves his most recent victims, four nameless cheerleaders. But he’s taken into custody along with Kevin, and both are installed in the same hospital as Glass, under the care of Dr. Ellie Staple (Sarah Paulson), a psychologist who specializes in treating people whose mental disturbance consists of their belief that they possess superhuman powers. Gradually it seems possible that Glass, who suffers from the same delusion, has plans regarding the two of them, as well as himself, that he intends to execute despite his infirmity.

Glass usurps the title because he’s the catalyst of the plot, but actually he’s a secondary character in terms of screen time, as also is Willis’ Dunn. The dominant figure here is McAvoy’s Kevin, whose quick switches from one personality to another the actor and Shyamalan again exploit to the fullest.

Kevin’s centrality might simply be explained by the fact that most of the young viewers who made “Split” a smash—and might not even know “Unbreakable”—basically want a sequel to that movie, and so that’s what Shyamalan provides. In the process, though, he’s given a different emphasis to the character. The first time around, though there was some humor in his constant changes, Kevin was fundamentally a scary person. Here the humorous element has been multiplied; in a way the same thing happens to him that occurred with Robert Englund’s Freddy Krueger, who morphed into more a bloodthirsty joke machine as the “Nightmare on Elm Street” series rolled on. McAvoy again plays the part with enormous energy, but his over-the-top turn more and more comes to seem like twenty or so overripe performances given by a single actor simultaneously—Dr. Jekyll and nineteen varieties of Mr. and Mrs. Hyde.

As for Willis and Jackson, they both play on a single note—the former typically glum, the latter, once freed of Glass’s lethargy, wild-eyed. Paulson’s psychologist comes across as semi-embalmed, the actress so rigidly subdued that she barely seems human; but that turns out to be a deliberate part of Shyamalan’s game plan in the end. Taylor-Joy, Clark, Charlayne Woodard as Glass’s mother and Adam David Thompson and Luke Kirby as hospital orderlies are similarly flummoxed by Shyamalan’s finicky, plodding direction, which feels more than ever like a combination of bad Kubrick and bad Cronenberg. Under his hand the technical crew do drab work as well. Production designer Chris Trujillo and cinematographer Mike Gioulakis give the director the gray, gloomy look he obviously wants, and editors Luke Ciarrocchi and Blu Murray the somber, funereal pace Shyamalan favors, but his sense of staging and composition—particularly in the finale final confrontation sequence—is so inept that their efforts are hamstrung.

Since this is clearly a pure Shyamalan film rather than a mere work-for-hire, the question naturally arises: does it offer his signature twist ending? The answer is yes. In fact, he gives us a double dose. The problem is that the supposed surprise is based on a premise—a fear of those who are “special”—that might have seemed fresh in 2000, but now is positively musty, having since been employed in virtually every superhero franchise in the comic pages and on screens big and small over the years; even though it’s tweaked here, it still comes across as stale. Nor is gussying it up with a nod to the power of social media (taking on the role newspapers would once have played in such a scenario—see, for instance, “Three Days of the Condor”) particularly inspired.

“Glass” may be the fulfillment of Shyamalan’s long-gestating dream, but it’s a dreary downer for the audience—a portentous, self-indulgent dirge that limps its way to a feeble conclusion.