Table of Contents

Class TileMipChain

Mip-chain arithmetic for square tiles: level count and total texels from one shared log2, so staging, the tile array, and the memory budget agree.

public static class TileMipChain
Inheritance
object
TileMipChain

Methods

ChainTexels(int)

Total texels across every level of the chain.

public static long ChainTexels(int tileSizePx)

Parameters

tileSizePx int

Square tile edge in px, greater than 0.

Returns

long

Sum of ss for each level. For a power-of-two size N this is (4N*N - 1) / 3, just under a third more than the base level.

LevelCount(int)

Levels in a full chain, floor(log2(size)) + 1.

public static int LevelCount(int tileSizePx)

Parameters

tileSizePx int

Square tile edge in px, greater than 0.

Returns

int

Level count, 1 for a 1 px tile.