OSDN Git Service

Added Assets for main menu
[mindgames/Mindgames_main.git] / Mindgames / Library / PackageCache / com.unity.shadergraph@6.9.0 / Documentation~ / Texture-2D-Asset-Node.md
1 # Texture 2D Asset Node
2
3 ## Description
4
5 Defines a constant **Texture 2D Asset** for use in the shader. To sample the **Texture 2D Asset** it should be used in conjunction with a [Sample Texture 2D Node](Sample-Texture-2D-Node.md). When using a separate **Texture 2D Asset Node**, you can sample a **Texture 2D** twice, with different parameters, without defining the **Texture 2D** itself twice.
6
7 ## Ports
8
9 | Name        | Direction           | Type  | Description |
10 |:------------ |:-------------|:-----|:---|
11 | Out | Output      |    Texture 2D | Output value |
12
13 ## Controls
14
15 | Name        | Type           | Options  | Description |
16 |:------------ |:-------------|:-----|:---|
17 |      | Object Field (Texture) |  | Defines the texture 3D asset from the project. |
18
19 ## Generated Code Example
20
21 The following example code represents one possible outcome of this node.
22
23 ```
24 TEXTURE2D(_Texture2DAsset); 
25 SAMPLER(sampler_Texture2DAsset);
26 ```