Class Texture2DAtlas
A generic Atlas texture of 2D textures. An atlas texture is a texture collection that collects multiple sub-textures into a single big texture. Sub-texture allocation for Texture2DAtlas is static and will not change after initial allocation. Does not add mipmap padding for sub-textures.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public class Texture2DAtlas
Constructors
Name | Description |
---|---|
Texture2DAtlas(int, int, GraphicsFormat, FilterMode, bool, string, bool) | Creates a new empty texture atlas. |
Properties
Name | Description |
---|---|
AtlasTexture | Handle to the texture of the atlas. |
maxMipLevelPadding | Maximum mip padding (pow2) that can be applied to the textures in the atlas |
Methods
Name | Description |
---|---|
AddTexture(CommandBuffer, ref Vector4, Texture) | Add a texture into the atlas. |
AllocateTexture(CommandBuffer, ref Vector4, Texture, int, int, int) | Allocate space from the atlas for a texture and copy texture contents into the atlas. |
AllocateTextureWithoutBlit(int, int, int, ref Vector4) | Allocate space from the atlas for a texture. |
AllocateTextureWithoutBlit(Texture, int, int, ref Vector4) | Allocate space from the atlas for a texture. |
BlitCubeTexture2D(CommandBuffer, Vector4, Texture, bool, int) | Blit and project Cube texture into a 2D texture in the atlas. |
BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, bool, int) | Blit octahedral texture into the atlas. |
BlitTexture(CommandBuffer, Vector4, Texture, Vector4, bool, int) | Blit 2D texture into the atlas. |
ClearTarget(CommandBuffer) | Clear atlas texture. |
GetTextureID(Texture) | Get sub-texture ID for the atlas. |
GetTextureID(Texture, Texture) | Get sub-texture ID for the atlas. |
IsCached(out Vector4, int) | Check if the atlas contains the texture. |
IsCached(out Vector4, Texture) | Check if the atlas contains the textures. |
IsCached(out Vector4, Texture, Texture) | Check if the atlas contains the textures. |
NeedsUpdate(Texture, bool) | Check if contents of a texture needs to be updated in the atlas. |
NeedsUpdate(Texture, Texture, bool) | Check if contents of a texture needs to be updated in the atlas. |
Release() | Release atlas resources. |
ResetAllocator() | Clear atlas sub-texture allocations. |
UpdateTexture(CommandBuffer, Texture, Texture, ref Vector4, Vector4, bool, bool) | Update a texture in the atlas. |
UpdateTexture(CommandBuffer, Texture, ref Vector4, bool, bool) | Update a texture in the atlas. |