Game Development

Materials vs Textures vs Shaders

May 19, 2019

In the game development space, you may find the terms materials and textures used interchangeably. “These textures look great!”, “Cool shaders!”, and “That material looks really realistic!” are common remarks from casual gamers. But what exactly is the difference? Are materials and textures really the same thing?

Textures

A texture is simply an image; no more, no less. There are actually many different types of textures. An albedo, or “color” texture, actually has the color. For example, a picture of bark or grass. A height map is usually a greyscale image of the height, like a topographical map. There is nothing special about a texture other than it’s content; any image file can be a texture.

Materials and Shaders

Contrary to a texture, a material is a collection of many textures, as well as other data like 2D tiling vectors, and a shader. A material is what actually gets applied to the geometry of a model, like a house or apple. If you think of a material in the terms of input and outputs, it makes more sense. Textures go in to the shader, the shader outputs what the surface looks like, and the material holds all the data together.

A material in Unity3D using the Standard shader

The shader takes all of this data and outputs a “material” that gets applied to the surface of any object.