Game Dev Cheat Sheet

Unity Shader Properties Reference

Searchable reference for every common Unity shader property name with C# get/set code for Standard, URP, HDRP, Sprite, and UI shaders.

Shader properties are the named inputs a Unity shader exposes, such as textures, colours, floats, and vectors, set from the material Inspector or from C# with material.SetColor, material.SetFloat, or a MaterialPropertyBlock. Their internal string names differ between render pipelines: Standard uses _Color while URP Lit uses _BaseColor. This reference lists every common property name with its type and C# access code, so you can stop guessing and start copying.

Pipeline:
_ColorColor

The main tint colour. In URP Lit, this is replaced by _BaseColor. Sprite and UI shaders also use _Color for their primary tint.

Display
Color
Default
Color.white
Shaders
StandardSpriteUI
// Get
material.GetColor("_Color")

// Set
material.SetColor("_Color", Color.red)
_MainTexTexture

The main diffuse/albedo texture. In URP Lit, use _BaseMap instead. You can also set tiling and offset via material.SetTextureScale and material.SetTextureOffset.

Display
Albedo
Default
"white"
Shaders
StandardSprite
// Get
material.GetTexture("_MainTex")

// Set
material.SetTexture("_MainTex", myTexture)
_BumpMapTexture

Tangent-space normal map. The property name _BumpMap is shared across all three pipelines. Make sure the texture import type is set to Normal Map in Unity.

Display
Normal Map
Default
"bump"
Shaders
StandardURPHDRP
// Get
material.GetTexture("_BumpMap")

// Set
material.SetTexture("_BumpMap", normalMap)
_BumpScaleFloat

Multiplier for normal map intensity. Values above 1.0 exaggerate the surface detail; values below 1.0 flatten it.

Display
Normal Scale
Default
1.0
Shaders
StandardURPHDRP
// Get
material.GetFloat("_BumpScale")

// Set
material.SetFloat("_BumpScale", 1.5f)
_MetallicRange

Range 0 to 1. Only used when there is no metallic map assigned. Set to 1 for metals, 0 for non-metals.

Display
Metallic
Default
0.0
Shaders
StandardURPHDRP
// Get
material.GetFloat("_Metallic")

// Set
material.SetFloat("_Metallic", 1f)
_GlossinessRange

Range 0 to 1. Standard shader only. In URP and HDRP, smoothness is stored in the alpha channel of the metallic map or controlled by _Smoothness.

Display
Smoothness
Default
0.5
Shaders
Standard
// Get
material.GetFloat("_Glossiness")

// Set
material.SetFloat("_Glossiness", 0.8f)
_MetallicGlossMapTexture

R channel stores metallic, A channel stores smoothness. When assigned, the _Metallic and _Glossiness sliders are ignored.

Display
Metallic Map
Default
null
Shaders
Standard
// Get
material.GetTexture("_MetallicGlossMap")

// Set
material.SetTexture("_MetallicGlossMap", metallicMap)
_EmissionColorColor

HDR colour. Multiply by values greater than 1 for bloom. You must also call material.EnableKeyword("_EMISSION") for emission to work.

Display
Emission Colour
Default
Color.black
Shaders
StandardURPHDRP
// Get
material.GetColor("_EmissionColor")

// Set
material.SetColor("_EmissionColor", Color.yellow * 2f)
_EmissionMapTexture

Texture that masks which areas emit light. The final emission is _EmissionMap multiplied by _EmissionColor.

Display
Emission Map
Default
null
Shaders
StandardURPHDRP
// Get
material.GetTexture("_EmissionMap")

// Set
material.SetTexture("_EmissionMap", emissionTex)
_OcclusionMapTexture

Ambient occlusion texture. White means fully lit; darker values add shadowing in crevices.

Display
Occlusion Map
Default
"white"
Shaders
StandardURPHDRP
// Get
material.GetTexture("_OcclusionMap")

// Set
material.SetTexture("_OcclusionMap", aoMap)
_OcclusionStrengthRange

Range 0 to 1. Controls how strongly the occlusion map affects the final result. 0 disables occlusion completely.

Display
Occlusion Strength
Default
1.0
Shaders
StandardURPHDRP
// Get
material.GetFloat("_OcclusionStrength")

// Set
material.SetFloat("_OcclusionStrength", 0.5f)
_CutoffRange

Range 0 to 1. Only relevant when rendering mode is set to Cutout. Pixels with alpha below this threshold are discarded.

Display
Alpha Cutoff
Default
0.5
Shaders
StandardURPHDRP
// Get
material.GetFloat("_Cutoff")

// Set
material.SetFloat("_Cutoff", 0.3f)
_DetailAlbedoMapTexture

A secondary albedo texture blended on top of the main texture using UV2. Useful for adding surface variation without increasing main texture resolution.

Display
Detail Albedo
Default
"grey"
Shaders
Standard
// Get
material.GetTexture("_DetailAlbedoMap")

// Set
material.SetTexture("_DetailAlbedoMap", detailTex)
_DetailNormalMapTexture

Secondary normal map for fine surface detail. Blended with the main _BumpMap using UV2.

Display
Detail Normal Map
Default
"bump"
Shaders
Standard
// Get
material.GetTexture("_DetailNormalMap")

// Set
material.SetTexture("_DetailNormalMap", detailNormal)
_DetailNormalMapScaleFloat

Intensity multiplier for the detail normal map.

Display
Detail Normal Scale
Default
1.0
Shaders
Standard
// Get
material.GetFloat("_DetailNormalMapScale")

// Set
material.SetFloat("_DetailNormalMapScale", 2f)
_ParallaxRange

Range 0.005 to 0.08. Controls the strength of parallax/height mapping. Higher values create a stronger depth illusion but can cause artefacts at steep angles.

Display
Height Scale
Default
0.02
Shaders
Standard
// Get
material.GetFloat("_Parallax")

// Set
material.SetFloat("_Parallax", 0.04f)
_BaseColorColor

Replaces _Color in URP and HDRP Lit shaders. If you are migrating from Standard, update all references from _Color to _BaseColor.

Display
Base Colour
Default
Color.white
Shaders
URPHDRP
// Get
material.GetColor("_BaseColor")

// Set
material.SetColor("_BaseColor", Color.red)
_BaseMapTexture

Replaces _MainTex in URP and HDRP Lit shaders. The alpha channel is used for transparency when the surface type is set to Transparent.

Display
Base Map
Default
"white"
Shaders
URPHDRP
// Get
material.GetTexture("_BaseMap")

// Set
material.SetTexture("_BaseMap", myTexture)
_RendererColorColor

Set automatically by SpriteRenderer.color. You rarely need to set this directly on the material; use SpriteRenderer.color instead.

Display
Renderer Colour
Default
Color.white
Shaders
Sprite
// Get
material.GetColor("_RendererColor")

// Set
material.SetColor("_RendererColor", Color.white)
_StencilCompInt

Stencil comparison function. Default value 8 means Always. Used by Unity UI masking. Values correspond to UnityEngine.Rendering.CompareFunction enum.

Display
Stencil Comparison
Default
8
Shaders
UI
// Get
material.GetInt("_StencilComp")

// Set
material.SetInt("_StencilComp", 8)
_StencilInt

Stencil buffer reference value. Used together with _StencilComp for UI masking. The Mask component sets this automatically.

Display
Stencil ID
Default
0
Shaders
UI
// Get
material.GetInt("_Stencil")

// Set
material.SetInt("_Stencil", 1)

Full Property Reference

Every shader property with its full notes, get/set code, and supported pipelines. The interactive table above is a quick lookup; this section is the complete textual reference.

_Color

ColorColorDefault: Color.white

The main tint colour. In URP Lit, this is replaced by _BaseColor. Sprite and UI shaders also use _Color for their primary tint.

Pipelines: Standard, Sprite, UI

// Get
material.GetColor("_Color")

// Set
material.SetColor("_Color", Color.red)

_MainTex

AlbedoTextureDefault: "white"

The main diffuse/albedo texture. In URP Lit, use _BaseMap instead. You can also set tiling and offset via material.SetTextureScale and material.SetTextureOffset.

Pipelines: Standard, Sprite

// Get
material.GetTexture("_MainTex")

// Set
material.SetTexture("_MainTex", myTexture)

_BumpMap

Normal MapTextureDefault: "bump"

Tangent-space normal map. The property name _BumpMap is shared across all three pipelines. Make sure the texture import type is set to Normal Map in Unity.

Pipelines: Standard, URP, HDRP

// Get
material.GetTexture("_BumpMap")

// Set
material.SetTexture("_BumpMap", normalMap)

_BumpScale

Normal ScaleFloatDefault: 1.0

Multiplier for normal map intensity. Values above 1.0 exaggerate the surface detail; values below 1.0 flatten it.

Pipelines: Standard, URP, HDRP

// Get
material.GetFloat("_BumpScale")

// Set
material.SetFloat("_BumpScale", 1.5f)

_Metallic

MetallicRangeDefault: 0.0

Range 0 to 1. Only used when there is no metallic map assigned. Set to 1 for metals, 0 for non-metals.

Pipelines: Standard, URP, HDRP

// Get
material.GetFloat("_Metallic")

// Set
material.SetFloat("_Metallic", 1f)

_Glossiness

SmoothnessRangeDefault: 0.5

Range 0 to 1. Standard shader only. In URP and HDRP, smoothness is stored in the alpha channel of the metallic map or controlled by _Smoothness.

Pipelines: Standard

// Get
material.GetFloat("_Glossiness")

// Set
material.SetFloat("_Glossiness", 0.8f)

_MetallicGlossMap

Metallic MapTextureDefault: null

R channel stores metallic, A channel stores smoothness. When assigned, the _Metallic and _Glossiness sliders are ignored.

Pipelines: Standard

// Get
material.GetTexture("_MetallicGlossMap")

// Set
material.SetTexture("_MetallicGlossMap", metallicMap)

_EmissionColor

Emission ColourColorDefault: Color.black

HDR colour. Multiply by values greater than 1 for bloom. You must also call material.EnableKeyword("_EMISSION") for emission to work.

Pipelines: Standard, URP, HDRP

// Get
material.GetColor("_EmissionColor")

// Set
material.SetColor("_EmissionColor", Color.yellow * 2f)

_EmissionMap

Emission MapTextureDefault: null

Texture that masks which areas emit light. The final emission is _EmissionMap multiplied by _EmissionColor.

Pipelines: Standard, URP, HDRP

// Get
material.GetTexture("_EmissionMap")

// Set
material.SetTexture("_EmissionMap", emissionTex)

_OcclusionMap

Occlusion MapTextureDefault: "white"

Ambient occlusion texture. White means fully lit; darker values add shadowing in crevices.

Pipelines: Standard, URP, HDRP

// Get
material.GetTexture("_OcclusionMap")

// Set
material.SetTexture("_OcclusionMap", aoMap)

_OcclusionStrength

Occlusion StrengthRangeDefault: 1.0

Range 0 to 1. Controls how strongly the occlusion map affects the final result. 0 disables occlusion completely.

Pipelines: Standard, URP, HDRP

// Get
material.GetFloat("_OcclusionStrength")

// Set
material.SetFloat("_OcclusionStrength", 0.5f)

_Cutoff

Alpha CutoffRangeDefault: 0.5

Range 0 to 1. Only relevant when rendering mode is set to Cutout. Pixels with alpha below this threshold are discarded.

Pipelines: Standard, URP, HDRP

// Get
material.GetFloat("_Cutoff")

// Set
material.SetFloat("_Cutoff", 0.3f)

_DetailAlbedoMap

Detail AlbedoTextureDefault: "grey"

A secondary albedo texture blended on top of the main texture using UV2. Useful for adding surface variation without increasing main texture resolution.

Pipelines: Standard

// Get
material.GetTexture("_DetailAlbedoMap")

// Set
material.SetTexture("_DetailAlbedoMap", detailTex)

_DetailNormalMap

Detail Normal MapTextureDefault: "bump"

Secondary normal map for fine surface detail. Blended with the main _BumpMap using UV2.

Pipelines: Standard

// Get
material.GetTexture("_DetailNormalMap")

// Set
material.SetTexture("_DetailNormalMap", detailNormal)

_DetailNormalMapScale

Detail Normal ScaleFloatDefault: 1.0

Intensity multiplier for the detail normal map.

Pipelines: Standard

// Get
material.GetFloat("_DetailNormalMapScale")

// Set
material.SetFloat("_DetailNormalMapScale", 2f)

_Parallax

Height ScaleRangeDefault: 0.02

Range 0.005 to 0.08. Controls the strength of parallax/height mapping. Higher values create a stronger depth illusion but can cause artefacts at steep angles.

Pipelines: Standard

// Get
material.GetFloat("_Parallax")

// Set
material.SetFloat("_Parallax", 0.04f)

_BaseColor

Base ColourColorDefault: Color.white

Replaces _Color in URP and HDRP Lit shaders. If you are migrating from Standard, update all references from _Color to _BaseColor.

Pipelines: URP, HDRP

// Get
material.GetColor("_BaseColor")

// Set
material.SetColor("_BaseColor", Color.red)

_BaseMap

Base MapTextureDefault: "white"

Replaces _MainTex in URP and HDRP Lit shaders. The alpha channel is used for transparency when the surface type is set to Transparent.

Pipelines: URP, HDRP

// Get
material.GetTexture("_BaseMap")

// Set
material.SetTexture("_BaseMap", myTexture)

_RendererColor

Renderer ColourColorDefault: Color.white

Set automatically by SpriteRenderer.color. You rarely need to set this directly on the material; use SpriteRenderer.color instead.

Pipelines: Sprite

// Get
material.GetColor("_RendererColor")

// Set
material.SetColor("_RendererColor", Color.white)

_StencilComp

Stencil ComparisonIntDefault: 8

Stencil comparison function. Default value 8 means Always. Used by Unity UI masking. Values correspond to UnityEngine.Rendering.CompareFunction enum.

Pipelines: UI

// Get
material.GetInt("_StencilComp")

// Set
material.SetInt("_StencilComp", 8)

_Stencil

Stencil IDIntDefault: 0

Stencil buffer reference value. Used together with _StencilComp for UI masking. The Mask component sets this automatically.

Pipelines: UI

// Get
material.GetInt("_Stencil")

// Set
material.SetInt("_Stencil", 1)

Frequently asked questions

Why does my URP shader use _BaseColor instead of _Color?
URP and HDRP renamed the main tint property to _BaseColor for consistency with Unity's PBR naming. If you migrate a script from Standard, anywhere you set material.SetColor("_Color", ...) needs to become material.SetColor("_BaseColor", ...) on URP/HDRP materials, or the change will silently do nothing.
Should I use string property names or Shader.PropertyToID?
Use Shader.PropertyToID for anything called more than once per frame. Cache it once: int colorId = Shader.PropertyToID("_BaseColor"); then material.SetColor(colorId, value). It avoids the per-call string hash and is measurably faster in hot paths.
How do I find the property name of a custom shader?
Open the shader file and look at the Properties block at the top: each entry has the form _PropertyName ("Display Name", Type) = default. The underscore-prefixed string is what you pass to SetFloat, SetColor, SetTexture, or PropertyToID from C#.
What is the difference between MaterialPropertyBlock and modifying material directly?
Modifying a renderer.material clones the material per object, which breaks instancing and bloats memory. MaterialPropertyBlock lets you set per-renderer property values without cloning the material, preserving instancing. Use MaterialPropertyBlock for any frequent per-object property tweaks.

Last updated: