Graphics‎ > ‎3D‎ > ‎


Every game needs a crate texture

Early on textures was simply mapped onto the polygons. Then with the use of multiple textures one could started to blend them in the fixed function pipeline. Now with shaders textures are not so much specific images but rather data that one needs to pick and choose how to use them in the shader. For the details on how textures are used and abused look in the Material section.

Texture Dimension
A texture can be in one-, two-, or three-dimensions. A 2D texture is a image, a 3D texture is a volume and a 1D texture is like a gradient. Each element in the texture is called a texel and to select a texel one use coordinates of the same dimension as the texture. The coordinates normally go from 0 to 1 so [0.5,0.5] is in the middle of a 2D texture. Getting the texel from the texture with a coordinate is called sampling the texture.

Texture Size
The size of the texture is how big each dimension is in number of texel's. It's common for sizes to be power of two (64,128,256,512,...) as graphic cards liked it best that way. The size in all the dimensions does not need to be the same. The max size supported depends on the graphic card and available memory. One solution to large textures is to use Virtual Texture that are not all loaded at the same time.

Texture Format
The format of a texture describe what data each texel contain.
Filtering and Mip Map's
Say there is a textured surface on the screen where each texel is covering one pixel. If the surface move closer each texel with start to cover more then one pixel, known as texture magnification. If the surface move away there will be more then one texel inside each pixel, known as texture minification. In each of these cases a filtering function is used to select what the color of the texel that is sampled from the texture will be. The visual quality can be improved with mipmaps. A mipmap for a texture is a chain of down sampled images of the texture. So a 256x256 texture have mipmaps of size 128x128,64x64,32x32 and so on. When trying to sample a texture the mipmap is first selected depending on the distance to the surface drawn and then the mipmap is sampled with the filter functions. Mipmaps only affect minification.

Texture filtering
    • Nearest: Takes the texel closest to the ones that we try to sample. Creates a Minecraft style blocky pixel effect during magnification.
    • Bilinear: Take the four nearest texels to the part we try to sample and combine them.
    • Trilinear: Select the two closest mipmaps and sample them both with bilinear filtering. The two values are then interpolated for the final result.
    • Anisotropic:

    Cube Maps


    Compressonator - 2017
    The Implementation Of A Scalable Texture Cache - 2017
    Mesh Color Textures  - 2017
    Rethinking Texture Mapping course notes  - 2017
    The Next Frontier of Texturing Workflows - 2016
    Texture formats for 2D games, part 1 - 2015
    Texture formats for 2D games, part 2: Palettes - 2015
    Texture formats for 2D games, part 3: DXT and PVRTC - 2015
    Texture formats for 2D games, part 4: Overview - 2015
    Texture atlases, wrapping and mip mapping - 2013
    Advanced Terrain Texture Splatting - 2013
    A Closer Look At Parallax Occlusion Mapping  - 2013
    A Closer Look At Parallax Occlusion Mapping - 2013
    Applying Sampling Theory To Real-Time Graphics - 2012
    Textures : can we cheat ? - 2011
    Tech Feature: Fractals and noise - 2010
    Normal Maps and Cube Maps For Everyone - 2008
    Reference Guide For the Beginner Artist - 2008
    Texture Generation using Random Noise - 2007
    The Art of Texturing Using The OpenGL Shading Language - 2005
    Texture Splatting in Direct3D - 2005
    Normal Mapping

    Subpages (2): Mapping Virtual Texture