Ru/$treesway: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{lang|$treeSway}} | {{lang|$treeSway}} | ||
[[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|shader1=VertexLitGeneric}} It is also available in {{tf2}}{{Bms}}{{GMOD}}{{mapbase}}. In {{GMOD}}{{mapbase}}, it can also be used for {{ent|UnlitGeneric}}. | |||
[[File:de_lake_treesway.gif|thumb| | |||
{{Shaderparam | |||
<code>$treesway</code> morphs a material around using the parameters of an {{ent|env_wind}} entity to give the appearance of tree leaves and foilage blowing in the wind. The subparameters of <code>$treesway</code> determine how much the <code>env_wind</code> entity should affect the morphing, and all of them (except <code>$treeswaystatic</code>) must be specified in order for the effect to work properly. This shader parameter assumes any model using it is facing upwards. | <code>$treesway</code> morphs a material around using the parameters of an {{ent|env_wind}} entity to give the appearance of tree leaves and foilage blowing in the wind. The subparameters of <code>$treesway</code> determine how much the <code>env_wind</code> entity should affect the morphing, and all of them (except <code>$treeswaystatic</code>) must be specified in order for the effect to work properly. This shader parameter assumes any model using it is facing upwards. | ||
Line 10: | Line 8: | ||
{{note|This shader parameter is disabled by default in the {{as}} SDK. It can re-enabled by modding.}} | {{note|This shader parameter is disabled by default in the {{as}} SDK. It can re-enabled by modding.}} | ||
{{bug|In {{GMOD}}{{mapbase}}, using a shadow-casting [[env_projectedtexture|projected texture]] on materials with this parameter will cause flickering. As a workaround, try to keep trees away from where player flashlights can reach. {{ent|$halflambert}} may also partially fix the issue.}} | {{bug|In {{GMOD}}{{mapbase}}, using a shadow-casting [[env_projectedtexture|projected texture]] on materials with this parameter will cause flickering. As a workaround, try to keep trees away from where player flashlights can reach. {{ent|$halflambert}} may also partially fix the issue.}} | ||
: {{todo | {{bug|In {{mapbase}}, using a shadow-casting [[env_projectedtexture|projected texture]] will cause shadows not reacting to <code>$treesway</code>, shadows don't move, expect in {{gmod}}.}} | ||
: {{todo|What about <code>$singlepassflashlight</code> and <code>$flashlightnolambert</code>?}} | |||
== | ==Parameters== | ||
{{MatParam|$treesway|int|What option to use for the tree swaying effect. | {{MatParam|$treesway|int|What option to use for the tree swaying effect. | ||
Line 18: | Line 17: | ||
:*1: "Classic" tree sway. | :*1: "Classic" tree sway. | ||
:*2: Radial tree sway effect, intended for use on rectangular sheets of plastic/tarp attached at four corners. It inverts the sway scale radius to be 1 at (0,0,0) in model space and to fall off radially towards the edges of the model. {{note|Models using <code>$treesway 2</code> are expected to be built lying in the X Y plane in model space, with their center at the origin.}}}} | :*2: Radial tree sway effect, intended for use on rectangular sheets of plastic/tarp attached at four corners. It inverts the sway scale radius to be 1 at (0,0,0) in model space and to fall off radially towards the edges of the model. {{note|Models using <code>$treesway 2</code> are expected to be built lying in the X Y plane in model space, with their center at the origin.}}}} | ||
{{MatParam|$treeswayheight|float| | {{MatParam|$treeswayheight|float|The starting height in Hammer units where the effect should start being fully applied. Default 1000.}} | ||
{{MatParam|$treeswaystartheight|float|The height from the model's origin in which the effect starts blending in. Default 0.2.}} | {{MatParam|$treeswaystartheight|float|The height from the model's origin in which the effect starts blending in. Default 0.2.}} | ||
{{MatParam|$treeswayradius|float|The radius from the model's origin in Hammer units in where the effect should start being fully applied. Default 300.}} | {{MatParam|$treeswayradius|float|The radius from the model's origin in Hammer units in where the effect should start being fully applied. Default 300.}} | ||
Line 37: | Line 36: | ||
[[Category:List of Shader Parameters|T]] | [[Category:List of Shader Parameters|T]] | ||
== | == See Also == | ||
https://gamebanana.com/tuts/12924 - | https://gamebanana.com/tuts/12924 - How to achieve a similar effect without <code>$treeSway</code>, on all source engine games |
Revision as of 03:51, 12 November 2022
Template:Shaderparam It is also available in . In
, 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.

$treesway
will not sway materials which use $bumpmap.




$treesway
, shadows don't move, expect in 
- Нужно сделать: 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