$treesway: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Soyka moved page $treeSway to $treeSway/en: MultiPage)
m ({{langsp}})
Line 1: Line 1:
{{Lang}}
{{langsp}}
[[File:de_lake_treesway.gif|thumb|Tree with treesway on de_lake in CS:GO (click on image for gif to play).]]
[[File:de_lake_treesway.gif|thumb|Tree with treesway on de_lake in CS:GO (click on image for gif to play).]]
{{Shaderparam|$treesway|since=Left 4 Dead 2|shader1=VertexLitGeneric}} It is also available in {{tf2}}{{Bms}}{{GMOD}}{{mapbase}}. In {{GMOD}}{{mapbase}}, it can also be used for {{ent|UnlitGeneric}}.
{{Shaderparam|$treesway|since=Left 4 Dead 2|shader1=VertexLitGeneric}} It is also available in {{tf2}}{{Bms}}{{GMOD}}{{mapbase}}. In {{GMOD}}{{mapbase}}, it can also be used for {{ent|UnlitGeneric}}.
Line 34: Line 34:
{{MatParam|$treeswaystatic|float|Use a static wind value instead of the values from <code>env_wind</code>. If enabled, <code>env_wind</code> is not required.|only={{tf2}}{{csgo}}{{GMOD}}{{mapbase}}}}
{{MatParam|$treeswaystatic|float|Use a static wind value instead of the values from <code>env_wind</code>. If enabled, <code>env_wind</code> is not required.|only={{tf2}}{{csgo}}{{GMOD}}{{mapbase}}}}
{{MatParam|$treeswaystaticvalues|vector2|Sets the static wind values used by <code>$treeswaystatic</code>, syntax <code>[x y]</code>. Default <code>[0.5 0.5]</code>.|only={{mapbase}}}}
{{MatParam|$treeswaystaticvalues|vector2|Sets the static wind values used by <code>$treeswaystatic</code>, syntax <code>[x y]</code>. Default <code>[0.5 0.5]</code>.|only={{mapbase}}}}
[[Category:List of Shader Parameters|T]]


== See Also ==
== See Also ==
https://gamebanana.com/tuts/12924 - How to achieve a similar effect without <code>$treeSway</code>, on all source engine games
https://gamebanana.com/tuts/12924 - How to achieve a similar effect without <code>$treeSway</code>, on all source engine games

Revision as of 16:06, 12 July 2023

English (en)Русский (ru)Translate (Translate)
Tree with treesway on de_lake in CS:GO (click on image for gif to play).

Template:Shaderparam It is also available in Team Fortress 2Black MesaGarry's ModMapbase. In Garry's ModMapbase, it can also be used for UnlitGeneric.

$treesway morphs a material around using the parameters of an env_wind entity to give the appearance of tree leaves and foilage blowing in the wind. The subparameters of $treesway determine how much the env_wind entity should affect the morphing, and all of them (except $treeswaystatic) must be specified in order for the effect to work properly. This shader parameter assumes any model using it is facing upwards.

Warning.pngWarning:Due to the way bumped lighting is calculated, $treesway will not sway materials which use $bumpmap.
Note.pngNote:This shader parameter is disabled by default in the Alien Swarm SDK. It can re-enabled by modding.
Icon-Bug.pngBug:This shader parameter does not work with $detailtexturetransform.  [todo tested in ?]
Icon-Bug.pngBug:In Garry's ModMapbase, using a shadow-casting projected texture on materials with this parameter will cause flickering. As a workaround, try to keep trees away from where player flashlights can reach. $halflambert may also partially fix the issue.  [todo tested in ?]
Icon-Bug.pngBug:In Mapbase, using a shadow-casting projected texture will cause shadows not reacting to $treesway, shadows don't move, expect in Garry's Mod.  [todo tested in ?]
Todo: What about $singlepassflashlight and $flashlightnolambert?

Parameters

$treesway $treeswayheight $treeswaystartheight $treeswayradius $treeswaystartradius $treeswayspeed $treeswaystrength $treeswayscrumblespeed $treeswayscrumblestrength $treeswayscrumblefrequency $treeswayfalloffexp $treeswayscrumblefalloffexp $treeswayspeedhighwindmultipler $treeswayspeedlerpstart $treeswayspeedlerpend $treeswaystatic $treeswaystaticvalues

See Also

https://gamebanana.com/tuts/12924 - How to achieve a similar effect without $treeSway, on all source engine games