# 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)

*** ** * ** ***


```
public final class GPUDepthStencilState
```

<br />

*** ** * ** ***

Describes the depth and stencil state for a render pipeline.

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/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)( int format, int depthWriteEnabled, int depthCompare, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUStencilFaceState stencilFront, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUStencilFaceState stencilBack, int stencilReadMask, int stencilWriteMask, int depthBias, float depthBiasSlopeScale, float depthBiasClamp )` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getDepthBias()()` |
| `final float` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getDepthBiasClamp()()` |
| `final float` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getDepthBiasSlopeScale()()` |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getDepthCompare()()` |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getDepthWriteEnabled()()` |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getFormat()()` The texture format of the depth-stencil attachment. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUStencilFaceState` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getStencilBack()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUStencilFaceState` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getStencilFront()()` |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getStencilReadMask()()` |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#getStencilWriteMask()()` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setDepthBias(kotlin.Int)(int value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setDepthBiasClamp(kotlin.Float)(float value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setDepthBiasSlopeScale(kotlin.Float)(float value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setDepthCompare(kotlin.Int)(int value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setDepthWriteEnabled(kotlin.Int)(int value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setFormat(kotlin.Int)(int value)` The texture format of the depth-stencil attachment. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setStencilBack(androidx.webgpu.GPUStencilFaceState)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUStencilFaceState value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setStencilFront(androidx.webgpu.GPUStencilFaceState)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUStencilFaceState value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setStencilReadMask(kotlin.Int)(int value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUDepthStencilState#setStencilWriteMask(kotlin.Int)(int value)` |

## Public constructors

### GPUDepthStencilState

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

```
public GPUDepthStencilState(
    int format,
    int depthWriteEnabled,
    int depthCompare,
    @NonNull GPUStencilFaceState stencilFront,
    @NonNull GPUStencilFaceState stencilBack,
    int stencilReadMask,
    int stencilWriteMask,
    int depthBias,
    float depthBiasSlopeScale,
    float depthBiasClamp
)
```

## Public methods

### getDepthBias

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

```
public final int getDepthBias()
```

### getDepthBiasClamp

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

```
public final float getDepthBiasClamp()
```

### getDepthBiasSlopeScale

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

```
public final float getDepthBiasSlopeScale()
```

### getDepthCompare

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

```
public final int getDepthCompare()
```

### getDepthWriteEnabled

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

```
public final int getDepthWriteEnabled()
```

### getFormat

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

```
public final int getFormat()
```

The texture format of the depth-stencil attachment.

### getStencilBack

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

```
public final @NonNull GPUStencilFaceState getStencilBack()
```

### getStencilFront

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

```
public final @NonNull GPUStencilFaceState getStencilFront()
```

### getStencilReadMask

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

```
public final int getStencilReadMask()
```

### getStencilWriteMask

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

```
public final int getStencilWriteMask()
```

### setDepthBias

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

```
public final void setDepthBias(int value)
```

### setDepthBiasClamp

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

```
public final void setDepthBiasClamp(float value)
```

### setDepthBiasSlopeScale

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

```
public final void setDepthBiasSlopeScale(float value)
```

### setDepthCompare

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

```
public final void setDepthCompare(int value)
```

### setDepthWriteEnabled

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

```
public final void setDepthWriteEnabled(int value)
```

### setFormat

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

```
public final void setFormat(int value)
```

The texture format of the depth-stencil attachment.

### setStencilBack

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

```
public final void setStencilBack(@NonNull GPUStencilFaceState value)
```

### setStencilFront

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

```
public final void setStencilFront(@NonNull GPUStencilFaceState value)
```

### setStencilReadMask

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

```
public final void setStencilReadMask(int value)
```

### setStencilWriteMask

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

```
public final void setStencilWriteMask(int value)
```