Table of Contents

Enum DdsDimension

Namespace
Egami.Formats.Extended.Dds
Assembly
Egami.Formats.Extended.dll

The kind of texture a DDS file holds.

public enum DdsDimension

Fields

Texture1D = 0

A row of texels: height 1.

Texture2D = 1

A 2D texture, an array of them or a cube map.

Texture3D = 2

A volume texture: a stack of depth slices that shrinks with each mip.

Examples

// What the header says: the DXGI format, the mip count, the dimension, cube and array layout and the alpha mode.
using Raster texture = Raster.Load("rock.dds", context);
if (texture.Metadata.FormatDetails is DdsDetails dds)
{
    Console.WriteLine($"{dds.FormatName} (DXGI {dds.DxgiFormat}), {dds.MipLevels} mips, {dds.Dimension}, cube: {dds.IsCube}");
    Console.WriteLine($"alpha {dds.AlphaMode}, sRGB {dds.IsSrgb}, DX10 header {dds.Dx10Header}");
}

// An _SRGB format is tagged sRGB; any other loads its values as stored.
bool srgb = texture.Metadata.ColorSpace == ColorSpaceHint.Srgb;