API

The following section describes the exposed properties of the shader. You can use those properties to dynamically change various shader options from your own scripts.

_MainTex

The main (albedo/color) texture used by the shader. See Albedo Texture for more information.

Usage

With material being the material of the object's mesh renderer, and newTexture being the albedo texture you would like to apply to the object, set the value like so:
material.SetTexture("_MainTex", newTexture);
and read it like so:
Texture texture = material.GetTexture("_MainTex");

_BaseColor

An additional color multiplied with the one already present in the albedo texture. Use this to further customize the look of your mesh. See Albedo Color for more information.

Usage

With material being the material of the object's mesh renderer, and newColor being the albedo color you would like to apply to the object, set the value like so:
material.SetColor("_BaseColor", newColor);
and read it like so:
Color color = material.GetColor("_BaseColor");

_Cutoff

This is a threshold value - all parts of the texture whose alpha value is less than the alpha cutoff will not be rendered. See Alpha Cutoff for more information.

Usage

With material being the material of the object's mesh renderer, and newCutoff being the cutoff value you would like to apply to the object, set the value like so:
material.SetFloat("_Cutoff", newCutoff);
and read it like so:
float cutoff = material.GetFloat("_Cutoff");

_MetallicGlossMap

The standard metallic map option in the default URP Lit shader. The metallic map is a black-and-white texture that determines the surface type of the object. It is used to make certain parts of the mesh reflect light like a metal would (metallic), and others like sand would (smooth). See Metallic Map for more information.

Usage

With material being the material of the object's mesh renderer, and newMap being the metallic map you would like to apply to the object, set the value like so:
material.SetTexture("_MetallicGlossMap", newMap);
and read it like so:
Texture metallicMap = material.GetTexture("_MetallicGlossMap");

_Metallic

This value determines how "metallic" the surface should be, i.e., whether it should reflect light like a metal or a wet surface, or should absorb it like sand or another rough, non-metallic surface. See Metallic for more information.

Usage

With material being the material of the object's mesh renderer, and newMetallic being the metallic value you would like to apply to the object, set the value like so:
material.SetFloat("_Metallic", newMetallic);
and read it like so:
float metallic = material.GetFloat("_Metallic");

_BumpMap

The standard normal map option in the default URP Lit shader. The normal map is used to simulate finer surface detail by containing information on how the light should be reflected by the surface. See Normal Map for more information.

Usage

With material being the material of the object's mesh renderer, and newMap being the normal map you would like to apply to the object, set the value like so:
material.SetTexture("_BumpMap", newMap);
and read it like so:
Texture normalMap = material.GetTexture("_BumpMap");

_BumpScale

This value is multiplied with the normal map and is used to make the effect stronger or weaker. A negative value will mirror the 3D-effect (i.e., protruding surfaces will now be concave, and vice versa). See Normal for more information.

Usage

With material being the material of the object's mesh renderer, and newStrength being the normal strength value you would like to apply to the object, set the value like so:
material.SetFloat("_BumpScale", newStrength);
and read it like so:
float strength = material.GetFloat("_BumpScale");

_EmissionMap

The standard emission map option in the default URP Lit shader. A black-and-white map that determines which parts of the mesh will emit light. The white pixels of the texture are areas where the emission will have an effect, and the black pixels are the areas with no emission. See Emission Map for more information.

Usage

With material being the material of the object's mesh renderer, and newMap being the emission map you would like to apply to the object, set the value like so:
material.SetTexture("_EmissionMap", newMap);
and read it like so:
Texture emissionMap = material.GetTexture("_EmissionMap");

_EmissionColor

The emission color as an HDR color. Keep in mind that different post-processing effects (most notably bloom) will have a profound effect on the look of your emission. See Emission Color for more information.

Usage

With material being the material of the object's mesh renderer, and newColor being the emission color you would like to apply to the object, set the value like so:
material.SetColor("_EmissionColor", newColor);
and read it like so:
Color color = material.GetColor("_EmissionColor");

_EmissionExtraIntensity

Since the default HDR color has a limited intensity (-10 to 10), this shader offers an additional intensity option that allows you to make your emission even stronger. See Emission Extra Intensity for more information.

Usage

With material being the material of the object's mesh renderer, and newIntensity being the emission intensity value you would like to apply to the object, set the value like so:
material.SetFloat("_EmissionExtraIntensity", newIntensity);
and read it like so:
float intensity = material.GetFloat("_EmissionExtraIntensity");

_DissolveEdgeThickness

The thickness of the emissive dissolve edge. Customize the value to your liking. See Dissolve Edge Thickness for more information.

Usage

With material being the material of the object's mesh renderer, and newThickness being the edge thickness value you would like to apply to the object, set the value like so:
material.SetFloat("_DissolveEdgeThickness", newThickness);
and read it like so:
float edgeThickness = material.GetFloat("_DissolveEdgeThickness");

_DissolveEdgeColor

The color of the emissive dissolve edge. Since this color is in HDR format, an emission can also be specified. See Dissolve Edge Color for more information.

Usage

With material being the material of the object's mesh renderer, and newColor being the dissolve edge color you would like to apply to the object, set the value like so:
material.SetColor("_DissolveEdgeColor", newColor);
and read it like so:
Color color = material.GetColor("_DissolveEdgeColor");

_DissolveEffectController

The controller value for the dissolve effect. This value can be controlled via scripts (an example is provided) to create a smooth dissolve effect along the mesh by lerping the controller value, or to keep the dissolution stationary at a specific position by setting the controller to a constant value. The effect is fully contained between controller values 0 (the beginning of the dissolve) and 1 (the end of the dissolve). See Dissolve Effect Controller for more information.

Usage

With material being the material of the object's mesh renderer, and controller being the controller value you would like to apply to the object, set the value like so:
material.SetFloat("_DissolveEffectController", controller);
and read it like so:
float controller = material.GetFloat("_DissolveEffectController");

_DirectionalDissolve

Set to true for a directional dissolve effect (can be specified with the Angle option below). Set to false for a uniform dissolve across the entire mesh. See Directional Dissolve for more information.

Usage

With material being the material of the object's mesh renderer, and value being the toggle value (1 for true, 0 for false) you would like to apply to the object, set the value like so:
material.SetFloat("_DirectionalDissolve", value);
and read it like so:
float directionalDissolve = material.GetFloat("_DirectionalDissolve");

_Angle

The angle of the dissolve effect in degrees, controlling the direction of the dissolve wave across the mesh's surface. Leave at 0 or set to 180 for a horizontal dissolve. Set to 90 or 270 for a vertical dissolve. Set to any other value for custom angles (e.g., 45 for a diagonal dissolve). Only works if Directional Dissolve is enabled! See Angle for more information.

Usage

With material being the material of the object's mesh renderer, and angle being the angle value in degrees you would like to apply to the object, set the value like so:
material.SetFloat("_Angle", angle);
and read it like so:
float angle = material.GetFloat("_Angle");

_NOISE

The type of noise applied to the dissolve effect. Choose between Gradient Noise, Voronoi Noise, and Simple Noise. See Noise for more information.

Usage

Setting Enum values in Shader Graph from your own scripts works differently to other value types. They are set using the method Material.EnableKeyword and are written in the format {ENUM NAME}_{ENUM VALUE}. With material being the material of the object's mesh renderer, and e.g. GRADIENT_NOISE being the noise type value you wish to apply (you can choose from GRADIENT_NOISE, VORONOI_NOISE, or SIMPLE_NOISE), set the value like so:
material.EnableKeyword("_NOISE_GRADIENT_NOISE");

_NoiseScale

The noise scale (in the case of Voronoi Noise, the angle offset and cell density). Increase for noisier dissolve effects. See Noise Scale for more information.

Usage

With material being the material of the object's mesh renderer, and newScale being the noise scale value you would like to apply to the object, set the value like so:
material.SetFloat("_NoiseScale", newScale);
and read it like so:
float scale = material.GetFloat("_NoiseScale");

_AmbientOcclusion

The regular ambient occlusion from the standard URP Lit shader. See Ambient Occlusion for more information.

Usage

With material being the material of the object's mesh renderer, and newAmbientOcclusion being the ambient occlusion value you would like to apply to the object, set the value like so:
material.SetFloat("_AmbientOcclusion", newAmbientOcclusion);
and read it like so:
float occlusion = material.GetFloat("_AmbientOcclusion");

_MainTex _BaseColor _Cutoff _MetallicGlossMap _Metallic _BumpMap _BumpScale _EmissionMap _EmissionColor _EmissionExtraIntensity _DissolveEdgeThickness _DissolveEdgeColor _DissolveEffectController _DirectionalDissolve _Angle _NOISE _NoiseScale _AmbientOcclusion