Based on the book of the same name by Irvine Welsh, Jon S Baird’s second feature film (after 2008’s Cass) is a very Scottish beast, though not the side of the country the tourist board choose to dwell on. In a duality that Edinburgh doesn’t want to shake off, it comes out the week before the (apparently pretty good) Proclaimers jukebox musical Sunshine On Leith hits cinemas. Baird’s script, while taking some deviations from the deviations of Welsh’s novel, teases you with both its irreverence and the possibility of change in its characters. This is a film that is very happy to be surreal, with Robertson regularly breaking the fourth wall and a delirious guest appearance from David Soul. As with Trainspotting, there’s a vigour and swagger to the filmmaking, a frank and unflinching depiction of drug use, violence, erotic asphyxiation, and photocopied penises. There’s some shock value to be had from this, and some gallows humour, but it’s not something that is glorified. Filth is comfortable with displaying really unpleasant people doing unpleasant things to each other, with the consequences stacking up as the film progresses. In the background of the plot is a racially-motivated murder investigation, but really this is about Robertson and his machinations. He states at the start of the film that these games are to ensure he gets a promotion, but he has many demons to overcome, and ultimately it is not – as The Great Gonzo would claim in the film Muppet Treasure Island – cool. While McAvoy is the focus, the supporting cast is immensely strong and very recognisable. We’ve got Kate Dickie, Iain De Caestecker, Imogen Poots and Martin Compston in small roles; Eddie Marsan, Jim Broadbent and Jamie Bell in larger supporting ones. Marsan continues to develop his comedy chops after The World’s End, Broadbent’s role harkens back to his days as part of Terry Gilliam’s regular carnival of grotesques, and Bell’s turn quietly reminds you of the time he oozed charisma opposite a lumpen Hayden Christensen in Jumper. Everyone is as realistic or as outlandish as the role requires, with some scene stealing work from Gary Lewis and John Sessions (the former as the older, dim avuncular policeman, the latter as Robertson’s boss in the police and Masonic brethren). Where it failed for me is somewhat intangible. The last act feels like it’s initially stuttering, until it regains its previous confidence. The pacing is slightly off, as Robertson’s problems catch up with him too quickly, culminating in a hasty big reveal. The film suggests such a moment for a long time, inviting you to guess, and when it comes it’s slightly different from what I anticipated. Even so, it’s almost glossed over, too economical with its storytelling when it needed just a bit longer to breathe. Despite this glitch, Filth soon regains its footing, briefly misdirecting you before combining comedy, tragedy and character perfectly. Also, based on this pattern, whatever Irvine Welsh novel gets adapted in 2030 is going to be an absolute belter. Filth is out in UK cinemas on the 4th October. Follow our Twitter feed for faster news and bad jokes right here. And be our Facebook chum here.