Struct FrameSettings
Per renderer and per frame settings.
Namespace: UnityEngine.Rendering.HighDefinition
Syntax
[Serializable]
public struct FrameSettings
Fields
lodBias
If lodBiasMode
is LODBiasMode.Fixed
, then this value overwrites QualitySettings.lodBias
.
If lodBiasMode
is LODBiasMode.ScaleQualitySettings
, then this value scales QualitySettings.lodBias
.
Declaration
[SerializeField]
public float lodBias
Field Value
Type | Description |
---|---|
Single |
lodBiasMode
Specifies how HDRP calculates QualitySettings.lodBias
.
Declaration
[SerializeField]
public LODBiasMode lodBiasMode
Field Value
Type | Description |
---|---|
LODBiasMode |
lodBiasQualityLevel
The quality level the rendering component uses when it fetches the quality setting value.
Declaration
[SerializeField]
public int lodBiasQualityLevel
Field Value
Type | Description |
---|---|
Int32 |
materialQuality
The material quality level this rendering component uses.
If materialQuality == 0
, the rendering component uses the material quality from the current quality settings in the HDRP Asset.
Declaration
public MaterialQuality materialQuality
Field Value
Type | Description |
---|---|
UnityEngine.Rendering.MaterialQuality |
maximumLODLevel
If maximumLODLevelMode
is MaximumLODLevelMode.FromQualitySettings
, then this value overwrites QualitySettings.maximumLODLevel
If maximumLODLevelMode
is MaximumLODLevelMode.OffsetQualitySettings
, then this value offsets QualitySettings.maximumLODLevel
Declaration
[SerializeField]
public int maximumLODLevel
Field Value
Type | Description |
---|---|
Int32 |
maximumLODLevelMode
Specifies how HDRP calculates QualitySettings.maximumLODLevel
.
Declaration
[SerializeField]
public MaximumLODLevelMode maximumLODLevelMode
Field Value
Type | Description |
---|---|
MaximumLODLevelMode |
maximumLODLevelQualityLevel
The maximum quality level the rendering component uses when it fetches the quality setting value.
Declaration
[SerializeField]
public int maximumLODLevelQualityLevel
Field Value
Type | Description |
---|---|
Int32 |
sssCustomSampleBudget
Stores SssCustomSampleBudget on disk.
Declaration
[SerializeField]
public int sssCustomSampleBudget
Field Value
Type | Description |
---|---|
Int32 |
sssQualityLevel
Stores SssQualityLevel on disk.
Declaration
[SerializeField]
public int sssQualityLevel
Field Value
Type | Description |
---|---|
Int32 |
sssQualityMode
Stores SssQualityMode on disk.
Declaration
[SerializeField]
public SssQualityMode sssQualityMode
Field Value
Type | Description |
---|---|
SssQualityMode |
Properties
litShaderMode
Specifies the rendering path this rendering component uses. Here you can use the LitShaderMode
enum to specify whether the rendering component uses forward or deferred rendering.
Declaration
public LitShaderMode litShaderMode { get; set; }
Property Value
Type | Description |
---|---|
LitShaderMode |
Methods
Equals(Object)
Equality operator between two FrameSettings. Return true
if equivalent. (comparison of content).
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Frame Settings to compare to. |
Returns
Type | Description |
---|---|
Boolean | True if both settings are equal. |
Overrides
GetHashCode()
Returns the hash code of this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code of the frame settings. |
Overrides
GetResolvedLODBias(HDRenderPipelineAsset)
Calculates the LOD bias value to use.
Declaration
public float GetResolvedLODBias(HDRenderPipelineAsset hdrp)
Parameters
Type | Name | Description |
---|---|---|
HDRenderPipelineAsset | hdrp | The HDRP Assets to use |
Returns
Type | Description |
---|---|
Single | The LOD Bias to use |
GetResolvedMaximumLODLevel(HDRenderPipelineAsset)
Calculates the Maximum LOD level to use.
Declaration
public int GetResolvedMaximumLODLevel(HDRenderPipelineAsset hdrp)
Parameters
Type | Name | Description |
---|---|---|
HDRenderPipelineAsset | hdrp | The HDRP Asset to use |
Returns
Type | Description |
---|---|
Int32 | The Maximum LOD level to use. |
GetResolvedSssSampleBudget(HDRenderPipelineAsset)
Returns the sample budget of the Subsurface Scattering algorithm.
Declaration
public int GetResolvedSssSampleBudget(HDRenderPipelineAsset hdrp)
Parameters
Type | Name | Description |
---|---|---|
HDRenderPipelineAsset | hdrp | The HDRP Asset to use. |
Returns
Type | Description |
---|---|
Int32 | The sample budget of the Subsurface Scattering algorithm. |
IsEnabled(FrameSettingsField)
Gets the stored override value for the passed in Frame Setting. Use this to access boolean values.
Declaration
public bool IsEnabled(FrameSettingsField field)
Parameters
Type | Name | Description |
---|---|---|
FrameSettingsField | field | Requested field. |
Returns
Type | Description |
---|---|
Boolean | True if the field is enabled. |
SetEnabled(FrameSettingsField, Boolean)
Sets the stored override value for the passed in Frame Setting. Use this to access boolean values.
Declaration
public void SetEnabled(FrameSettingsField field, bool value)
Parameters
Type | Name | Description |
---|---|---|
FrameSettingsField | field | Requested field. |
Boolean | value | State to set to the field. |
Operators
Equality(FrameSettings, FrameSettings)
Equality operator between two FrameSettings. Return true
if equivalent. (comparison of content).
Declaration
public static bool operator ==(FrameSettings a, FrameSettings b)
Parameters
Type | Name | Description |
---|---|---|
FrameSettings | a | First frame settings. |
FrameSettings | b | Second frame settings. |
Returns
Type | Description |
---|---|
Boolean | True if both settings are equal. |
Inequality(FrameSettings, FrameSettings)
Inequality operator between two FrameSettings. Return true
if different. (comparison of content).
Declaration
public static bool operator !=(FrameSettings a, FrameSettings b)
Parameters
Type | Name | Description |
---|---|---|
FrameSettings | a | First frame settings. |
FrameSettings | b | Second frame settings. |
Returns
Type | Description |
---|---|
Boolean | True if settings are not equal. |