Vixen
02b45cc4
csharp
public static class MipChain

Mip level extents, and filling a chain in.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Only uncompressed eight-bit-per-channel formats can be reduced here, and that is not a gap: a mip chain is generated before compression, from the source pixels, because reducing already-compressed blocks means decoding, filtering and re-encoding, and each round of that loses more than the filter ever gains.

Methods (5)

  • public static (int Width, int Height, int Depth) ExtentOf(int width, int height, int depth, int level)

    What one level's extent is.

  • public static void Generate(TextureData texture)

    Fills every level below the largest with a plain box filter, in place.

  • public static void Generate(TextureData texture, MipOptions options)

    Fills every level below the largest by averaging, in place.

  • public static float ToLinear(float encoded)

    Turns an sRGB-encoded value into the light it stands for.

  • public static float ToSrgb(float linear)

    Turns a linear value into its sRGB encoding.

Used by (4)

  • MipChainTestsVixen.Core.Imaging.Tests
  • SrgbVixen.Core.Imaging
  • TextureDataVixen.Core.Imaging
  • TextureImporterVixen.Editor.Assets