# GPUSamplerDescriptor

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/GPUSamplerDescriptor.kt+class:androidx.webgpu.GPUSamplerDescriptor) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
class GPUSamplerDescriptor
```

<br />

*** ** * ** ***

Describes a sampler.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#GPUSamplerDescriptor(kotlin.String,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Float,kotlin.Float,kotlin.Int,kotlin.Short)( label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, addressModeU: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, addressModeV: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, addressModeW: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, magFilter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, minFilter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mipmapFilter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, lodMinClamp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, lodMaxClamp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, compare: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, maxAnisotropy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-short/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#addressModeU()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#addressModeV()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#addressModeW()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#compare()` The comparison function for comparison samplers. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#label()` A human-readable label for debugging. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#lodMaxClamp()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#lodMinClamp()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#magFilter()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-short/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#maxAnisotropy()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#minFilter()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSamplerDescriptor#mipmapFilter()` |

## Public constructors

### GPUSamplerDescriptor

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
GPUSamplerDescriptor(
    label: String? = null,
    addressModeU: Int = AddressMode.ClampToEdge,
    addressModeV: Int = AddressMode.ClampToEdge,
    addressModeW: Int = AddressMode.ClampToEdge,
    magFilter: Int = FilterMode.Nearest,
    minFilter: Int = FilterMode.Nearest,
    mipmapFilter: Int = MipmapFilterMode.Nearest,
    lodMinClamp: Float = 0.0f,
    lodMaxClamp: Float = 32.0f,
    compare: Int = CompareFunction.Undefined,
    maxAnisotropy: Short = 1
)
```

## Public properties

### addressModeU

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var addressModeU: Int
```

Value is one of the following:

- `0`
- `1`
- `2`
- `3`

<br />

### addressModeV

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var addressModeV: Int
```

Value is one of the following:

- `0`
- `1`
- `2`
- `3`

<br />

### addressModeW

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var addressModeW: Int
```

Value is one of the following:

- `0`
- `1`
- `2`
- `3`

<br />

### compare

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var compare: Int
```

The comparison function for comparison samplers.

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`
- `7`
- `8`

<br />

### label

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var label: String?
```

A human-readable label for debugging.

### lodMaxClamp

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var lodMaxClamp: Float
```

### lodMinClamp

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var lodMinClamp: Float
```

### magFilter

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var magFilter: Int
```

Value is one of the following:

- `0`
- `1`
- `2`

<br />

### maxAnisotropy

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var maxAnisotropy: Short
```

### minFilter

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var minFilter: Int
```

Value is one of the following:

- `0`
- `1`
- `2`

<br />

### mipmapFilter

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
var mipmapFilter: Int
```

Value is one of the following:

- `0`
- `1`
- `2`

<br />