When three-dimensional television advertising, brought to you by the Coca-Cola Co., debuts this spring on the final episode of ABC's "Moonlighting," it will be the latest entry in Madison Avenue's escalating competition in extravaganza commercials.

Coca-Cola will be the first to air 3-D commercials -- or 3-D anything -- on network television. Last week, the giant Atlanta beverage company and ABC Television announced in Los Angeles that a 60-second advertisement for Coca-Cola Classic, as well as 10 to 12 minutes of the season's final segment of "Moonlighting," will be shown in a new kind of 3-D that avoids past technical problems.

"There's a fair amount of hype and noise in the soft-drink industry that propels us to be more competitive and creative," said Coca-Cola spokesman Robert Baskin. "It causes all of us to try to do something beyond what has been done in the past."

Coke will manufacture the glasses needed to view the show in 3-D and then use its huge distribution system to get about 40 million pairs -- free or at a minimal cost -- into the hands of viewers at grocery stores and fast-food chains, such as McDonald's and Hardee's.

Since the announcement, Terry Beard's phone has not stopped ringing.

"It's been very difficult to get work done because of the calls," said Beard, president of Nuoptix Inc. of Little Falls, Calif., and inventor of the new 3-D technique. "There's a huge list here." Ford Motor Co. called. MGM and Paramount studios called. NBC called. Someone from Pee Wee Herman's "Pee-wee's Playhouse" called. (Imagine Pee Wee in 3-D.)

One of the advertisers who has not called is PepsiCo Inc. The rival soda company's current campaign features singer Michael Jackson; its new network television advertisements will begin on Jan. 23 "with a few surprises," said Pepsi spokesman Ken Ross.

"It's an interesting concept," said Ross of Coke's 3-D ad. "But we have no immediate plans to advertise in 3-D."

Although neither Coke nor Pepsi will discuss what it spends on advertising, they are two of the television networks' biggest advertisers. The trade publication Beverage Industry has estimated that Coke spent $152 million on all advertising in 1986, while Pepsi spent $130 million.

It's a good thing Pepsi isn't interested. Coca-Cola is negotiating an exclusive licensing arrangement that will prevent anyone else from using Beard's patented process until after the "Moonlighting" segment airs in May. Coke chose "Moonlighting" because of its large audience and the detective show's willingness to use 3-D, according to company officials.

Although 3-D has been around in various forms since the 1950s, it had never been developed in a form that was usable for television because the image was blurry for those who did not have those strange little glasses. However, the Nuoptix technique, which Beard has been working on since about 1974, allows watchers without the special glasses to see a normal two-dimensional picture, while those with the glasses will see a 3-D image.

The beauty of the partnership with Coca-Cola, said Beard, is that in the past, a 3-D filmmaker had no practical way to get the glasses to the viewers -- a problem that Coke's distribution system has solved.

The new process costs little more than normal techniques, Beard said, although Coke will not divulge the cost of the production or its licensing agreement.

Whether the 3-D commercial will start a trend in television advertising is open to debate. "Within the ad community, nobody likes to be second," said Muffett Kaufman, the producer and director who brought Coke and Beard together. "On the other hand, if Coke is successful, a totally different type of company might be interested."