# RasterState

> Values for the raster state.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.Rendering](/engine/6000.0/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule
* **Implements:** [IEquatable\<RasterState>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct RasterState : IEquatable<RasterState>
```

## Remarks

Use this with [RenderStateBlock](/engine/6000.0/script-reference/unityengine/rendering/renderstateblock.md) and [ScriptableRenderContext.DrawRenderers](/engine/6000.0/script-reference/unityengine/rendering/scriptablerendercontext/drawrenderers.md) to override the GPU's render state.

Corresponds to the `Conservative`, `Cull`, `ZClip`, and `Offset` commands in [ShaderLab](/engine/6000.0/manual/materials-and-shaders/shaders/reference/sl-reference.md).

Additional Resources: [RenderStateBlock](/engine/6000.0/script-reference/unityengine/rendering/renderstateblock.md), \[\[ScriptableRenderContext.DrawRenderers], [ShaderLab command: Stencil](/engine/6000.0/manual/materials-and-shaders/shaders/reference/sl-reference/sl-commands/sl-stencil.md).

## Static Fields

| Value                                                                                             | Description                          |
| ------------------------------------------------------------------------------------------------- | ------------------------------------ |
| [defaultValue](/engine/6000.0/script-reference/unityengine/rendering/rasterstate/defaultvalue.md) | Default values for the raster state. |

## Constructors

| Constructor                                                                                                                                                        | Description                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
| [RasterState(UnityEngine.Rendering.CullMode,System.Int32,System.Single,System.Boolean)](/engine/6000.0/script-reference/unityengine/rendering/rasterstate/ctor.md) | Creates a new raster state with the given values. |

## Properties

| Property                                                                                          | Description                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [conservative](/engine/6000.0/script-reference/unityengine/rendering/rasterstate/conservative.md) | Enables conservative rasterization. Before using check for support via [SystemInfo.supportsConservativeRaster](/engine/6000.0/script-reference/unityengine/systeminfo/supportsconservativeraster.md) property. |
| [cullingMode](/engine/6000.0/script-reference/unityengine/rendering/rasterstate/cullingmode.md)   | Controls which sides of polygons should be culled (not drawn).                                                                                                                                                 |
| [depthClip](/engine/6000.0/script-reference/unityengine/rendering/rasterstate/depthclip.md)       | Enable clipping based on depth.                                                                                                                                                                                |
| [offsetFactor](/engine/6000.0/script-reference/unityengine/rendering/rasterstate/offsetfactor.md) | Scales the maximum Z slope in the GPU's depth bias setting.                                                                                                                                                    |
| [offsetUnits](/engine/6000.0/script-reference/unityengine/rendering/rasterstate/offsetunits.md)   | Scales the minimum resolvable depth buffer value in the GPU's depth bias setting.                                                                                                                              |
