FREE TRIAL

|

☀
☾
enum

ImagePackMode

Specifies how the Nova Engine should store and attempt to batch a given texture.

Fields

Name Description
Packed

Store the texture with other compatible textures (compatible being determined by texture format, mips, dimensions, etc.).
Packed textures can be batched, potentially leading to many fewer draw calls than if all textures were Unpacked.

Unpacked

Store the texture by itself. Useful if the underlying texture's content changes regularly (such as for a video player) or if Packed causes visual artifacts. An unpacked texture will be rendered in its own draw call.

See Also
UIBlock2D.ImagePackMode
NovaSettings.PackedImagesEnabled

Packed Images

Under the hood, a packed image texture is stored in a Texture2DArray along with other packed textures with matching:

  • Dimensions
  • Format (see TextureFormat)
  • Mip Count

For sprites, these criteria apply to the underlying texture, not necessarily the individual sprite itself.

Here are a few things to considered when selecting ImagePackMode, as using the feature may require making some informed tradeoffs:

Consideration Drawback Explanation
Memory Usage Draw Calls vs. VRAM Packing images reduces the number of draw calls at the cost of increased VRAM usage, as a copy of every texture must be stored in the Texture2DArray.
Dynamic Textures Incompatible Any changes to the contents of a texture (for example, due to a call to SetPixels or modifications in a native plugin) will not be applied to the Texture2DArray.
Tiling Incompatible The Texture2DArray for packed images is always created with wrapMode set to Clamp.
Note

RenderTextures are never packed.

☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC