mathe/Library/PackageCache/com.unity.shadergraph@14.0.8/Documentation~/UVCombine-Node.md
2024-09-20 20:30:10 +02:00

3.0 KiB

UVCombine node

The UVCombine node lets you select which UV channel you want to use for mapping your shader to geometry in your application. You can also choose to apply tiling and offset to your UV coordinates.

An image showing the UVCombine node in the Shader Graph window

[!includenodes-subgraph-node]

Create Node menu category

The UVCombine node is under the Utility > High Definition Render Pipeline category in the Create Node menu.

Compatibility

[!includenodes-compatibility-hdrp]

[!includehdrp-latest-link]

[!includenodes-all-contexts]

Inputs

[!includenodes-inputs]

Name Type Description
UV Channel Mask Vector 4 Select which UV channel you want to use for your UV coordinates by entering a 1 in the corresponding default input on the port:
  • X: UV channel 0
  • Y: UV channel 1
  • Z: UV channel 2
  • W: UV channel 3
Set all other default inputs to 0. You can also connect a node that outputs a Vector 4.
UV Tile and Offset Vector 4 Use the port's default input to specify the amount of offset or tiling that you want to apply to your shader's UV coordinates:
  • Use X and Y to specify the tiling.
  • Use W and Z to specify the offset.
You can also connect a node that outputs a Vector 4.

Outputs

[!includenodes-single-output]

Name Type Binding Description
UV Vector 2 UV The final UV output, after selecting a UV channel and, if specified, any tiling or offset.

Example graph usage

For an example use of the UVCombine node, see either of the HDRP's Fabric shaders.

To view these Shader Graphs:

  1. Create a new material and assign it the HDRP > Fabric > Silk or HDRP > Fabric > CottonWool shader, as described in the Unity User Manual section Creating a material asset, and assigning a shader to it.

  2. Next to the Shader dropdown, select Edit.

Your chosen Fabric's Shader Graph opens. You can view the UVCombine node, its Subgraph, and the other nodes that create HDRP's Fabric shaders.