Two years back, the Spanish director Rodrigo Cortés directed Buried, a taut, tense little potboiler that didn't get nearly the attention it deserved. (It's that movie where Ryan Reynolds is trapped in the coffin for 90 minutes. Go rent it.) It's such a good film that there was every reason to anticipate his latest effort with eagerness, even excitement. That excitement last about ten minutes into his new film Red Lights, peeling away in layers as the film progress: Okay, so maybe this one's not up to par. No, it's mediocre at best. No, wait, it's actually quite bad.

So many things can go askew in the making of a motion picture that it's something of a miracle we ever get a good one, so it's always risky to guess at what makes one go off the rails. But here's a theory: Though Cortés directed Buried, it was written by Chris Sparling. Mr. Cortés chose to write Red Lights himself. In light of the results, he might be wise to see what Mr. Sparling's been working on. Buried proved Cortés a talented director, but he is clearly a painfully pedestrian screenwriter; Red Lights is filled with obvious signposting, stilted dialogue, and hackneyed devices. His skill as a filmmaker can't save his flaws as a writer--if anything, they just make his hepped-up, operatic style seems silly.

His plot: Margaret Matheson (Sigourney Weaver) is a university psychologist who makes a specialty of observing supposedly paranormal activity and debunking it. Her faithful assistant is Tom Buckley (Cillian Murphy), who is rather slumming it at her side (which we discover via the finely-signaled subtext of her line "You know, you could have a brilliant career at any university in the world"). Matheson takes down small-timers, but Buckley has his eye on a whale: Simon Silver (Robert DeNiro), a blind, Uri Gellar-style spoon-bending mentalist who was all the rage in the early '70s and has recently come out of retirement.

The audience is signaled that Silver is blind by the first shot of his face, as he steps off of his private plan, removes his sunglasses to reveal his damaged eyes, and then returns them to his face. Why on earth would his character do that, except to execute the clunkiest bit of visual exposition in movie history? But the film is full of utterly inexplicable moments like that, questions that the puzzled viewer can only pose and shrug off. Why, in creating archival clips of young DeNiro, does he have actor Eugenio Mira do a Mad TV-level DeNiro "impression"? Why does his bathroom brawl include the destruction of two sinks and a toilet with the head of a man who can still stagger out to provide the denouement? Why are we expected to believe that the panel for a television discussion of psychics would have three believers, a sympathetic host, and one (1) skeptic? (All of the television broadcasts within the film are comically inept, in fact; a couple look like parodies from an old Zucker-Abrahams-Zucker film.)

Some of the performances work. Weaver is quite good, lending her paper-thin character a badly-needed sense of believability and gravitas, and Toby Jones is perfectly cast as a wormy, incompetent professor. Murphy's fevered intensity results in some over-playing, but he's mostly credible. And though Elizabeth Olsen isn't given much to do other than be charming and pretty, she certainly does that well. But Robert DeNiro is horrifyingly miscast, hammily bellowing his dreadful dialogue at every opportunity.

Red Lights isn't a total torpedo; in the pre-title sequence, before the picture's overall goofiness has taken hold, Cortés's Dutch angles and fast movements make for a crisp and atmospheric opening, and a later scene, showing the process by which they bust a phony faith healer, is energetically assembled. But it's dispiriting to watch the filmmaker go from something so punchy and unique to something so trite and derivative, from the cheap horror thrills along the way to the series of increasingly ridiculous (and insulting) "twists" at its conclusion--complete with Usual Suspects and Sixth Sense-style flashbacks to isolated moments and throwaway dialogue that are now OH SO MEANINGFUL. "Why did you come here today?" DeNiro thunders, during the picture's misbegotten climax. By that point, sitting out in the audience, we're wondering the same thing.