What gives Spacey's performance its edge -- its greatness -- is that we can finally see how little this connoisseurship means to him. Inside the sleek cynicism is a weariness with what he has become. When Vincennes is given an opportunity by Exley to right a wrong he perpetrated -- a Hollywood bust turned murder -- he jumps at it. His chance for redemption transforms him. It's as if the real person, guileless and decent, has melted away the mask.

Perhaps the reason Vincennes comes across as the most layered of the film's characters is that his take on things -- detached yet impassioned -- matches Curtis Hanson's. When Vincennes is at his sleekest, it's as if everything he speaks issues from an echo chamber of irony; he's supremely facetious. Hanson directs the action in the same double-edged way. Underneath the cool-cucumber flipness he's terribly engaged.

He realizes you can't direct a Fifties crime noir as if we were still living in the Fifties. When the police chief (John Mahnon) talks up the LAPD as a "great force in a great city," it's balanced by his directive to the cops regarding some black suspects in a brutal mass murder. He urges "all available force" for their apprehension, and, to his credit, Exley gags at the euphemism. He mutters to himself, "Why not just put a bounty on them?"

Noir, for all its up-from-the-streets atmosphere, is situated in a pulpy never-never land where everything we see and hear seems encoded yet explicit. The emphasis in L.A. Confidential on the racism and corruption of the LAPD grounds it. It's as if we were witnessing the origins of an outrage that is still with us. When White, the self-styled avenger of battered women, shoots a rapist and then makes the shooting look like self-defense, we feel unclean watching the fix, even though our outrage matches his. We're privy to an obscenity, and Hanson makes us feel our own complicity. In fact, throughout L.A. Confidential we feel implicated in the luridness of what we're watching. That's one of the dirty pleasures of noir.

Hanson has shuffled through these shadows before. His script for the almost unknown 1979 Elliott Gould thriller The Silent Partner was a marvel of malice. Despite some questionable casting involving the likes of Steve Guttenberg and James Spader, Hanson's second and third features as a director, The Bedroom Window and Bad Influence, were expertly creepy neo-noirs.

The casting in L.A. Confidential is mostly first-rate -- though a little of DeVito's smirky bombast goes a long way for me -- and the creepiness is more masterfully stage-managed than ever. Hanson has finally come into his own. A former movie critic, he seems to be playing out in this film his own fantasia on the noirs that formed him. When we follow the trail of blood in the Nite Owl Coffee Shop -- the murder trail that leads to the black suspects -- Hanson intensifies our dread drop by drop. It's as if an Edward Hopper all-night diner had blurred into a charnel house.

At the same time, Hanson is reaching for a more sentimental and valorous conception of the noir thriller than we are accustomed to. It's his way of recasting the genre by making it less reactionary. And so, in place of the standard-issue noir vamp who drives men to their doom, we get Kim Basinger's Lynn Bracken, the whore with the heart of gold. Lynn is a prize filly in the stable of pimp-financier Pierce Patchett (David Strathairn), who runs a house of prostitution featuring women surgically altered to look like movie stars. (Such a ring actually existed in Hollywood.) Lynn is the Veronica Lake stand-in, and Bud White falls for her. He lets her know she's better-looking than Veronica Lake; that's how we first know he loves her.

In his squad car, in the rain, he watches her from afar. Much later on, feeling jilted, he slaps her in the rain. (What would noir be without rain?) Lynn is the bright angel of noir who replaces the vamp, and it doesn't quite work. She's such an ethereal goddess that you crave some poison in the mix, something slutty and indefensible. Basinger has the right vanilla parfait look -- she's certainly a pulpmaster's wet dream -- but she's given things to say like, "Bud can't hide the good inside of him." And we're meant to agree with her. Transforming a noir vamp into a touchy-feely angel of mercy isn't much of a bonus; noir shouldn't be this soggy and righteous. When someone like Jack Vincennes fights to reclaim his goodness, we can at least recognize the smarm it came out of. Lynn, though, is untainted from the get-go.

What all this means, I suspect, is that Hanson is much better at malice than virtue. He can't make the scenes with Lynn come alive, because they're cream-filled with good intentions. It's the same creaminess that mars the film's ending. (The book's fade-out is vaguely similar but far less smug.) In a way, Hanson is a victim of his own success here: He's so good at nastiness that the counterbalancing sweetness pales in comparison. He's not always at his best on the dark side, either: A scene involving the coercion of the D.A. (Ron Rifkin) is poorly staged, and there are a few too many cutesy-ironic touches, like the shot of Vincennes under a movie marquee for The Bad and the Beautiful.