Home -> ITextureSampler -> SetMipmapLevelMapping
Description
The SetMipmapLevelMapping method restricts and biases the mipmap levels that a sampler may use when sampling a texture. The minimum and maximum levels clamp the calculated level-of-detail range, while the bias shifts the calculated mipmap level before filtering between levels.
This method is useful when only a subset of mipmap levels should be visible, when a texture streaming system has not populated every level, or when a deliberate mipmap level bias is needed to sharpen or soften texture sampling.
Important
A non-zero mipmap level bias requires the MipmapLevelBias device feature to be supported by the graphics device and enabled when the renderer is created. Use a zero bias when the feature is unavailable.
Usage
void SetMipmapLevelMapping(float minLevel = 0, float maxLevel = 0, float levelBias = 0);
Argument list
- minLevel [float]
- The minimum mipmap level that may be sampled.
- maxLevel [float]
- The maximum mipmap level that may be sampled. Use zero to allow the renderer to use the texture's last mipmap level.
- levelBias [float]
- The mipmap level bias applied during sampling.