isCompressed property

bool get isCompressed

Sample-only everywhere: cannot be a render target, cannot be written by a shader, cannot be multisampled. See the doc comment on the enum's block-compressed tail for what every backend does with one instead.

Implementation

bool get isCompressed => switch (this) {
  TextureFormat.bc1RGBAUNormInt ||
  TextureFormat.bc1RGBAUNormIntSRGB ||
  TextureFormat.bc3RGBAUNormInt ||
  TextureFormat.bc3RGBAUNormIntSRGB ||
  TextureFormat.bc5RGUNormInt ||
  TextureFormat.bc7RGBAUNormInt ||
  TextureFormat.bc7RGBAUNormIntSRGB ||
  TextureFormat.etc2RGB8UNormInt ||
  TextureFormat.etc2RGB8UNormIntSRGB ||
  TextureFormat.etc2RGBA8UNormInt ||
  TextureFormat.etc2RGBA8UNormIntSRGB ||
  TextureFormat.astc4x4LDR ||
  TextureFormat.astc4x4LDRSRGB ||
  TextureFormat.astc8x8LDR ||
  TextureFormat.astc8x8LDRSRGB ||
  TextureFormat.astc4x4HDR ||
  TextureFormat.astc8x8HDR => true,
  _ => false,
};