Unity Products:Amplify Shader Editor/Material Quality: Difference between revisions
Jump to navigation
Jump to search
ampwiki>Amplify RnD Rick No edit summary |
AmplifyWiki (talk | contribs) m (1 revision imported) |
(No difference)
|
Latest revision as of 00:06, 2 December 2023
Material Quality Node
The Material Quality node registers and uses global keywords MATERIAL_QUALITY_HIGH, MATERIAL_QUALITY_MEDIUM and MATERIAL_QUALITY_LOW and enables different behaviors for each one of the available quality types.
NOTE 1: As this node registers the above keywords it will increase the amount of variants the final shader will have.
NOTE 2: These quality keywords and tools are only set over both URP and HDRP, they are not available at the Built-in pipeline.
Please use the UnityEngine.Rendering.MaterialQualityUtilities.SetGlobalShaderKeywords(...) function to manually set the quality level over C# scripts.
using UnityEngine;
using UnityEngine.Rendering;
public class MyTestNode : ParentNode
{
void SetMaxQuality()
{
MaterialQualityUtilities.SetGlobalShaderKeywords( MaterialQuality.High );
}
}
Input Port | Description | Type |
---|---|---|
High | Value to be used if the MATERIAL_QUALITY_HIGH keyword is set. | Float [1] |
Medium | Value to be used if the MATERIAL_QUALITY_MEDIUM keyword is set. | Float [1] |
Low | Value to be used if the MATERIAL_QUALITY_LOW keyword is set. | Float [1] |