Using Texture Atlases

To reduce draw calls, you can add individual textures to a texture atlas and then add one or more texture atlases to a UI canvas.

Characteristics

UI canvases and texture atlases have the following characteristics:

  • Each UI canvas contains a list of texture atlases to be loaded.
  • Texture atlases are loaded when the UI canvas loads. They’re unloaded when the UI canvas unloads.
  • If multiple UI canvases load the same texture atlas, the texture atlas is loaded only once.
  • UI elements that render textures preferentially use textures from a loaded texture atlas, if available.
  • The texture atlas is only unloaded when all UI canvases that loaded it are unloaded.

Advantages

The principle advantages of texture atlases are the following:

  • Draw calls are significantly reduced.
  • Enhanced compression. Although source textures whose dimensions aren’t multiples of four aren’t compressed, texture atlases are always compressed.
  • Forced preloading of texture groups. When the canvas loads, it also loads its texture atlases.

To see examples of texture atlases, open the UITextureAtlasSample level in the O3DE SamplesProject.


Copyright © 2022 Open 3D Engine Contributors

Documentation Distributed under CC BY 4.0.
For our trademark, privacy and antitrust policies, code of conduct, and terms of use, please click the applicable link below or see https://www.lfprojects.org.


The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.