GPUSamplerDescriptor constructor

GPUSamplerDescriptor({
  1. GPUAddressMode? addressModeU,
  2. GPUAddressMode? addressModeV,
  3. GPUAddressMode? addressModeW,
  4. GPUFilterMode? magFilter,
  5. GPUFilterMode? minFilter,
  6. GPUMipmapFilterMode? mipmapFilter,
  7. double? lodMinClamp,
  8. double? lodMaxClamp,
  9. GPUCompareFunction? compare,
  10. int? maxAnisotropy,
})

Implementation

factory GPUSamplerDescriptor(
        {GPUAddressMode? addressModeU,
        GPUAddressMode? addressModeV,
        GPUAddressMode? addressModeW,
        GPUFilterMode? magFilter,
        GPUFilterMode? minFilter,
        GPUMipmapFilterMode? mipmapFilter,
        double? lodMinClamp,
        double? lodMaxClamp,
        GPUCompareFunction? compare,
        int? maxAnisotropy}) =>
    GPUSamplerDescriptor._(
        addressModeU: addressModeU?.value ?? GPUAddressMode.clampToEdge.value,
        addressModeV: addressModeV?.value ?? GPUAddressMode.clampToEdge.value,
        addressModeW: addressModeW?.value ?? GPUAddressMode.clampToEdge.value,
        magFilter: magFilter?.value ?? GPUFilterMode.nearest.value,
        minFilter: minFilter?.value ?? GPUFilterMode.nearest.value,
        mipmapFilter:
            mipmapFilter?.value ?? GPUMipmapFilterMode.nearest.value,
        lodMinClamp: lodMinClamp ?? 0,
        lodMaxClamp: lodMaxClamp ?? 32,
        compare: compare?.value ?? undefined,
        maxAnisotropy: maxAnisotropy ?? 1);