6.9 KiB
ThreadMapDetail node
The ThreadMapDetail node adds tileable thread map detail information to a fabric material. The node outputs a thread map that you can apply to a fabric material.
[!includenodes-subgraph-node]
A thread map is a Texture with 4 channels. Like a detail map, a thread map contains information about ambient occlusion, the normal x-axis and normal y-axis, and smoothness.
For more information on Detail maps, see Secondary Maps (Detail Maps) & Detail Mask in the Unity User Manual.
Create Node menu category
The ThreadMapDetail node is under the Utility > High Definition Render Pipeline > Fabric category in the Create Node menu.
Compatibility
[!includenodes-compatibility-hdrp]
[!includehdrp-latest-link]
[!includenodes-all-contexts]
Inputs
[!includenodes-inputs]
Name | Type | Binding | Description |
---|---|---|---|
Use Thread Map | Boolean | None | Use the port's default input to enable or disable the ThreadMapDetail node. You can also connect a node that outputs a Boolean to choose when to enable or disable the thread map. |
ThreadMap | Texture 2D | None | The texture that contains the detailed information of a fabric's thread pattern. The texture should contain 4 channels:
|
UV | Vector 2 | UV | The UV coordinates the ThreadMapDetail node should use to map the ThreadMap texture on the geometry. |
Normals | Vector 3 | None | The base normal map that you want your Shader Graph to apply to the geometry before it applies the thread map. |
Smoothness | Float | None | The base smoothness value that you want your Shader Graph to apply to the geometry before it applies the thread map. |
Alpha | Float | None | The base alpha value that you want your Shader Graph to apply to the geometry before it applies the thread map. |
Ambient Occlusion | Float | None | The base ambient occlusion value that you want your Shader Graph to apply to the geometry before it applies the thread map. |
Thread AO Strength | Float | None | Specify a value of 0 or 1 to determine how the ThreadMap's ambient occlusion should impact the final shader result:
|
Thread Normal Strength | Float | None | Specify a value of 0 or 1 to determine how the ThreadMap's normal should impact the final shader result:
|
Thread Smoothness Strength | Float | None | Specify a value of 0 or 1 to determine how the ThreadMap's smoothness should impact the final shader result:
|
Outputs
[!includenodes-outputs]
Name | Type | Description |
---|---|---|
Normal | Vector 3 | The final normal output of the thread map. |
Smoothness | Float | The final smoothness output of the thread map. |
Ambient Occlusion | Float | The final ambient occlusion output of the thread map. |
Alpha | Float | The final alpha output of the thread map. Shader Graph calculates this alpha value by multiplying the input Alpha value by the Thread AO Strength value. |
Example graph usage
For an example use of the ThreadMapDetail node, see either of the HDRP's Fabric shaders.
To view these Shader Graphs:
-
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.
-
Next to the Shader dropdown, select Edit.
Your chosen Fabric's Shader Graph opens. You can view the ThreadMapDetail node, its Subgraph, and the other nodes that create HDRP's Fabric shaders.