You could render the scene twice, once with the glasses transparent and once with the glasses opaque and then use the compositor to blend the two results together based on a mask created from object indices.
Compare:
You could render the scene twice, once with the glasses transparent and once with the glasses opaque and then use the compositor to blend the two results together based on a mask created from object indices.
Compare: