You might have noticed that films about guys have been getting prettygay lately. Of course, homosociality has underpinned many Hollywood genres from the off – gangster movies, war movies and buddy movies all thrive on men appreciating each other's manliness – and the American classics are studded with such adorable couples as Felix and Oscar, Butch and Sundance, and Ratso and Joe. But over the past few years, the sap has been rising.

If 2005's Brokeback Mountain didn't exactly open the floodgates to a mainstream queer romance cycle – the tantalising trailer for Satan's Alley embedded in Tropic Thunder notwithstanding – it ushered in some notable toe-dipping. The comedies of the Judd Apatow stable are full of male bonding that revels in pseudo-sodomitic signifiers, especially Superbad and Pineapple Express: one overflowed with cartoon cocks, the other with references to gay sex as an expression of affection. I Love You, Man unabashedly mapped male friendship on to a boy-meets-girl romcom template, right up to its wedding-day climax. And even low-rent comedies like civil-partnership travesty I Now Pronounce You Chuck & Larry, and high-school cheerleading caper Fired Up! offered moments of sincere curiosity amid their gay-panic stereotypes.

But bromance is one thing, queer sex another. When push comes to shove, so to speak, are today's straight guys so relaxed with their affection for one another that they can express it through actual bedroom action? That's the question Lynn Shelton asks in her film Humpday, about two thirtysomething college buddies – freewheeling Andrew (Joshua Leonard) and married Ben (Mark Duplass) – who decide to film themselves having sex for a local art-porn competition (Humpfest, a real-life event run by Seattle paper the Stranger). "Two straight dudes straight balling" will, they decide, blow any audience's mind. "It's beyond gay." But is it also beyond them?

It's established early on in this wry, sensitive film that these are thoughtful, emotionally articulate guys, comfortable openly expressing their affection and love for each other. Andrew is a little condescending about Ben's stable, conservative lifestyle, and Ben is sceptical about Andrew's bona fides as a free spirit, but the two of them are equally enthusiastic – competitive, even – about their impetuously hatched plan, jostling over who'll be on top, and egging each other on with veiled accusations of cowardice and ultra-pumped basketball games. The intriguing fulcrum of the story is the idea that, for right-thinking liberal American guys, gay sex should be no biggie; what would once have been a signifier of degenerate weakness is now an emblem of sophisticated maturity. What's the problem, bro? Not man enough for a little man-on-man?

This conception of sexual intercourse as liberal dick-measuring contest writ large, both right-on and gung-ho, is not, needless to say, the ideal mood setter. For Shelton, the awkwardness that the friends' plan unleashes – which she, Leonard and Duplass unpack with sympathy but little mercy – is a sign of their entrenched straightness. "The dramatic tension and squeamish humour," Shelton suggests, "comes from the fact that, as wild and open as they would like themselves to be, the two main characters are both so heavily invested in being straight that when they push the boundaries of their heterosexuality, it shakes them to the very core." There's certainly something in this, but I suspect Shelton is selling her own characters short.

Humpday is smart on the difference between sex and intimacy: within Ben's marriage (to Monica, deftly played by Alycia Delmore), for instance, the moment of greatest warmth and closeness is linked to forgoing sex, while that of greatest tension is pegged to perfunctory coitus. The film also recognises that being great buddies doesn't make getting it on a shoo-in. Introducing sex into a friendship is a fraught dynamic whatever the individuals' sex or orientation, and a great part of the film's tension is generated not by the challenge to heterosexuality per se, but the question of whether the pair's long-standing bond can withstand such a radical shift. I'm not about to spoil the ending for you, but Humpday's story is rooted in the recognition that tampering with an established buddy dynamic is playing with fire. However welcome Hollywood's new openness to gay-ish content might be, the can of worms Andrew and Ben find wriggling in their laps suggests that sometimes a little subtextually loaded banter goes a long way.