shader | Shader used in the variant. |
passId | PassIdentifier used in the variant. |
keywords | Array of keywords used in the variant. |
results | List of graphics states to populate. |
variant | The input variant. |
Populate given list with graphics states associated with input shader variant.
using System.Collections.Generic; using UnityEngine; using UnityEngine.Experimental.Rendering;
public class GetGraphicsStatesExample : MonoBehaviour { public GraphicsStateCollection graphicsStateCollection;
void Start() { List<GraphicsStateCollection.ShaderVariant> variants = new List<GraphicsStateCollection.ShaderVariant>(); graphicsStateCollection.GetVariants(variants); foreach (var variant in variants) { List<GraphicsStateCollection.GraphicsState> states = new List<GraphicsStateCollection.GraphicsState>(); graphicsStateCollection.GetGraphicsStatesForVariant(variant, states); } } }