Happy endings are rare in recent gay movies. In "Brokeback Mountain" and last year's Israeli drama "The Bubble," homophobia is triumphant...

Happy endings are rare in recent gay movies. In “Brokeback Mountain” and last year’s Israeli drama “The Bubble,” homophobia is triumphant. So is the pressure to conform to heterosexual standards.

Jonah Markowitz’s “Shelter,” which won top honors at last fall’s Seattle Lesbian and Gay Film Festival (best picture and director), takes a different approach. Although it never discounts the impact of prejudice on a romantic same-sex relationship, it convincingly reaches for a less-tragic conclusion.

Like the cowboys in “Brokeback Mountain,” the San Pedro surfing buddies in “Shelter” struggle with a sexual attraction that seems to grow naturally out of their friendship. But they aren’t destroyed by it. Shaun (Brad Rowe) is already out when the film begins, while Zach (Trevor Wright) is just beginning to realize that his relationship with an on-and-off girlfriend (Katie Walder) is hurting them both.

The boys grew up together on the California coast, although Zach had been closer to Shaun’s heterosexual younger brother (Ross Thomas). Shaun left to become a writer. When he returns, on the rebound from a disastrous affair, he finds himself hitting the waves with Zach.

Unlimited Digital Access. $1 for 4 weeks.

Shaun has written an autobiographical book, which gives them more than surfing to talk about. When Shaun encourages Zach’s art-school aspirations, Zach begins to reconsider his bleak situation as a burger cook who is tied to his hedonistic sister (Tina Holmes) and her 5-year-old son.

Markowitz, who wrote the script while he was visiting Seattle, is an art director (“Quinceañera”). He had directed only short films before but demonstrates an instinctive ease with the challenges of a feature-length narrative. Shooting much of the film at photogenic “magic hour,” as the sun approaches the horizon, he smoothly establishes Zach’s status as an athlete, an artist and a boyish family man who treats his nephew as a son.

It’s a star-making, multilayered role, and Wright makes it his own. He connects with the character’s passion and mischief, as well as his secretive and sometimes cowardly side. Rowe brings a more patient, understated quality to Shaun.

What could have been a standard-issue coming-out, coming-of-age movie develops a remarkable intimacy, especially when Zach confesses to his girlfriend (who is more observant than he realizes) and lets down his guard enough to let Shaun call him beautiful.

“Shelter” may seem an odd title, but in the end it couldn’t be more appropriate.

John Hartl: johnhartl@yahoo.com