Skip to content

Texture2DArray (T2DA)

One of APLM’s central design decisions is the use of Texture2DArray (T2DA) assets instead of individual Texture2D samples. A T2DA packs multiple texture slices into a single GPU resource. The material can then sample BaseColor, Normal, and ORD/ORH data from a single texture bind using different array indices.

Unreal Engine landscape materials are bound by the GPU’s per-shader sampler limit. A naive landscape material with twelve biomes plus six base layers, each sampling BaseColor + Normal + a packed mask, would request more samplers than most platforms allow.

By packing each surface into a single T2DA, APLM uses one sampler per surface instead of three. That is the difference between a material that compiles and one that does not.

Every T2DA in APLM uses the same slice order:

IndexSlotChannels
0BaseColorRGB
1NormalRG (DXT5n or BC5)
2ORD or ORHR = Ambient Occlusion, G = Roughness, B = Displacement or Height

ORD is for landscapes using Nanite displacement. ORH is for landscapes that are not Nanite-enabled and rely on parallax-style height blending instead.

If you swap in a new biome surface, you build a new T2DA in the same slice order and assign it to the relevant T2DA parameter in the Material Instance, for example BiomeDesertT2DA or BiomeCustom1T2DA. The material logic does not change. It just sees a different set of textures.

The full step-by-step walkthrough is in the Creating your own Texture2DArray guide.