TextureArray

    Array of textures stored in a single primitive.

    s store an array of s in a single Texture primitive. Each layer of the texture array has its own mipmap chain. This makes it is a good alternative to texture atlases. See also .

    Set the integer uniform “index” to show a particular part of the texture as defined by the Horizontal and Vertical Slices in the importer.

    Note: When sampling an albedo texture from a texture array in 3D, the sRGB -> linear conversion hint (hint_albedo) should be used to prevent colors from looking washed out:

    1. uniform int index;
    2. void fragment() {
    3. ALBEDO = texture(tex, vec3(UV.x, UV.y, float(index)));
    4. }