ShaderPrecisionModel
Options for the shader precision model.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Enum
- Namespace: UnityEditor
- Assembly: UnityEditor
public enum ShaderPrecisionModel
Remarks
This enumeration allows you to change two things: the default sampler precision and the definition of .
halfThe default sampler precision is only relevant to samplers that don't explicitly declare a precision. For example, uses the default precision, but uses full precision regardless of the default precision.
sampler2Dsampler2D_floatRegarding the shader type , it is defined as either or (see SL-DataTypesAndPrecision). For the purpose of uploading data to buffers, including constant buffers, the size and alignment is 4 bytes in both cases.
halffloatmin16floatFields
Value | Description |
|---|---|
| PlatformDefault | Use the target platform defaults. The default sampler precision is half precision on mobile targets and full precision elsewhere. Also, shader type |
| Unified | 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, |