Deprecated
Support for Shader Graph nodes will be deprecated soon and will be replaced with shaders written in HLSL.
Calculates wind animation based on the input and material settings. The wind is applied to the vertex and returned as a new vertex position and vertex normal.
Input
- Vertex: The color to apply the color correction to
- Vertex World Position: The Hue, Saturation, and Lightness values. A value of 0 will apply no color correction.
- Normal: The normal direction of the vertex in Object Space.
- Texcoord 0: The texture coordinates of the vertex (channel 0)
- Texcoord 1: The texture coordinates of the vertex (channel 1)
- Color: The vertex color.
Output
- Vertex Out: The vertex displaced based on the wind animation
- Normal Out: The vertex normal, recalculated based on the wind animation.
Optional Properties
Even though the inputs are enough to calculate wind animations, there are more options available based on the material settings. The material settings are determined based on the material properties. These can be added to the shader, but don't have to be connected to the node.
Wind Control
Determines what data should be used to compute the wind animations. Add a keyword enum to the shader with the same settings as in the screenshot to enable this option.
Object Height
The height of the object. Is used to compute the wind animations if the wind control is set to Vertex or UV. Add a Vector1 property to the shader with the reference _ObjectHeight to enable this option.
Object Radius
The radius of the object. Is used to compute the wind animations if the wind control is set to Vertex or UV. Add a Vector1 property to the shader with the reference _ObjectRadius to enable this option.
Trunk Bend Factor
The amount of bending that should be applied to the trunk of trees. Add a Vector2 property to the shader with the reference _TrunkBendFactor to enable this option. The X value is the bend factor for the trunk, the Y value is the additional bend factor for the base of the trunk.