Texture Mapping (UV)
Wrapping 2D images onto 3D coordinates using normalized U,V texel maps.
UV Coordinates
A 2D texture uses coordinates $U \in [0, 1]$ and $V \in [0, 1]$. Each 3D polygon vertex is assigned a corresponding $(u,v)$ coordinate. The rasterizer interpolates $(u,v)$ values across the face to sample texel colors from the texture map.
Tiling & Wrapping
When UV coordinates exceed $[0, 1]$, OpenGL defines wrap modes:
- GL_REPEAT: Tiles the texture.
- GL_CLAMP: Clamps UV to boundaries, stretching the edge pixels.
- GL_CLAMP_TO_EDGE: Clamps texel fetch region.
Ready to Visualize Textures?
Launch our interactive visualizer to step through calculations in real-time.
Launch Texture Mapping Visualizer →