Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ShaderVariant

Create a ShaderVariant with the provided shader pass and keywords.
Read time 1 minuteLast updated 12 days ago

Definition

ShaderVariant(Shader, PassIdentifier, LocalKeyword[])

Create a ShaderVariant with the provided shader pass and keywords.
public ShaderVariant(Shader shader, PassIdentifier passId, LocalKeyword[] keywords)

Parameters

shader

Shader used in the variant.

PassIdentifier used in the variant.

Array of keywords used in the variant.

ShaderVariant(Material, PassIdentifier)

Create a ShaderVariant with the provided shader pass and keywords.
public ShaderVariant(Material material, PassIdentifier passId)

Parameters

material

Material with the shader and enabled keywords used in the variant.

PassIdentifier used in the variant.