pub enum TextureFormat {
Alpha8,
Argb4444,
Rgb24,
Rgba32,
Dxt1,
Dxt5,
Bc6h,
Bc7,
Bc4,
Bc5,
R8,
}Expand description
The pixel formats of Unity’s TextureFormat this reader names. Crunched formats (28, 29, 64, 65) need Unity’s
crunch decoder and are refused.
Variants§
Alpha8
Alpha8 (1): one 8-bit channel.
Argb4444
ARGB4444 (2): one little-endian 16-bit value, A in the top 4 bits, then R, G, B.
Rgb24
RGB24 (3): three bytes a pixel, R, G, B.
Rgba32
RGBA32 (4): four bytes a pixel, R, G, B, A.
Dxt1
DXT1 (10): BC1, 4x4 blocks of 8 bytes.
Dxt5
DXT5 (12): BC3, 4x4 blocks of 16 bytes.
Bc6h
BC6H (24): 4x4 blocks of 16 bytes, unsigned half floats.
Bc7
BC7 (25): 4x4 blocks of 16 bytes.
Bc4
BC4 (26): 4x4 blocks of 8 bytes.
Bc5
BC5 (27): 4x4 blocks of 16 bytes.
R8
R8 (63): one 8-bit channel.
Implementations§
Source§impl TextureFormat
impl TextureFormat
Sourcepub fn from_id(id: i64) -> Result<TextureFormat>
pub fn from_id(id: i64) -> Result<TextureFormat>
The format Unity’s TextureFormat id id names.
Trait Implementations§
Source§impl Clone for TextureFormat
impl Clone for TextureFormat
impl Copy for TextureFormat
Source§impl Debug for TextureFormat
impl Debug for TextureFormat
impl Eq for TextureFormat
Source§impl PartialEq for TextureFormat
impl PartialEq for TextureFormat
impl StructuralPartialEq for TextureFormat
Auto Trait Implementations§
impl Freeze for TextureFormat
impl RefUnwindSafe for TextureFormat
impl Send for TextureFormat
impl Sync for TextureFormat
impl Unpin for TextureFormat
impl UnsafeUnpin for TextureFormat
impl UnwindSafe for TextureFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.