Version: Unity 6 Preview (6000.0)
Language : English
Texture arrays
Create a texture array

Introduction to texture arrays

A texture array is a collection of same size/format/flags 2D textures that look like a single object to the GPU, and can be sampled in the shaderA program that runs on the GPU. More info
See in Glossary
with a texture element index. They are useful for implementing custom terrainThe landscape in your scene. A Terrain GameObject adds a large flat plane to your scene and you can use the Terrain’s Inspector window to create a detailed landscape. More info
See in Glossary
rendering systems or other special effects where you need an efficient way of accessing many textures of the same size and format. Elements of a 2D texture array are also known as slices, or layers.

The source texture files for 2D Array and 3D Textures are divided into cells; these textures are called flipbook textures. When Unity imports flipbook textures, it places the contents of each cell into its own 2D array layer or 3D texture slice.

For example, an image with 8x8 cells of smoke effect frames looks like this as a default 2D texture:

Flipbook image as a 2D shape
Flipbook image as a 2D shape

But when you correctly import is as a 3D texture with 8 Columns and 8 Rows, it looks like this:

Flipbook image as a 3D shape
Flipbook image as a 3D shape

Platform Support

Texture arrays need to be supported by the underlying graphics API and the GPU. They are available on:

  • Direct3D 11/12 (Windows)
  • OpenGL Core (Mac OS X, Linux)
  • Metal (iOS, Mac OS X)
  • OpenGL ES 3.0 (Android, WebGL 2.0)

Some platforms don’t support texture arrays. Use SystemInfo.supports2DArrayTextures to determine texture array support at runtime.

Texture arrays
Create a texture array