Version: Unity 6.3 LTS (6000.3)
Language : English
ShaderLab: legacy vertex data channel mapping
HLSL pragma directives reference

HLSL semantics reference

Explore the semantics you can use to input meshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
data into custom shaders in High-Level ShaderA program that runs on the GPU. More info
See in Glossary
Language (HLSL) in Unity.

Semantic Description Type
POSITION The vertex position. float3 or float4
NORMAL The vertex normal. float3
TEXCOORD0 The first UV coordinates. float2, float3, or float4
TEXCOORD1 The second UV coordinates. float2, float3, or float4
TEXCOORD2 The third UV coordinates. float2, float3, or float4
TEXCOORD3 The fourth UV coordinates. float2, float3, or float4
TANGENT The tangent vector used for normal mapping. float4
COLOR The per-vertex color. float4
VPOS The pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary
position in screen space. You can use VPOS only in the fragment shader.
Use UNITY_VPOS_TYPE for cross-platform compatibility, which is float4 on most platforms.
VFACE Indicates whether the pixel surface is facing the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
.
float
SV_VertexID The index of the vertex. You can’t use SV_VertexID in Surface ShadersA streamlined way of writing shaders for the Built-in Render Pipeline. More info
See in Glossary
.
uint

Additional resources

ShaderLab: legacy vertex data channel mapping
HLSL pragma directives reference