pub struct Texture3D {Show 17 fields
pub m_DataSize: u32,
pub m_Depth: i32,
pub m_Format: i64,
pub m_Height: i32,
pub m_Name: String,
pub m_TextureSettings: GLTextureSettings,
pub m_Width: i32,
pub image_data: Option<Vec<u8>>,
pub m_ColorSpace: Option<i32>,
pub m_DownscaleFallback: Option<bool>,
pub m_ForcedFallbackFormat: Option<i32>,
pub m_IsAlphaChannelOptional: Option<bool>,
pub m_IsReadable: Option<bool>,
pub m_MipCount: Option<i32>,
pub m_MipMap: Option<bool>,
pub m_StreamData: Option<StreamingInfo>,
pub m_UsageMode: Option<i32>,
}
Expand description
Texture3D is a class of the Unity engine since version 4.0.0. Exert from Unity’s scripting documentation: Class for handling 3D Textures, Use this to create 3D texture assets. 3D 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.
Fields§
§m_DataSize: u32
§m_Depth: i32
The depth of the texture (Read Only).
m_Format: i64
The format of the pixel data in the texture (Read Only).
m_Height: i32
Height of the Texture in pixels (Read Only).
m_Name: String
The name of the object.
m_TextureSettings: GLTextureSettings
§m_Width: i32
Width of the Texture in pixels (Read Only).
image_data: Option<Vec<u8>>
Vec
m_ColorSpace: Option<i32>
i32: (2019.1.0b1 - 2022.3.2f1)
m_DownscaleFallback: Option<bool>
bool: (2017.3.0b1 - 2022.3.2f1)
m_ForcedFallbackFormat: Option<i32>
i32: (2017.3.0b1 - 2022.3.2f1)
m_IsAlphaChannelOptional: Option<bool>
bool: (2020.2.0b1 - 2022.3.2f1)
m_IsReadable: Option<bool>
Whether Unity stores an additional copy of this texture’s pixel data in CPU-addressable memory. bool: (5.4.0f3 - 2022.3.2f1)
m_MipCount: Option<i32>
i32: (5.2.0f2 - 2022.3.2f1)
m_MipMap: Option<bool>
bool: (4.0.0 - 5.1.5f1)
m_StreamData: Option<StreamingInfo>
StreamingInfo: (5.6.0b1 - 2022.3.2f1)
m_UsageMode: Option<i32>
i32: (2020.2.0b1 - 2022.3.2f1)