Unity Products:Amplify Shader Editor/Material Quality

From Amplify Creations Wiki
Jump to navigation Jump to search

Back to Node List

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]

  1. ^ Port automatically adapts to all connection types except Sampler types.

Back to Node List