# Texture mapping

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Texture_mapping
> Markdown URL: https://mediated.wiki/source/Texture_mapping.md
> Source: https://en.wikipedia.org/wiki/Texture_mapping
> Source revision: 1356182729
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Method of defining surface detail on a computer-generated graphic or 3D model

Mapping a two-dimensional texture onto a 3D model

1: 3D model without textures
2: Same model with textures

**Texture mapping**[1][2][3] is a term used in [computer graphics](/source/Computer_graphics) to describe how 2D images are projected onto 3D models. The most common variant is the [UV unwrap](/source/UV_mapping), which can be described as an inverse paper cutout, where the surfaces of a 3D model are cut apart so that it can be unfolded into a 2D coordinate space (UV space).

## Semantic

*Texture mapping* can multiply refer to (1) the task of unwrapping a 3D model (converting the surface of a 3D model into a 2D texture map), (2) applying a 2D texture map onto the surface of a 3D model, and (3) the [3D software](/source/3D_software) algorithm that performs both tasks.

A *texture map* refers to a 2D image ("texture") that adds visual detail to a 3D model. The image can be stored as a [raster graphic](/source/Raster_graphics). A texture that stores a specific property—such as bumpiness, reflectivity, or transparency—is also referred to as a *color map* or *roughness map*.

The coordinate space that converts from a 3D model's 3D space into a 2D space for sampling from the texture map is variously called *UV space*, *UV coordinates*, or *texture space*.

## Algorithm

The following is a simplified explanation of how an algorithm could work to [render](/source/Rendering_(computer_graphics)) an image:

1. For each pixel, trace the coordinates of the screen into the 3D scene.

1. If a 3D model is hit or, more precisely, the polygon of a 3D model hits the 2D UV coordinates, then

1. The UV Coordinates are used to read the color from the texture and apply it to the pixel.

## History

The original technique was pioneered by [Edwin Catmull](/source/Edwin_Catmull) in 1974 as part of his doctoral thesis.[4]

Texture mapping originally referred to *diffuse mapping*, a method that simply mapped [pixels](/source/Pixel) from a texture to a [3D surface](/source/Polygon_mesh) ("wrapping" the image around the object). In recent decades, the advent of multi-pass rendering, [multitexturing](/source/Multitexturing), [mipmaps](/source/Mipmap), and more complex mappings such as [height mapping](/source/Height_mapping), [bump mapping](/source/Bump_mapping), [normal mapping](/source/Normal_mapping), [displacement mapping](/source/Displacement_mapping), [reflection mapping](/source/Reflection_mapping), [specular mapping](/source/Specular_mapping), [occlusion mapping](/source/Ambient_occlusion), and many other variations on the technique (controlled by a [materials system](/source/Materials_system)) have made it possible to simulate near-[photorealism](/source/Photorealistic_rendering) in [real time](/source/Real-time_data) by vastly reducing the number of [polygons](/source/Polygon) and lighting calculations needed to construct a realistic and functional 3D scene.

Examples of [multitexturing](/source/Multitexturing):
1: Untextured sphere, 2: Texture and bump maps, 3: Texture map only, 4: Opacity and texture maps

## Texture maps

"Texture maps" redirects here. For the album by Steve Roach, see [Texture Maps: The Lost Pieces Vol. 3](/source/Texture_Maps%3A_The_Lost_Pieces_Vol._3).

A **texture map**[5][6] is an image applied ("mapped") to the surface of a shape or [polygon](/source/Polygon).[7] This may be a [bitmap image](/source/Bitmap_image) or a [procedural texture](/source/Procedural_texture). They may be stored in common [image file formats](/source/Image_file_formats), referenced by [3D model formats](/source/3d_model_formats) or [material definitions](/source/Materials_system), and assembled into [resource bundles](/source/Resource_bundles).

They may have one to three dimensions, although two dimensions are most common for visible surfaces. For use with modern hardware, texture map data may be stored in [swizzled](/source/Morton_order) or tiled orderings to improve [cache coherency](/source/Cache_coherency). [Rendering APIs](/source/Rendering_APIs) typically manage texture map resources (which may be located in [device memory](/source/Device_memory)) as buffers or surfaces, and may allow '[render to texture](/source/Render_to_texture)' for additional effects such as post processing or [environment mapping](/source/Environment_mapping).

Texture maps usually contain [RGB](/source/RGB) color data (either stored as [direct color](/source/Direct_color), [compressed formats](/source/Texture_compression), or [indexed color](/source/Indexed_color)), and sometimes an additional channel for [alpha blending](/source/Alpha_blending) ([RGBA](/source/RGBA)) especially for [billboards](/source/Billboard_(computer_graphics)) and decal overlay textures. It is possible to use the [alpha channel](/source/Alpha_channel) (which may be convenient to store in formats parsed by hardware) for other uses such as [specularity](/source/Specularity).

Multiple texture maps (or [channels](/source/Image_channels)) may be combined for control over [specularity](/source/Specularity), [normals](/source/Normal_(geometry)), [displacement](/source/Displacement_mapping), or [subsurface scattering](/source/Subsurface_scattering), e.g. for skin rendering.

Multiple texture images may be combined in [texture atlases](/source/Texture_atlases) or [array textures](/source/Array_textures) to reduce state changes for modern hardware. (They may be considered a modern evolution of [tile map graphics](/source/Tile_map)). Modern hardware often supports [cube map](/source/Cube_map) textures with multiple faces for environment mapping.

### Creation

Texture maps may be acquired by [scanning](/source/3D_scanning) or [digital photography](/source/Digital_photography), designed in [image manipulation software](/source/Image_manipulation_software) such as [GIMP](/source/GIMP) or [Photoshop](/source/Photoshop), or painted onto 3D surfaces directly in a [3D paint tool](/source/3D_paint_tool) such as [Mudbox](/source/Mudbox) or [ZBrush](/source/ZBrush).

### Texture application

This process is akin to applying patterned paper to a plain white box. Every vertex in a polygon is assigned a [texture coordinate](/source/Texture_coordinate) (which in the 2D case is also known as [UV coordinates](/source/UV_coordinate)).[8] This may be done through explicit assignment of [vertex attributes](/source/Vertex_attributes), manually edited in a 3D modelling package through [UV unwrapping tools](/source/UV_unwrapping_tools). It is also possible to associate a procedural transformation from 3D space to texture space with the [material](/source/Physically_based_rendering). This might be accomplished via [planar projection](/source/Planar_projection) or, alternatively, [cylindrical](/source/Cylindrical_coordinates) or [spherical](/source/Spherical_coordinates) mapping. More complex mappings may consider the distance along a surface to minimize distortion. These coordinates are interpolated across the faces of polygons to sample the texture map during rendering. Textures may be repeated or mirrored to extend a finite rectangular bitmap over a larger area, or they may have a one-to-one unique "[injective](/source/Injective)" mapping from every piece of a surface (which is important for [render mapping](/source/Render_mapping) and [light mapping](/source/Light_mapping), also known as [baking](/source/Baking_(computer_graphics))).

#### Texture space

Texture mapping maps the model surface (or [screen space](/source/Screen_space) during rasterization) into *texture space*; in this space, the texture map is visible in its undistorted form. [UV unwrapping](/source/UV_unwrapping) tools typically provide a view in texture space for manual editing of texture coordinates. Some rendering techniques such as [subsurface scattering](/source/Subsurface_scattering) may be performed approximately by texture-space operations.

### Multitexturing

Multitexturing is the use of more than one texture at a time on a polygon.[9] For instance, a [light map](/source/Lightmap) texture may be used to light a surface as an alternative to recalculating that lighting every time the surface is rendered. *Microtextures* or *detail textures* are used to add higher frequency details, and *dirt maps* add weathering and variation; this can greatly reduce the apparent periodicity of repeating textures. Modern graphics may use more than 10 layers, which are combined using [shaders](/source/Shaders), for greater fidelity. Another multitexture technique is [bump mapping](/source/Bump_mapping), which allows a texture to directly control the facing direction of a surface for the purposes of its lighting calculations; it can give a very good appearance of a complex surface (such as tree bark or rough concrete) that takes on lighting detail in addition to the usual detailed coloring. Bump mapping has become popular in video games, as graphics hardware has become powerful enough to accommodate it in real-time.[10]

### Texture filtering

The way that samples (e.g. when viewed as [pixels](/source/Pixel) on the screen) are calculated from the [texels](/source/Texel_(graphics)) (texture pixels) is governed by [texture filtering](/source/Texture_filtering). The cheapest method is to use the [nearest-neighbour interpolation](/source/Nearest-neighbor_interpolation), but [bilinear interpolation](/source/Bilinear_interpolation) or [trilinear interpolation](/source/Trilinear_interpolation) between [mipmaps](/source/Mipmap) are two commonly used alternatives which reduce [aliasing](/source/Aliasing) or [jaggies](/source/Jaggies). In the event of a texture coordinate being outside the texture, it is either [clamped](/source/Clamping_(graphics)) or [wrapped](/source/Wrapping_(graphics)). [Anisotropic filtering](/source/Anisotropic_filtering) better eliminates directional artefacts when viewing textures from oblique viewing angles.

### Texture streaming

Texture streaming is a means of using [data streams](/source/Data_stream) for textures, where each texture is available in two or more different resolutions, as to determine which texture should be loaded into memory and used based on draw distance from the viewer and how much memory is available for textures. Texture streaming allows a rendering engine to use low resolution textures for objects far away from the viewer's camera, and resolve those into more detailed textures, read from a data source, as the point of view nears the objects.

### Baking

As an optimization, it is possible to render detail from a complex, high-resolution model or expensive process (such as [global illumination](/source/Global_illumination)) into a surface texture (possibly on a low-resolution model). This technique is called *baking* (or *render mapping*) and is most commonly used for [light maps](/source/Lightmapping), but may also be used to generate [normal maps](/source/Normal_maps) and [displacement maps](/source/Displacement_maps). Some computer games (e.g. [*Messiah*](/source/Messiah_(video_game))) have used this technique. The original [*Quake* software engine](/source/Quake_engine) used on-the-fly baking to combine light maps and colour maps in a process called *surface caching*.

Baking can be used as a form of [level of detail](/source/Level_of_detail_(computer_graphics)) generation, where a complex scene with many different elements and materials may be approximated by a single element with a single texture, which is then algorithmically reduced for lower rendering cost and fewer [drawcalls](/source/Drawcalls). It is also used to take high-detail models from [3D sculpting software](/source/3D_sculpting_software) and [point cloud scanning](/source/Point_cloud_scanning) and approximate them with [meshes](/source/Meshes) more suitable for realtime rendering.

## Rasterisation algorithms

Various techniques have evolved in software and hardware implementations. Each offers different trade-offs in precision, versatility, and performance.

### Affine texture mapping

Because affine texture mapping does not take into account the depth information about a polygon's vertices, where the polygon is not perpendicular to the viewer, it produces a noticeable defect, especially when rasterized as triangles.

**Affine texture mapping** linearly interpolates texture coordinates across a surface, making it the fastest form of texture mapping. Some software and hardware (such as the original [PlayStation](/source/PlayStation_(console))) [project](/source/3D_projection) vertices in 3D space onto the screen during rendering and [linearly interpolate](/source/Linear_interpolation) the texture coordinates *in screen space* between them. This may be done by incrementing [fixed-point](/source/Fixed_point_arithmetic) [UV coordinates](/source/UV_coordinates) or by an [incremental error algorithm](/source/Incremental_error_algorithm) akin to [Bresenham's line algorithm](/source/Bresenham's_line_algorithm).

In contrast to perpendicular polygons, this leads to noticeable distortion with perspective transformations (as shown in the figure: the checker box texture appears bent), especially as primitives near the [camera](/source/3d_camera_coordinate_system). This distortion can be reduced by subdividing polygons into smaller polygons.

Using quad primitives for rectangular objects can look less incorrect than if those rectangles were split into triangles. However, since interpolating four points adds complexity to the rasterization, most early implementations preferred triangles only. Some hardware, such as the [forward texture mapping](#Forward_texture_mapping) used by the Nvidia [NV1](/source/NV1), offered efficient quad primitives. With perspective correction, triangles become equivalent to quad primitives and this advantage disappears.

For rectangular objects, especially when perpendicular to the view, linearly interpolating across a quad can give an affine result that is superior to the same rectangle split into two affine triangles.

For rectangular objects that are at right angles to the viewer (like floors and walls), the perspective only needs to be corrected in one direction across the screen rather than both. The correct perspective mapping can be calculated at the left and right edges of the floor. Affine linear interpolation across that horizontal span will look correct because every pixel along that line is the same distance from the viewer.

### Perspective correctness

**Perspective correct texturing** accounts for the vertices' positions in 3D space rather than simply interpolating coordinates in 2D screen space.[11] While achieving the correct visual effect, perspective correct texturing is more expensive to calculate.[11]

To perform perspective correction of the texture coordinates u {\displaystyle u} and v {\displaystyle v} , with z {\displaystyle z} being the depth component from the viewer's point of view, it is possible to take advantage of the fact that the values 1 z {\displaystyle {\frac {1}{z}}} , u z {\displaystyle {\frac {u}{z}}} , and v z {\displaystyle {\frac {v}{z}}} are linear in screen space across the surface being textured. In contrast, the original z {\displaystyle z} , u {\displaystyle u} , and v {\displaystyle v} , before the division, are not linear across the surface in screen space. It is therefore possible to linearly interpolate these reciprocals across the surface, computing corrected values at each pixel, to produce a perspective correct texture mapping.

To do this, the reciprocals at each vertex of the geometry (three points for a triangle) are calculated. Vertex n {\displaystyle n} has reciprocals u n z n {\displaystyle {\frac {u_{n}}{z_{n}}}} , v n z n {\displaystyle {\frac {v_{n}}{z_{n}}}} , and 1 z n {\displaystyle {\frac {1}{z_{n}}}} . Then, linear interpolation can be done on these reciprocals between the n {\displaystyle n} vertices (e.g., using [barycentric coordinates](/source/Barycentric_coordinates)), resulting in interpolated values across the surface. At a given point, this yields the interpolated u i , v i {\displaystyle u_{i},v_{i}} and 1 z i {\displaystyle {\frac {1}{z_{i}}}} (reciprocal z i {\displaystyle z_{i}} ). However, as our division by z {\displaystyle z} altered their coordinate system, this u i , v i {\displaystyle u_{i},v_{i}} cannot be used as texture coordinates. To correct back to the u , v {\displaystyle u,v} space, the corrected z {\displaystyle z} is calculated by taking the reciprocal once again: z c o r r e c t = 1 1 z i {\displaystyle z_{correct}={\frac {1}{\frac {1}{z_{i}}}}} . This is then used to correct the u i , v i {\displaystyle u_{i},v_{i}} coordinates: u c o r r e c t = u i ⋅ z i {\displaystyle u_{correct}=u_{i}\cdot z_{i}} and v c o r r e c t = v i ⋅ z i {\displaystyle v_{correct}=v_{i}\cdot z_{i}} .[12]

This correction makes it so that the difference from pixel to pixel between texture coordinates is smaller in parts of the polygon that are closer to the viewer (stretching the texture wider) and is larger in parts that are farther away (compressing the texture).

Affine texture mapping directly interpolates a texture coordinate u α {\displaystyle u_{\alpha }} between two endpoints u 0 {\displaystyle u_{0}} and u 1 {\displaystyle u_{1}} : u α = ( 1 − α ) u 0 + α u 1 {\displaystyle u_{\alpha }=(1-\alpha )u_{0}+\alpha u_{1}} where 0 ≤ α ≤ 1 {\displaystyle 0\leq \alpha \leq 1} .

Perspective correct mapping interpolates after dividing by depth z {\displaystyle z} , then uses its interpolated reciprocal to recover the correct coordinate: u α = ( 1 − α ) u 0 z 0 + α u 1 z 1 ( 1 − α ) 1 z 0 + α 1 z 1 {\displaystyle u_{\alpha }={\frac {(1-\alpha ){\frac {u_{0}}{z_{0}}}+\alpha {\frac {u_{1}}{z_{1}}}}{(1-\alpha ){\frac {1}{z_{0}}}+\alpha {\frac {1}{z_{1}}}}}} 3D graphics hardware typically supports perspective correct texturing.

Various techniques have evolved for rendering texture mapped geometry into images with different quality and precision trade-offs, which can be applied to both software and hardware.

Classic software texture mappers generally only performed simple texture mapping with one lighting effect at most (typically applied through a [lookup table](/source/Lookup_table)), and the perspective correctness was about 16 times more expensive.[*[compared to?](https://en.wikipedia.org/wiki/Wikipedia:Avoid_weasel_words)*]

### Restricted camera rotation

The [*Doom* engine](/source/Doom_engine) did not permit ramped floors or slanted walls. This requires only one perspective correction per horizontal or vertical span rather than one per-pixel.

The [*Doom* engine](/source/Doom_engine) restricted the world to vertical walls and horizontal floors and ceilings, with a camera that could only rotate about the vertical axis. This meant the walls would be a constant depth coordinate along a vertical line and the floors and ceilings would have a constant depth along a horizontal line. After performing one perspective correction calculation for the depth, the rest of the line could use fast affine mapping. Some later renderers of this era simulated a small amount of camera [pitch](/source/Pitch_(orientation)) with [shearing](/source/Shear_(transformation)) which allowed the appearance of greater freedom while using the same rendering technique.

Some engines were able to render texture mapped [heightmaps](/source/Heightmaps) (e.g. [Nova Logic](/source/Nova_Logic)'s [Voxel Space](/source/Voxel_Space), and the engine for [*Outcast*](/source/Outcast_(video_game))) via [Bresenham](/source/Bresenham's_line_algorithm)-like incremental algorithms, producing the appearance of a texture mapped landscape without the use of traditional geometric primitives.[13]

### Subdivision for perspective correction

Every triangle can be further subdivided into groups of about 16 pixels in order to achieve two goals: keeping the arithmetic mill busy at all times and producing faster arithmetic results.[*[vague](https://en.wikipedia.org/wiki/Wikipedia:Vagueness)*]

#### World space subdivision

For perspective texture mapping without hardware support, a triangle is broken down into smaller triangles for rendering and affine mapping is used on them. The reason this technique works is that the distortion of affine mapping becomes much less noticeable on smaller polygons. The [Sony PlayStation](/source/Sony_PlayStation) made extensive use of this because it only supported affine mapping in hardware and had a relatively high triangle throughput compared to its peers.

#### Screen space subdivision

Screen space subdivision techniques. Top left: *Quake*-like, top right: bilinear, bottom left: const-z

Software renderers generally prefer screen subdivision because it has less overhead. Additionally, they try to do linear interpolation along a line of pixels to simplify the set-up (compared to 2D affine interpolation), thus lessening the overhead further. Another reason is that affine texture mapping does not fit into the low number of [CPU registers](/source/CPU_register) of the [x86](/source/X86) CPU; the [68000](/source/68000) and [RISC](/source/RISC) processors are much more suited for that approach.

A different approach was taken for *[Quake](/source/Quake_(video_game))*, which would calculate perspective correct coordinates only once every 16 pixels of a scanline and linearly interpolate between them, effectively running at the speed of linear interpolation because the perspective correct calculation runs in parallel on the co-processor.[14] As the polygons are rendered independently, it may be possible to switch between spans and columns or diagonal directions depending on the orientation of the [polygon normal](/source/Polygon_normal) to achieve a more constant z, but the effort seems not to be worth it.[*[original research?](https://en.wikipedia.org/wiki/Wikipedia:No_original_research)*]

#### Other techniques

One other technique is to approximate the perspective with a faster calculation, such as a polynomial. A second uses the 1 z i {\textstyle {\frac {1}{z_{i}}}} value of the last two drawn pixels to linearly extrapolate the next value. For the latter, the division is then done starting from those values so that all that has to be divided is a small remainder.[15] However, the amount of bookkeeping needed makes this technique too slow on most systems.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

A third technique, used by the [Build Engine](/source/Build_Engine) (used, most notably, in *[Duke Nukem 3D](/source/Duke_Nukem_3D)*), builds on the constant distance trick used by the *Doom* engine by finding and rendering along the line of constant distance for arbitrary polygons.

### Hardware implementations

Texture mapping hardware was originally developed for simulation (e.g. as implemented in the [Evans and Sutherland](/source/Evans_and_Sutherland) ESIG and Singer-Link Digital Image Generators DIG) and professional [graphics workstations](/source/Graphics_workstation) (such as [Silicon Graphics](/source/Silicon_Graphics)) and broadcast [digital video effects](/source/Digital_video_effect) machines such as the [Ampex ADO](/source/Ampex_ADO). Texture mapping hardware later appeared in [arcade cabinets](/source/Arcade_cabinet), consumer [video game consoles](/source/Video_game_console), and PC [video cards](/source/Video_card) in the mid-1990s.

In [flight simulations](/source/Flight_simulation), texture mapping provided important motion and altitude cues necessary for pilot training not available on untextured surfaces. Additionally, texture mapping was implemented so that real-time processing of prefiltered texture patterns stored in memory could be accessed by the video processor in real-time.[16]

Modern [graphics processing units](/source/Graphics_processing_unit) (GPUs) provide specialised [fixed function units](/source/Fixed_function_unit) called *texture samplers*, or *[texture mapping units](/source/Texture_mapping_unit)*, to perform texture mapping, usually with [trilinear filtering](/source/Trilinear_filtering) or better multi-tap [anisotropic filtering](/source/Anisotropic_filtering) and hardware for decoding specific formats such as [DXTn](/source/DXTn). As of 2016, texture mapping hardware is ubiquitous as most [SOCs](/source/System_on_a_chip) contain a suitable GPU.

Some hardware implementations combine texture mapping with [hidden-surface determination](/source/Hidden-surface_determination) in [tile-based deferred rendering](/source/Tile-based_deferred_rendering) or [scanline rendering](/source/Scanline_rendering); such systems only fetch the visible [texels](/source/Texels) at the expense of using greater workspace for transformed vertices. Most systems have settled on the [z-buffering](/source/Z-buffering) approach, which can still reduce the texture mapping workload with front-to-back [sorting](/source/Sorting_algorithm).

On earlier graphics hardware, there were two competing paradigms of how to deliver a texture to the screen:

1. Forward texture mapping iterates through each texel on the texture and decides where to place it on the screen.

1. Inverse texture mapping instead iterates through pixels on the screen and decides what texel to use for each.

Of these methods, inverse texture mapping has become standard in modern hardware.

#### Inverse texture mapping

With this method, a pixel on the screen is mapped to a point on the texture. Each vertex of a [rendering primitive](/source/Rendering_primitive) is projected to a point on the screen, and each of these points is [mapped to a u,v texel coordinate](/source/UV_mapping) on the texture. A rasterizer will interpolate between these points to fill in each pixel covered by the primitive.

The primary advantage of this method is that each pixel covered by a primitive will be traversed exactly once. Once a primitive's vertices are transformed, the amount of remaining work scales directly with how many pixels it covers on the screen.

The main disadvantage is that the [memory access pattern](/source/Memory_access_pattern) in the [texture space](/source/Texture_space) will not be linear if the texture is at an angle to the screen. This disadvantage is often addressed by [texture caching](/source/Texture_cache) techniques, such as the [swizzled texture](/source/Swizzled_texture) memory arrangement.

The linear interpolation can be used directly for simple and efficient [affine texture mapping](#Affine_texture_mapping), but can also be adapted for [perspective correctness](#Perspective_correctness).

#### Forward texture mapping

Forward texture mapping maps each texel of the texture to a pixel on the screen. After transforming a rectangular primitive to a place on the screen, a forward texture mapping renderer iterates through each texel on the texture, [splatting](/source/Texture_splatting) each one onto a pixel of the [frame buffer](/source/Frame_buffer). This was used by some hardware, such as the [3DO](/source/3DO), the [Sega Saturn](/source/Sega_Saturn) and the [NV1](/source/NV1).

The primary advantage is that the texture will be accessed in a simple linear order, allowing very efficient caching of the texture data. However, this benefit is also its disadvantage: as a primitive gets smaller on screen, it still has to iterate over every texel in the texture, causing many pixels to be overdrawn redundantly.

This method is also well suited for rendering quad primitives rather than reducing them to triangles, which provided an advantage when perspective correct texturing was not available in hardware. This is because the affine distortion of a quad looks less incorrect than the same quad split into two triangles (see the [§ Affine texture mapping](#Affine_texture_mapping) section above). The NV1 hardware also allowed a quadratic interpolation mode to provide an even better approximation of perspective correctness.

[UV mapping](/source/UV_mapping) became an important technique for 3D modelling and assisted in [clipping](/source/Clipping_(computer_graphics)) the texture correctly when the primitive went past the edge of the screen, but existing hardware did not provide effective implementations of this. These shortcomings could have been addressed with further development, but GPU design has mostly shifted toward using the inverse mapping technique.

## Applications

Beyond 3D rendering, the availability of texture mapping hardware has inspired its use for accelerating other tasks:

### Tomography

It is possible to use texture mapping hardware to accelerate both the [reconstruction](/source/Tomographic_reconstruction) of [voxel](/source/Voxel) data sets from [tomographic scans](/source/Tomography), and to [visualize the results](/source/Volume_rendering).[17]

### User interfaces

Many user interfaces use texture mapping to accelerate animated transitions of screen elements, e.g. [Exposé](/source/Mission_Control_(macOS)) in [Mac OS X](/source/Mac_OS_X).

## See also

- [2.5D](/source/2.5D)

- [3D computer graphics](/source/3D_computer_graphics)

- [Mipmap](/source/Mipmap)

- [Materials system](/source/Materials_system)

- [Parametrization](/source/Parametrization_(geometry))

- [Shader](/source/Shader)

- [Texture synthesis](/source/Texture_synthesis)

- [Texture atlas](/source/Texture_atlas)

- [Texture splatting](/source/Texture_splatting) – a technique for combining textures

- [Timeline of early 3D computer graphics hardware](/source/Timeline_of_early_3D_computer_graphics_hardware)

## References

1. **[^](#cite_ref-1)** Wang, Huamin. ["Texture Mapping"](https://web.archive.org/web/20160304074441/http://web.cse.ohio-state.edu/~whmin/courses/cse5542-2013-spring/15-texture.pdf) (PDF). *department of Computer Science and Engineering*. [Ohio State University](/source/Ohio_State_University). Archived from [the original](http://web.cse.ohio-state.edu/~whmin/courses/cse5542-2013-spring/15-texture.pdf) (PDF) on 2016-03-04. Retrieved 2016-01-15.

1. **[^](#cite_ref-2)** ["Texture Mapping"](https://www.inf.pucrs.br/flash/tcg/aulas/texture/texmap.pdf) (PDF). *www.inf.pucrs.br*. [Archived](https://web.archive.org/web/20190819094318/http://www.inf.pucrs.br/flash/tcg/aulas/texture/texmap.pdf) (PDF) from the original on August 19, 2019. Retrieved September 15, 2019.

1. **[^](#cite_ref-3)** ["CS 405 Texture Mapping"](https://www.cs.uregina.ca/Links/class-info/405/WWW/Lab5/#References). *www.cs.uregina.ca*. Retrieved 22 March 2018.

1. **[^](#cite_ref-Catmull_thesis_4-0)** [Catmull, E.](/source/Edwin_Catmull) (1974). [*A subdivision algorithm for computer display of curved surfaces*](https://web.archive.org/web/20141114173944/http://www.pixartouchbook.com/storage/catmull_thesis.pdf) (PDF) (PhD thesis). University of Utah. Archived from [the original](http://www.pixartouchbook.com/storage/catmull_thesis.pdf) (PDF) on 2014-11-14. Retrieved 2015-09-03.

1. **[^](#cite_ref-5)** Fosner, Ron (January 1999). ["DirectX 6.0 Goes Ballistic With Multiple New Features And Much Faster Code"](https://web.archive.org/web/20161031110040/http://www.microsoft.com/msj/0199/direct3d/direct3d.aspx). *Microsoft.com*. Archived from [the original](http://www.microsoft.com/msj/0199/direct3d/direct3d.aspx) on October 31, 2016. Retrieved September 15, 2019.

1. **[^](#cite_ref-6)** Hvidsten, Mike (Spring 2004). ["The OpenGL Texture Mapping Guide"](https://web.archive.org/web/20190523063623/http://homepages.gac.edu/~hvidsten/courses/MC394/projects/project5/texture_map_guide.html). *homepages.gac.edu*. Archived from [the original](http://homepages.gac.edu/~hvidsten/courses/MC394/projects/project5/texture_map_guide.html) on 23 May 2019. Retrieved 22 March 2018.

1. **[^](#cite_ref-7)** Jon Radoff, Anatomy of an MMORPG, ["Anatomy of an MMORPG"](http://radoff.com/blog/2008/08/22/anatomy-of-an-mmorpg/). *radoff.com*. August 22, 2008. [Archived](https://web.archive.org/web/20091213053756/http://radoff.com/blog/2008/08/22/anatomy-of-an-mmorpg/) from the original on 2009-12-13. Retrieved 2009-12-13.

1. **[^](#cite_ref-8)** Roberts, Susan. ["How to use textures"](https://web.archive.org/web/20210924034033/https://freeassetsunity.com/how-to-use-textures/). Archived from the original on 24 September 2021. Retrieved 20 March 2021.

1. **[^](#cite_ref-9)** Blythe, David. *[Advanced Graphics Programming Techniques Using OpenGL](https://web.archive.org/web/20200228185024/https://pdfs.semanticscholar.org/fc76/bb3649978a1939d9bd9d9d3769f47ebfc6c1.pdf).* Siggraph 1999. ([PDF](/source/PDF)) (see: [Multitexture](https://web.archive.org/web/20120108033621/http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node60.html))

1. **[^](#cite_ref-10)** [Real-Time Bump Map Synthesis](https://web.archive.org/web/20150914190914/http://web4.cs.ucl.ac.uk/staff/j.kautz/publications/rtbumpmapHWWS01.pdf), Jan Kautz1, Wolfgang Heidrichy2 and Hans-Peter Seidel1, (1Max-Planck-Institut für Informatik, 2University of British Columbia)

1. ^ [***a***](#cite_ref-NGen15_11-0) [***b***](#cite_ref-NGen15_11-1) ["The Next Generation 1996 Lexicon A to Z: Perspective Correction"](https://archive.org/details/nextgen-issue-015/page/n39/mode/2up). *[Next Generation](/source/Next_Generation_(magazine))*. No. 15. [Imagine Media](/source/Imagine_Media). March 1996. p. 38.

1. **[^](#cite_ref-12)** Kalms, Mikael (1997). ["Perspective Texturemapping"](https://www.lysator.liu.se/~mikaelk/doc/perspectivetexture/). *www.lysator.liu.se*. [Archived](https://web.archive.org/web/20200214121149/http://www.lysator.liu.se/~mikaelk/doc/perspectivetexture/) from the original on 2020-02-14. Retrieved 2020-03-27.

1. **[^](#cite_ref-13)** "[Voxel terrain engine](https://web.archive.org/web/20131113094653/http://www.codermind.com/articles/Voxel-terrain-engine-building-the-terrain.html)", introduction. In a coder's mind, 2005 (archived 2013).

1. **[^](#cite_ref-14)** Abrash, Michael. *Michael Abrash's Graphics Programming Black Book Special Edition.* The Coriolis Group, Scottsdale Arizona, 1997. [ISBN](/source/ISBN_(identifier)) [1-57610-174-6](https://en.wikipedia.org/wiki/Special:BookSources/1-57610-174-6) ([PDF](http://www.gamedev.net/reference/articles/article1698.asp) [Archived](https://web.archive.org/web/20070311022026/http://www.gamedev.net/reference/articles/article1698.asp) 2007-03-11 at the [Wayback Machine](/source/Wayback_Machine)) (Chapter 70, pg. 1282)

1. **[^](#cite_ref-15)** [US 5739818](https://worldwide.espacenet.com/textdoc?DB=EPODOC&IDX=US5739818), Spackman, John Neil, "Apparatus and method for performing perspectively correct interpolation in computer graphics", issued 1998-04-14

1. **[^](#cite_ref-16)** Yan, Johnson (August 1985). "Advances in Computer-Generated Imagery for Flight Simulation". *IEEE Computer Graphics and Applications*. **5** (8): 37–51. [doi](/source/Doi_(identifier)):[10.1109/MCG.1985.276213](https://doi.org/10.1109%2FMCG.1985.276213).

1. **[^](#cite_ref-17)** ["texture mapping for tomography"](https://patents.google.com/patent/US6002738). [Archived](https://web.archive.org/web/20240816214348/https://patents.google.com/patent/US6002738) from the original on 2024-08-16. Retrieved 2024-06-08.

## Software

- [TexRecon](https://www.gcc.tu-darmstadt.de/home/proj/texrecon/index.en.jsp). [Archived](https://web.archive.org/web/20211127121726/https://www.gcc.tu-darmstadt.de/home/proj/texrecon/index.en.jsp) 2021-11-27 at the [Wayback Machine](/source/Wayback_Machine). Open-source software for texturing 3D models written in C++.

## External links

- [Introduction into texture mapping using C and SDL](http://www.decew.net/OSS/References/chapter_2_texture_mapping.pdf) (PDF)

- [Programming a textured terrain](https://web.archive.org/web/20190103234143/http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Textured_terrain.php) using XNA/DirectX, from www.riemers.net

- [Perspective correct texturing](https://www.gamers.org/dEngine/quake/papers/checker_texmap.html)

- [Time Texturing](https://web.archive.org/web/20071226193904/http://www.fawzma.com/time-texturing-texture-mapping-with-bezier-lines/) – texture mapping with bezier lines

- [Polynomial Texture Mapping](http://www.hpl.hp.com/research/ptm/). [Archived](https://web.archive.org/web/20190307055738/http://www.hpl.hp.com/research/ptm/) 2019-03-07 at the [Wayback Machine](/source/Wayback_Machine) – Interactive Relighting for Photos.

- [3 Métodos de interpolación a partir de puntos (in Spanish)](https://www.um.es/geograf/sigmur/temariohtml/node43_ct.html) – texture interpolation methods used when the texture coords at polygon vertices are known

- [3D Texturing Tools](https://cgifurniture.com/3d-texturing-tools-top-10/)

v t e Texture mapping techniques Local Displacement mapping Normal mapping Parallax mapping UV mapping UVW mapping Relief mapping Alpha mapping Bump mapping Occlusion mapping Specular mapping Environment Cube mapping Sphere mapping Environment mapping

---
Adapted from the Wikipedia article [Texture mapping](https://en.wikipedia.org/wiki/Texture_mapping) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Texture_mapping?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
