---
title: GPUSampler
---

GPUTextureView is declared in the shared "rive/gpu_types" builtin
(loaded before rive/image) so that a single nominal type is used
everywhere — both Image:view() and GPU render-pass APIs.
Describes how a texture is sampled in a shader.


## Constructors

### `new`

{/* new: (desc: {
        min: Filter?,
        mag: Filter?,
        mipmap: Filter?,
        wrapU: WrapMode?,
        wrapV: WrapMode?,
        compare: CompareFunction?,
        maxAnisotropy: number?,
    }?) -> GPUSampler */}
<div class="signature">
```lua
new(desc: {min: Filter?, mag: Filter?, mipmap: Filter?, wrapU: WrapMode?, wrapV: WrapMode?, compare: CompareFunction?, maxAnisotropy: number?,}?) -> GPUSampler
```
</div>

