Abstract
A simple rendering method to avoid vertex seams in cylindrical and toroidal UV mappings used for texture mapping is presented. (A vertex seam is a vertex duplication of a polygonal mesh with different texture coordinates assigned to the two geometrically coinciding copies.) As a result, the method leads to simpler, leaner, replication-free data structures. Is also allows for a higher degree of proceduralism in generation of texture coordinates.
The method is general, trivial to implement (exhaustive pseudocode is provided), very low in cost on resources (with a virtually null impact on performance), and it leverages only basic mechanisms widely available in most GPU implementations. An open-source implementation is available at the address provided at the end of this article.
Notes
1Data structures for meshes can be designed to deal with jumps in texture coordinates in ways other than vertex duplication: texture coordinates can be indexed per face separately from vertex-position data, or, they can be embedded as a per-wedge attribute (thus replicating UV positions). None of these alternatives bypasses the problems discussed here.
2In GLSL, function d is directly available as fwidth.