# ShaderPrecisionModel

> Options for the shader precision model.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public enum ShaderPrecisionModel
```

## Remarks

This enumeration allows you to change two things: the default sampler precision and the definition of `half`.

The default sampler precision is only relevant to samplers that don't explicitly declare a precision. For example, `sampler2D` uses the default precision, but `sampler2D_float` uses full precision regardless of the default precision.

Regarding the shader type `half`, it is defined as either `float` or `min16float` (see SL-DataTypesAndPrecision). For the purpose of uploading data to buffers, including constant buffers, the size and alignment is 4 bytes in both cases.

## Fields

| Value                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PlatformDefault](/engine/6000.5/script-reference/unityeditor/shaderprecisionmodel/platformdefault.md) | Use the target platform defaults. The default sampler precision is half precision on mobile targets and full precision elsewhere. Also, shader type `half` is defined as `min16float` on mobile targets and `float` elsewhere.                                                                                                                                                                                                                        |
| [Unified](/engine/6000.5/script-reference/unityeditor/shaderprecisionmodel/unified.md)                 | Use full sampler precision by default, and explicitly declare when you want to use lower precision. Refer to SL-DataTypesAndPrecision for more information. In addition, `half` is defined as `min16float` on all platforms. This sets [BuiltinShaderDefine.UNITY\_UNIFIED\_SHADER\_PRECISION\_MODEL](/engine/6000.5/script-reference/unityengine/rendering/builtinshaderdefine/unity-unified-shader-precision-model.md) when Unity compiles shaders. |
