GPUSampler

  • GPUDevice.createSampler(descriptor: GPUSamplerDescriptor): GPUSampler

    GPUSamplerDescriptor

    • label: USVString
    • addressModeU: GPUAddressMode= 'clamp-to-edge'
    • addressModeV: GPUAddressMode= 'clamp-to-edge'
    • addressModeW: GPUAddressMode= 'clamp-to-edge'
    • magFilter: GPUFilterMode= 'nearest'
    • minFilter: GPUFilterMode= 'nearest'
    • mipmapFilter: GPUMipmapFilterMode= 'nearest'
    • lodMinClamp: float= 0
    • lodMaxClamp: float= 32
    • compare: GPUCompareFunction
    • maxAnisotropy: unsigned short= 1

    GPUAddressMode

    'clamp-to-edge', 'repeat', 'mirror-repeat'

    GPUFilterMode

    'nearest', 'linear'

    GPUMipmapFilterMode

    'nearest', 'linear'

    GPUCompareFunction

    'never', 'less', 'equal', 'less-equal', 'greater', 'not-equal', 'greater-equal', 'always'
  • label: USVString