Texture mapping on a polygon

Sorry to bump this old thread, but I found a recent article on quad interpolation vs. triangle interpolation that includes example geometry shader code. The end of the article has some great figures that show how the interpolation changes the rendering.