Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ShaderLab language reference

Reference for ShaderLab.
Read time 1 minuteLast updated 13 days ago

Find the blocks, directives, and commands you need to write a shader in ShaderLab.

Page

Description

ShaderExplore the
Shader
block in ShaderLab to create a shader, and add material properties, custom editors and a fallback shader.
SubShaderExplore the
SubShader
block in ShaderLab to create a subshader, and add LOD values, tags, or a
UsePass
or
GrabPass
directive.
PassExplore the
Pass
block in ShaderLab to create a shader pass, and add a name, tags, and shader code blocks.
GPU render state commandsFind the commands in ShaderLab you need to change the render state on the GPU, such as
Blend
,
Cull
and
ZWrite
.
PackageRequirements blockExplore the
PackageRequirements
block in ShaderLab to specify required packages for a subshader or shader pass.