# Sample Texture 2D node The Sample Texture 2D node samples a **Texture 2D** asset and returns a **Vector 4** color value. You can specify the **UV** coordinates for a texture sample and use a [Sampler State node](Sampler-State-Node.md) to define a specific Sampler State. A Sample Texture 2D node can also sample a normal map. For more information, see the [Controls](#controls) section, or [Normal map (Bump mapping)](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterNormalMap.html) in the Unity User manual. [!include[nodes-sample-errors](./snippets/sample-nodes/nodes-sample-errors.md)] ![An image that displays the Graph window with a Sample Texture 2D node.](./images/sg-sample-texture-2d-node.png) ## Create Node menu category The Sample Texture 2D node is under the **Input** > **Texture** category in the Create Node menu. ## Compatibility The Sample Texture 2D [!include[nodes-compatibility-all](./snippets/nodes-compatibility-all.md)] [!include[nodes-sample-fragment-lod](./snippets/sample-nodes/nodes-sample-fragment-lod.md)] ## Inputs The Sample Texture 2D [!include[nodes-inputs](./snippets/nodes-inputs.md)] | **Name** | **Type** | **Binding** | **Description** | |--|--|--|--| | **Texture** | Texture 2D | None | The Texture 2D asset to sample.| | **UV** | Vector 2 | UV | The UV coordinates to use to sample the texture. | | **Sampler** | Sampler State | Default Sampler State | The Sampler State and settings to use to sample the texture.| | **LOD** | Float | LOD | The specific mip to use when sampling the Texture. **NOTE** The **LOD** Input port only displays if **Mip Sampling Mode** is **LOD**. For more information, refer to [Additional node settings](#additional-node-settings). | | **Bias** | Float | Bias | **NOTE**: The **Bias** Input port only displays if **Mip Sampling Mode** is **Bias**. For more information, refer to [Additional node settings](#additional-node-settings). If **Use Global Mip Bias** is enabled, Unity adds this Bias amount to the Global Mip Bias for a texture's mip calculation. If **Global Mip Bias** is disabled, Unity uses this Bias amount instead of the Global Mip Bias. | | **DDX** | Float | DDY | **NOTE**: The DDX Input port only displays if **Mip Sampling Mode** is **Gradient**. For more information, refer to [Additional node settings](#additional-node-settings). The specific DDX value to use to calculate the texture's mip when sampling. For more information on DDX values for mipmaps, refer to [Mipmaps introduction](https://docs.unity3d.com/Documentation/Manual/texture-mipmaps-introduction.html) in the Unity User Manual. | | **DDY** | Float | DDY | **NOTE** The **DDY** Input port only displays if **Mip Sampling Mode** is **Gradient**. For more information, refer to [Additional node settings](#additional-node-settings). The specific DDY value to use to calculate the texture's mip when sampling. For more information on DDY values for mipmaps, refer to [Mipmaps introduction](https://docs.unity3d.com/Documentation/Manual/texture-mipmaps-introduction.html)> in the Unity User Manual. | ## Controls The Sample Texture 2D [!include[nodes-controls](./snippets/nodes-controls.md)]
Name | Type | Description | |
---|---|---|---|
Type | Dropdown | Select whether the texture is a Texture asset or a normal map. | |
Default | The texture is a Texture asset. | ||
Normal | The texture is a normal map. | ||
Space | Dropdown | When the node's Type is Normal to use a texture as a normal map, choose the Space for the normal map. | |
Tangent | Use a Tangent normal map whenever the mesh for a geometry needs to deform or change, such as when animating a character. With Tangent Space, the normal map's normals are relative to the existing vertex normals of any geometry rendered with your Shader Graph. Your Shader Graph only adjusts the vertex normals and not override them. | ||
Object | Use an Object normal map whenever the mesh for a geometry is static and doesn't deform. With Object Space, the normal map's normals are explicit and override the normals of any geometry rendered with your Shader Graph. Because a static mesh's normals never change, an Object normal map also maintains consistent lighting across different levels of detail (LODs). For more information about normal maps, see Normal map (Bump mapping) in the User manual. |