@feng3d/render-api
    Preparing search index...

    Interface Sampler

    纹理采样器。

    GPUSampler

    GPUSamplerDescriptor

    interface Sampler {
        addressModeU?: IAddressMode;
        addressModeV?: IAddressMode;
        addressModeW?: IAddressMode;
        compare?: CompareFunction;
        label?: string;
        lodMaxClamp?: number;
        lodMinClamp?: number;
        magFilter?: IFilterMode;
        maxAnisotropy?: number;
        minFilter?: IFilterMode;
        mipmapFilter?: IMipmapFilterMode;
    }
    Index

    Properties

    addressModeU?: IAddressMode

    用于指定纹理在水平方向(即S或U坐标轴)上的寻址模式。

    默认 "repeat"。

    addressModeV?: IAddressMode

    用于指定纹理在垂直方向(即T或V坐标轴)上的寻址模式。

    默认 "repeat"。

    addressModeW?: IAddressMode

    用于指定纹理在深度方向(即R或W坐标轴)上的寻址模式。用于3D纹理或者纹理数组。

    默认 "repeat"。

    compare?: CompareFunction

    涉及纹理比较操作时需提供,采样器将是具有指定 GPUCompareFunction 的比较采样器。

    默认为 undefined,表示用于正常纹理采样,不用与纹理比较操作。

    注:比较采样器可能会使用过滤,但采样结果将是 依赖于实现并且可能不同于正常的过滤规则。

    label?: string

    标签。

    用于调试。

    lodMaxClamp?: number

    采样时使用的最大Lod等级。

    默认 16 。

    lodMinClamp?: number

    采样时使用的最小Lod等级。

    默认 0。

    magFilter?: IFilterMode

    指定样本足迹小于或等于一个纹素时的采样行为

    默认 "nearest"。

    maxAnisotropy?: number

    指定采样器使用的最大各向异性值夹具。 各向异性过滤。使用各向异性过滤能够使纹理的效果更好,但是会消耗更多的内存、CPU、GPU时间。默认为1。

    仅当 minFilter 、magFilter 或 mipmapFilter 为 "linear" 时才有效,否则取 1。

    默认 1。

    注:大多数实现支持范围在1到16之间(包括1和16)的maxAnisotropy值。所使用的maxAnisotropy值将被限制在平台支持的最大值内

    minFilter?: IFilterMode

    指定样本足迹大于一个纹素时的采样行为。

    默认 "nearest"。

    注:WebGL中如果使用mipmap相关值时需要设置 Sampler.mipmapFilter 值。

    mipmapFilter?: IMipmapFilterMode

    指定在 mipmap 级别之间进行采样的行为。

    默认 "nearest"。