Class MaterialQualityUtilities
Material Quality utility class.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
[MovedFrom("Utilities")]
public static class MaterialQualityUtilities
Fields
EnumNames
String representation of the MaterialQuality enum.
Declaration
public static string[] EnumNames
Field Value
Type | Description |
---|---|
string[] |
KeywordNames
Keywords strings for Material Quality levels.
Declaration
public static string[] KeywordNames
Field Value
Type | Description |
---|---|
string[] |
Keywords
Keywords for Material Quality levels.
Declaration
public static ShaderKeyword[] Keywords
Field Value
Type | Description |
---|---|
ShaderKeyword[] |
Methods
FromIndex(int)
Returns the enum equivalent of the index in the MaterialQuality enum list.
Declaration
public static MaterialQuality FromIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the material quality. |
Returns
Type | Description |
---|---|
MaterialQuality | The equivalent enum. |
GetClosestQuality(MaterialQuality, MaterialQuality)
Returns the closest available quality level in a MaterialQuality bitfield.
Declaration
public static MaterialQuality GetClosestQuality(this MaterialQuality availableLevels, MaterialQuality requestedLevel)
Parameters
Type | Name | Description |
---|---|---|
MaterialQuality | availableLevels | Available MaterialQuality bitfield. |
MaterialQuality | requestedLevel | Input MaterialQuality level. |
Returns
Type | Description |
---|---|
MaterialQuality | The closest available quality level. |
GetHighestQuality(MaterialQuality)
Returns the highest available quality level in a MaterialQuality bitfield.
Declaration
public static MaterialQuality GetHighestQuality(this MaterialQuality levels)
Parameters
Type | Name | Description |
---|---|---|
MaterialQuality | levels | Input MaterialQuality bitfield. |
Returns
Type | Description |
---|---|
MaterialQuality | The highest available quality level. |
SetGlobalShaderKeywords(MaterialQuality)
Set the global keyword for the provided MaterialQuality.
Declaration
public static void SetGlobalShaderKeywords(this MaterialQuality level)
Parameters
Type | Name | Description |
---|---|---|
MaterialQuality | level | MaterialQuality level to set the keyword for. |
SetGlobalShaderKeywords(MaterialQuality, CommandBuffer)
Set the global keyword for the provided MaterialQuality.
Declaration
public static void SetGlobalShaderKeywords(this MaterialQuality level, CommandBuffer cmd)
Parameters
Type | Name | Description |
---|---|---|
MaterialQuality | level | MaterialQuality level to set the keyword for. |
CommandBuffer | cmd | Command Buffer used to setup the keyword. |
ToFirstIndex(MaterialQuality)
Returns the index (in the MaterialQuality enum) of the first available level.
Declaration
public static int ToFirstIndex(this MaterialQuality level)
Parameters
Type | Name | Description |
---|---|---|
MaterialQuality | level | MaterialQuality bitfield. |
Returns
Type | Description |
---|---|
int | The index of the first available level. |