Explore the properties and settings you can use to customize the default SpriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary Lit shaderA program that runs on the GPU. More info
See in Glossary graph in the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary (URP).
For more information about 2D shaders in URP, refer to 2D Lighting in URP.
The default Vertex and Fragment Contexts contain the following Blocks. Which Blocks display might change depending on the graph settings.
The default values are the values from the 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.
| Input | Type | Description |
|---|---|---|
| Position | Vector3 | Sets the vertex position in object space. |
| Normal | Vector3 | Sets the normal of the vertex in object space. |
| Tangent | Vector3 | Sets the tangent of the vertex in object space. |
| Input | Type | Description |
|---|---|---|
| Base Color | Vector3 | Sets the base color of the material. The default is Color.grey. |
| Sprite MaskA texture which defines which areas of an underlying image to reveal or hide. More info See in Glossary |
Vector4 | Sets a custom mask that determines whether the pixelsThe 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 of the sprite are visible. For more information, refer to Add normal map and mask textures to a sprite. |
| Normal (Tangent Space) | Vector3 | Sets a custom normal mapA type of Bump Map texture that allows you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry. See in Glossary to simulate bumps and grooves on the surface of the sprite. For more information, refer to Add normal map and mask textures to a sprite. |
| Alpha | Float | Sets the alpha of the material. The range is 0 to 1. The default is 1. |
| Alpha Clip Threshold | Float | Sets the minimum alpha value for a pixel to be visible. The range is 0 to 1. The default is 0.5. This property is only available if you enable Alpha Clipping in the graph settings. |
Explore the shader graph settings you can use to customize the Fragment and Vertex contexts.
For more details about graph settings that are common to all shader graph shaders, refer to Graph Settings tab.
| Setting | Description |
|---|---|
| Blending Mode | Sets how the shader blends the color of a transparent material with the background. The options are:
|
| Depth Write | Determines whether the shader writes depth information to the depth buffer. The options are:
|
| Alpha Clipping | Discards pixels if their alpha value is lower than a threshold value. Enabling this setting adds the Alpha Clip Threshold Block to the Fragment context. |
| Disable Color Tint | Prevents Shader Graph tinting the sprite with the Color property of the sprite. If you enable this setting, use a Vertex Color Node to access the Color property of the sprite. |
| Sort 3D as 2D Compatible | Uses 2D sorting rules to draw 3D objectsA 3D GameObject such as a cube, terrain or ragdoll. More info See in Glossary, to avoid 2D objectsA 2D GameObject such as a tilemap or sprite. More info See in Glossary appearing at the wrong depth. |
| Custom Editor GUI | Renders a custom editor GUI in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info See in Glossary window of the material. Enter the name of the GUI class in the field. For more information, refer to Control material properties in the Inspector window. |