taskforce

2024.05 - Texture Arrays — The Forgotten Tool

May 1, 2024 · 2 min read

Texture arrays are the forgotten tool. If your pipeline is "new skin = new material + new texture bindings", you're paying for it in state changes and CPU work. The GPU hates it. The CPU hates it.

And please stop asking "texture arrays vs atlases?" That's like kidneys vs liver. Different jobs. You can combine them.

Quick win you can steal right now:

  • Unity import: take your grid texture (example: 2 columns x 2 rows), set Texture Shape = 2D Array, set columns/rows, hit Apply.
  • Shader Graph: make a Texture2D Array property, sample it with Sample Texture 2D Array, expose a Base Texture Index (slider is fine) into the node's Index.
  • Result: you change one number and the skin swaps. No runtime texture rebinding gymnastics.
Unity: swapping the skin by changing a BaseTextureIndex on a texture array material.

This is why this is so good for avatar configurators: store the index (an int) and you're done.

Now the sanity check. Because yes, it feels like magic at first.

  • RenderDoc: capture a frame, open Texture Viewer, find the draw under opaque objects (alpha clipping still counts as opaque), then use the Slice/Face selector to flip through the array layers.
  • API Inspector: you can see the array being bound as a pixel shader resource (PS Set Shader Resources).
RenderDoc: the Texture Viewer shows a texture array with a Slice selector.

Performance reality check:

  • Mali Offline Compiler: sampling a texture array once came out virtually the same as sampling a plain texture in this test. Sample twice and texture fetch cost scales. You pay for samples.
  • VRAM rule: the whole array is resident in VRAM. But you don't pay bandwidth for slices you never sample.

This page is a tiny preview. The members-only section below is the full step-by-step module (4 lessons) plus the full video and resources, so you can stop guessing and start measuring.

CEO/Producer translation: fewer pipeline headaches, less runtime fiddling, and a cleaner way to ship lots of variants without making rendering fragile.

In this module:

Join to unlock the full module, audio, and resources.