One's presence publicly lends support to the very idea of same-sex marriage, thus undermining the foundations of one of the Church's seven sacraments.
In this situation too, one must show charity toward the participants, ensuring them of your love for them, while refusing to support their actions.