This page may not work correctly inside the Unity editor. Open in browser

Wind

Deprecated

Support for Shader Graph nodes will be deprecated soon and will be replaced with shaders written in HLSL.

nature-shaders-shader-graph-wind.jpg

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

nature-shaders-shader-graph-properties-wind-control.jpg

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

nature-shaders-shader-graph-properties-object-height.jpg

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

nature-shaders-shader-graph-properties-object-radius.jpg

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

nature-shaders-shader-graph-properties-trunk-bending.jpg

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.

 

Was this article helpful?
0 out of 0 found this helpful