class in UnityEngine
/
Inherits from:Texture
/
Implemented in:UnityEngine.CoreModule
Suggest a change Success!Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Close Submission failedFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close Your name Your email Suggestion* Switch to Manual3D textures are commonly used as lookup tables by shaders, or to represent volumetric data.
Typically you'd create a 3D texture, fill it up with data (SetPixels or SetPixels32) and call Apply to upload the data to the GPU.
Note that this class does not support Texture3D creation with a Crunch compression TextureFormat.
Properties Property Description depth The depth of the texture (Read Only). format The format of the pixel data in the texture (Read Only). Constructors Constructor Description Texture3D Create a new empty 3D Texture. Public Methods Method Description Apply Copies changes you've made in a CPU texture to the GPU. CopyPixels Copies pixel data from another texture on the CPU. GetPixel Gets the pixel color at coordinates (x, y, z). GetPixelBilinear Gets the filtered pixel color at the normalized coordinates (u, v, w). GetPixelData Gets the raw data from a texture. GetPixels Gets the pixel color data for a mipmap level as Color structs. GetPixels32 Gets the pixel color data for a mipmap level as Color32 structs. SetPixel Sets the pixel color at coordinates (x, y, z). SetPixelData Sets the raw data of an entire mipmap level directly in CPU memory. SetPixels Sets the pixel colors of an entire mipmap level. SetPixels32 Sets the pixel colors of an entire mipmap level. UpdateExternalTexture Updates Unity texture to use different native texture object. Static Methods Method Description CreateExternalTexture Creates Unity Texture out of externally created native texture object. Inherited Members Static Properties Property Description allowThreadedTextureCreation Allow Unity internals to perform Texture creation on any thread (rather than the dedicated render thread). currentTextureMemory The amount of memory that all Textures in the scene use. desiredTextureMemory The total amount of texture memory, in bytes, that Unity would use if no constraints are 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 The number of non-streaming Textures in the scene. This includes instances of Texture2D and CubeMap Textures. This does not include any other Texture types, or 2D and CubeMap Textures that Unity creates internally. nonStreamingTextureMemory The amount of memory Unity allocates for non-streaming Textures in the scene. This only includes instances of Texture2D and CubeMap Textures. This does not include any other Texture types, or 2D and CubeMap Textures that Unity creates internally. 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 This property forces the streaming Texture system to discard all unused mipmaps instead of caching them until the Texture memory budget is exceeded. This is useful when you profile or write tests to keep a predictable set of Textures in memory. 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 Total texture memory usage in bytes after applying the memory budget and loading all textures. totalTextureMemory The total texture memory, in bytes, that Unity would use if all textures are loaded at full resolution. Properties Property Description hideFlags Should the object be hidden, saved with the Scene or modifiable by the user? name The name of the object. anisoLevel Defines the anisotropic filtering level of the Texture. dimension Dimensionality (type) of the Texture (Read Only). filterMode Filtering mode of the Texture. graphicsFormat Returns the GraphicsFormat format or color format of a Texture object. graphicsTexture GraphicsTexture that represents the texture resource uploaded to the graphics device (read-only). height Height of the Texture in pixels (Read Only). imageContentsHash The hash value of the Texture. isDataSRGB Returns true if the texture pixel data is in sRGB color space (Read Only). isReadable Whether Unity stores an additional copy of this texture's pixel data in CPU-addressable memory. mipMapBias The mipmap bias of the Texture. mipmapCount How many mipmap levels are in this Texture (Read Only). updateCount This counter is incremented when the Texture is updated. width Width of the Texture in pixels (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. Operators Operator Description bool Does the object exist? operator != Compares if two objects refer to a different object. operator == Compares two object references to see if they refer to the same object.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4