Documentation
    Preparing search index...

    Function mipLevelCount

    • How many mip levels a width × height texture's full chain has — WebGPU's mipLevelCount.

      The count is 1 + floor(log2(max(width, height))), which is exactly the number of halvings Texture.byteLength's loop performs plus the base level. Computed by halving rather than with Math.log2 so it cannot disagree with that loop by a floating-point ulp at a power of two — the two numbers have to match or the accounting is wrong (§84).

      Parameters

      • width: number
      • height: number

      Returns number