Class for handling Sparse Textures.
Sparse Textures son texturas dónde no toda la información de texturas puede ser presentada en la memoria de una. Ellas también son comúnmente llamadas "tiled textures" o "mega textures".
Imagínese una textura 16384x16384 en 32 bits por píxel - tomaría 1GB de memoria. La textura es rota en "tiles" rectangulares, y cada baldosa(tile) puede estar presente en la memoria o no. Usted puede cargar y descargar estas baldosas(tiles) como sea necesario basado en la distancia desde la cámara, sectores del mundo que el jugador tiene que ver, etc.
De otra manera, las sparse texturas se comportan como cualquier otra textura en sombreadores - ellas pueden tener mimaps, pueden utilizar todos los modos de filtración de textura, etc. Si a usted le toca leer de una baldosa que no está presente, usted puede obtener un resultado indefinido (en la mayoría de GPUs el resultado es un color negro, pero eso no es garantizado).
Not all hardware and platforms support sparse textures, so you should check SystemInfo.supportsSparseTextures before using them. For example, on DirectX systems they require DX11.2 (Windows 8.1) and a fairly recent GPU; and on OpenGL they require ARB_sparse_texture extension support. Sparse textures only support non-compressed texture formats.
After creating the sparse texture, query the tile size with tileWidth & tileHeight. Tile sizes are platform and GPU dependent.
Use UpdateTile or UpdateTileRaw to make a tile resident in memory and update its color data. Use UnloadTile to unload a tile.
See Also: Sparse Textures.
isCreated | Is the sparse texture actually created? (Read Only) |
tileHeight | Get sparse texture tile height (Read Only). |
tileWidth | Get sparse texture tile width (Read Only). |
SparseTexture | Create a sparse texture. |
UnloadTile | Unload sparse texture tile. |
UpdateTile | Update sparse texture tile with color values. |
UpdateTileRaw | Update sparse texture tile with raw pixel values. |
allowThreadedTextureCreation | Allow texture creation to occur on any thread (rather than the dedicated render thread). |
currentTextureMemory | The amount of memory currently being used by textures. |
desiredTextureMemory | This amount of texture memory would be used before the texture streaming budget is applied. |
GenerateAllMips | Can be used with texture constructors that take a mip count to indicate that all mips should be generated. The value of this field is -1. |
nonStreamingTextureCount | Number of non-streaming textures. |
nonStreamingTextureMemory | Total amount of memory being used by non-streaming textures. |
streamingMipmapUploadCount | How many times has a texture been uploaded due to texture mipmap streaming. |
streamingRendererCount | Number of renderers registered with the texture streaming system. |
streamingTextureCount | Number of streaming textures. |
streamingTextureDiscardUnusedMips | Force the streaming texture system to discard all unused mipmaps immediately, rather than caching them until the texture memory budget is exceeded. |
streamingTextureForceLoadAll | Force streaming textures to load all mipmap levels. |
streamingTextureLoadingCount | Number of streaming textures with mipmaps currently loading. |
streamingTexturePendingLoadCount | Number of streaming textures with outstanding mipmaps to be loaded. |
targetTextureMemory | The amount of memory used by textures after the mipmap streaming and budget are applied and loading is complete. |
totalTextureMemory | The total amount of memory that would be used by all textures at mipmap level 0. |
hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
name | El nombre del objeto. |
anisoLevel | Nivel de filtrado anisotrópico de la textura. |
dimension | Dimensionalidad (tipo) de la textura (lectura solamente). |
filterMode | Modo de filtrado de la textura. |
graphicsFormat | Returns the GraphicsFormat format or color format of a texture object. |
height | Altura de la textura en pixels. (Read Only) |
imageContentsHash | The hash value of the Texture. |
isReadable | Returns true if the Read/Write Enabled checkbox was checked when the texture was imported; otherwise returns false. For a dynamic Texture created from script, always returns true. For additional information, see TextureImporter.isReadable. |
mipMapBias | Mip map bias de la textura. |
mipmapCount | Cuántos niveles de mipmap hay en esta textura (Lectura solamente)? |
updateCount | This counter is incremented when the texture is updated. |
width | Anchura de la textura en píxeles. (Read Only) |
wrapMode | Texture coordinate wrapping mode. |
wrapModeU | Texture U coordinate wrapping mode. |
wrapModeV | Texture V coordinate wrapping mode. |
wrapModeW | Texture W coordinate wrapping mode for Texture3D. |
GetInstanceID | Devuelve el id de la instancia del objeto. |
ToString | Returns the name of the object. |
GetNativeTexturePtr | Recupere un puntero nativo (API de gráficos subyacente) al recurso de textura. |
IncrementUpdateCount | Increment the update counter. |
Destroy | Removes a GameObject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
FindObjectOfType | Devuelve el primer objeto activo cargado de tipo type. |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | Clona el objeto original y devuelve el clon. |
SetGlobalAnisotropicFilteringLimits | Establece límites anisotrópicos. |
SetStreamingTextureMaterialDebugProperties | Uploads additional debug information to materials using textures set to stream mip maps. |
bool | ¿Existe el objeto? |
operator != | Compare si dos objetos se refieren a un objeto diferente. |
operator == | Compara dos referencias de objeto para ver si se refieren al mismo objeto. |