# GPUDepthStencilState

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

*** ** * ** ***


```
class GPUDepthStencilState
```

<br />

*** ** * ** ***

Describes the depth and stencil state for a render pipeline.

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#GPUDepthStencilState(kotlin.Int,kotlin.Int,kotlin.Int,androidx.webgpu.GPUStencilFaceState,androidx.webgpu.GPUStencilFaceState,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Float,kotlin.Float)( format: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, depthWriteEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, depthCompare: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, stencilFront: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUStencilFaceState, stencilBack: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUStencilFaceState, stencilReadMask: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, stencilWriteMask: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, depthBias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, depthBiasSlopeScale: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, depthBiasClamp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#depthBias()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#depthBiasClamp()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#depthBiasSlopeScale()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#depthCompare()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#depthWriteEnabled()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#format()` The texture format of the depth-stencil attachment. |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUStencilFaceState` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#stencilBack()` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUStencilFaceState` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#stencilFront()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#stencilReadMask()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDepthStencilState#stencilWriteMask()` |

## Public constructors

### GPUDepthStencilState

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

```
GPUDepthStencilState(
    format: Int = TextureFormat.Undefined,
    depthWriteEnabled: Int = OptionalBool.Undefined,
    depthCompare: Int = CompareFunction.Undefined,
    stencilFront: GPUStencilFaceState = GPUStencilFaceState(),
    stencilBack: GPUStencilFaceState = GPUStencilFaceState(),
    stencilReadMask: Int = -1,
    stencilWriteMask: Int = -1,
    depthBias: Int = 0,
    depthBiasSlopeScale: Float = 0.0f,
    depthBiasClamp: Float = 0.0f
)
```

## Public properties

### depthBias

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

```
var depthBias: Int
```

### depthBiasClamp

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

```
var depthBiasClamp: Float
```

### depthBiasSlopeScale

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

```
var depthBiasSlopeScale: Float
```

### depthCompare

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

```
var depthCompare: Int
```

Value is one of the following:

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

<br />

### depthWriteEnabled

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

```
var depthWriteEnabled: Int
```

Value is one of the following:

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

<br />

### format

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

```
var format: Int
```

The texture format of the depth-stencil attachment.

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`
- `7`
- `8`
- `9`
- `10`
- `11`
- `12`
- `13`
- `14`
- `15`
- `16`
- `17`
- `18`
- `19`
- `20`
- `21`
- `22`
- `23`
- `24`
- `25`
- `26`
- `27`
- `28`
- `29`
- `30`
- `31`
- `32`
- `33`
- `34`
- `35`
- `36`
- `37`
- `38`
- `39`
- `40`
- `41`
- `42`
- `43`
- `44`
- `45`
- `46`
- `47`
- `48`
- `49`
- `50`
- `51`
- `52`
- `53`
- `54`
- `55`
- `56`
- `57`
- `58`
- `59`
- `60`
- `61`
- `62`
- `63`
- `64`
- `65`
- `66`
- `67`
- `68`
- `69`
- `70`
- `71`
- `72`
- `73`
- `74`
- `75`
- `76`
- `77`
- `78`
- `79`
- `80`
- `81`
- `82`
- `83`
- `84`
- `85`
- `86`
- `87`
- `88`
- `89`
- `90`
- `91`
- `92`
- `93`
- `94`
- `95`
- `96`
- `97`
- `98`
- `99`
- `100`
- `101`

<br />

### stencilBack

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

```
var stencilBack: GPUStencilFaceState
```

### stencilFront

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

```
var stencilFront: GPUStencilFaceState
```

### stencilReadMask

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

```
var stencilReadMask: Int
```

### stencilWriteMask

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

```
var stencilWriteMask: Int
```