$treesway

From Valve Developer Community
Revision as of 17:28, 24 July 2018 by Pinsplash (talk | contribs) (→‎Parameters: added some lines o space out the word wrapping (a little easier to read))
Jump to navigation Jump to search

When this parameter is added, it will make the material morph around to an env_wind entity to give it the effect that it's blowing in the wind, this effect is used for the trees you see in Counter-Strike: Global OffensiveCounter-Strike: Global Offensive and various foliage seen in InsurgencyInsurgency. The effect assumes that the model is facing upwards, and the commands specify how much it should be affected by the env_wind entity. This parameter has possibly been in Valve games since Left 4 Dead, but was used until Left 4 Dead 2. Mods using the Alien Swarm codebase can enable this shader to take advantage of it.

Note.pngNote:This was recently added to Team Fortress 2 with the Jungle Inferno Update and does not require env_wind to function.

Requires VertexLitGeneric.

Parameters

$treeSway                         "0" "1" or "2"  //Changes the treesway effect. 0 is no sway, 1 is classic tree sway, 2 is the updated tree sway effect in Portal 2, CS:GO, and Alien Swarm engines.

$treeSwayHeight                   "float"//The height in which the effect is applied.
$treeSwayStartHeight              "float"//The height from the origin in which the effect starts blending in.
$treeSwayRadius                   "float"//The radius from the origin in which the effect is applied.
$treeSwayStartRadius              "float"//The radius from the origin in which the effect starts blending in.
$treeSwaySpeed                    "float"//The speed multiplier of large movement such as the trunk.
$treeSwayStrength                 "float"//The distance multiplier of large movement such as the trunk.
$treeSwayScrumbleSpeed            "float"//The falloff of the effect on small movement such as the trunk. Higher means a more stable center.

$treeSwayScrumbleStrength         "float"//The speed multiplier of the small movement such as the leaves.
$treeSwayScrumbleFrequency        "float"//The distance multiplier of the small movement such as the leaves.
$treeSwayFalloffExp               "float"//The frequency of the rippling of a sine wave in small movement such as the leaves.
$treeSwayScrumbleFalloffExp       "float"//The falloff of the effect on small movement such as the leaves. Higher means a more stable center.

$treeSwaySpeedHighWindMultiplier  "float"//Speed multiplier when env_wind triggers a gust.
$treeSwaySpeedLerpStart           "float"//Minimum wind speed in which a gust triggered by env_wind will start affecting the material.
$treeSwaySpeedLerpEnd             "float"//Minimum wind speed in which a gust triggered by env_wind will fully affect the material.
$treeSwayStatic                   "1" //Whether or not to instead use a static wind value instead of the values from env_wind.