Keith Stanfield, who made his feature film debut in last year's critically-acclaimed indie Short Term 12, had signed on to play Snoop Dogg in the N.W.A. biopic Straight Outta Compton.

The plot is set in the mid-1980s, following the rise of pioneering gangsta rap group N.W.A., five young rappers who turned their harsh upbringings on the streets of Compton, California into innovative music. The biopic shows how their music told the truth about the "hood" and started a cultural war.

RELATED: Dr. Dre Rushed to ICU After Suffering a Brain Aneurysm

Jason Mitchell is portraying Eazy-E, with O'Shea Jackson Jr. portraying Ice Cube, the actor's actual father. Corey Antonio Hawkins is set to portray Dr. Dre, with Aldis Hodge and Neil Brown Jr. rounding out the primary cast as M.C. Ren and DJ Yella. Paul Giamatti also stars as N.W.A.'s manager, Jerry Heller.

Keith Stanfield is playing Calvin Broadus Jr., a.k.a. Snoop Dogg, who encountered N.W.A. early in his career. After N.W.A. broke up, Snoop Dogg teamed up with Dr. Dre on his Death Row Records label. Marion "Suge" Knight, who founded Death Row Records, will also be a significant character in the film.

Sheldon A. Smith has also joined the cast as Warren G., with Carra Patterson playing Tomica Woods.

F. Gary Gray is directing from a script by Andrea Berloff, S. Leigh Savidge and Alan Wenkus. Original N.W.A. members Ice Cube and Dr. Dre are both producing alongside Matt Alvarez and Tomica Woods-Wright, with William Packer and Scott Bernstein serving as executive producers. Shooting is currently under way in Los Angeles.

After making his feature debut in Short Term 12, Keith Stanfield recently starred in The Purge: Anarchy and he also has a role in the upcoming biopic Selma.