List of material proxies: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added some additional infomation)
(partial cleanup)
Line 1: Line 1:
== Proxy list ==
== Calculation ==
The following proxies are defined in the client DLL for use in any Source game.
 
{| class=standard-table
<div style="-moz-column-count:2;">
! Proxy Name || Description || Variables
; <code>Add</code>
|-
: ''Adds two variables.''
| <code>Add</code> || Adds two variables together. ||
:; <code>srcVar1</code>
''srcVar1''
:; <code>srcVar2</code>
* Name of the first source variable.
:; <code>resultVar</code>
''srcVar2''
:: = srcVar1 + srcVar2
* Name of the second source variable.
; <code>Multiply</code>
''resultVar''
: ''Multiplies two variables.''
* ( srcVar1 + ''srcVar2'')
:; <code>srcVar1</code>
|-
:; <code>srcVar2</code>
| <code>Multiply</code> || Multiplies two variables together. ||
:; <code>resultVar</code>
''srcVar1''
:: = srcVar1 * srcVar2
* Name of the first source variable.
; <code>Subtract</code>
''srcVar2''
: ''Subtracts the second variable from the first.''
* Name of the second source variable.
:; <code>srcVar1</code>
''resultVar''
:; <code>srcVar2</code>
* ( ''srcVar1'' * ''srcVar2'')
:; <code>resultVar</code>
|-
:: = srcVar1 - srcVar2
| <code>Subtract</code> || Subtracts the second variable from the first. ||
; <code>Divide</code>
''srcVar1''
: ''Divides the first variable by the second.''
* Name of the first source variable.
:; <code>srcVar1</code>
''srcVar2''
:; <code>srcVar2</code>
* Name of the second source variable.
:; <code>resultVar</code>
''resultVar''
:: = srcVar1 / srcVar2
* ( ''srcVar1'' - ''srcVar2'')
; <code>Equals</code>
|-
: ''Copies the value of a variable to another.''
| <code>Divide</code> || Divides the first variable by the second. ||
:; <code>srcVar1</code>
''srcVar1''
:; <code>resultVar</code>
* Name of the first source variable.
:: = srcVar1
''srcVar2''
; <code>Abs</code>
* Name of the second source variable.
: ''Computes the absolute value of a variable.''
''resultVar''
:; <code>srcVar1</code>
* ( ''srcVar1'' / ''srcVar2'')
:: Name of the source variable.
|-
:; <code>resultVar</code>
| <code>Equals</code> || Copies a variable to the result variable. ||
:: abs(srcVar1)
''srcVar1''
; <code>Frac</code>
* Name of the source variable.
: Returns the fractional component of a number. {{note|If a vector type variable is provided, this function will return the fractional component of each member of the array.}}
''resultVar''
:; <code>srcVar1</code>
* Set equal to ''srcVar1''
:: Number to find the fractional component of
|-
; <code>Exponential</code>
| <code>Abs</code> || Computes the absolute value of a variable. ||
: Computes ( A * e ( srcVar1 + B ) ).
''srcVar1''
:; <code>srcVar1</code>
* Name of the source variable.
:: Name of the source variable.
''resultVar''
:; <code>scale</code>
* abs( ''srcVar1'')
:: Specifies the value of A
|-
:; <code>offset</code>
| <code>Frac</code> || Returns the fractional component of a number.<br>{{Note|If a vector type variable is provided, this function will return the fractional component of each member of the array.}} ||
:: Specifies the value of B
''srcVar1''
:; <code>minVal</code>
* Number to find the fractional component of
:: Minimum clamping value
|-
:; <code>maxVal</code>
| <code>Exponential</code> || Computes ( A * e (''srcVar1''+B) ). ||
:: Maximum clamping value
''srcVar1''
:; <code>resultVar</code>
* Name of the source variable.
:: ( A * e ( srcVar1 + B ) )
''scale''
; <code>Clamp</code>
* Specifies the value of A
: Clamps a variable to a specified range of values.
''offset''
:; <code>srcVar1</code>
* Specifies the value of B
:: Name of the source variable.
''minVal''
:; <code>min</code>
* Minimum clamping value
:: Minimum clamping value
''maxVal''
:; <code>max</code>
* Maximum clamping value
:: Maximum clamping value
''resultVar''
:; <code>resultVar</code>
* ( A * e (''srcVar1''+B) )
:: clamp( srcVar1, Min, Max )
|-
; <code>LessOrEqual</code>
| <code>Clamp</code> || Clamps a variable to a specified range of values. ||
: Returns different values based relation of supplied variables.
''srcVar1''
:; <code>srcVar1</code>
* Name of the source variable.
:: Name of the first source variable.
''min''
:; <code>srcVar1</code>
* Minimum clamping value
:: Name of the second source variable.
''max''
:; <code>lessEqualVar</code>
* Maximum clamping value
:: Name of material variable to copy to result if (srcVar1 <= srcVar2)
''resultVar''
:; <code>greaterVar</code>
* clamp( ''srcVar1'', ''Min'', ''Max'' )
:: Name of material var to copy to result if (srcVar1 > srcVar2)
|-
:; <code>resultVar</code>
| <code>LessOrEqual</code> || Returns different values based relation of supplied variables. ||
:: Resulting value
''srcVar1''
</div>
* Name of the first source variable.
 
''srcVar1''
== Number generation ==
* Name of the second source variable.
 
''lessEqualVar''
<div style="-moz-column-count:2;">
* Name of material variable to copy to result if (''srcVar1'' <= ''srcVar2'')
; <code>Sine</code>
''greaterVar''
: Creates a sine wave.
* Name of material var to copy to result if (''srcVar1'' > ''srcVar2'')
:; <code>sineperiod</code>
''resultVar''
:: Period of the sine wave in seconds.
* Resulting value
:; <code>sinemin</code>
|-
:: Minimum value of the sine wave.
| <code>Sine</code> || Creates a sine wave. ||
:; <code>sinemax</code>
''sineperiod''
:: Maximum value of the sine wave.
* Period of the sine wave in seconds.
:; <code>timeoffset</code>
''sinemin''
:: Used to start the sine wave at a different point in time
* Minimum value of the sine wave.
:; <code>resultVar</code>
''sinemax''
:: Resulting value.
* Maximum value of the sine wave.
; <code>LinearRamp</code>
''timeoffset''
: Produces an ever increasing value.
* Used to start the sine wave at a different point in time
:; <code>rate</code>
''resultVar''
:: Rate of increase of the value.
* Resulting value.
:; <code>initialValue</code>
|-
:: Initial value to increase.
| <code>LinearRamp</code> || Produces an ever increasing value. ||
:; <code>resultVar</code>
rate
:: Resulting value.
* Rate of increase of the value.
; <code>UniformNoise</code>
''initialValue''
: Produces a noisy signal where each value is equally likely to occur
* Initial value to increase.
:; <code>minVal</code>
''resultVar''
:: Minimum value range.
* Resulting value.
:; <code>maxVal</code>
|-
:: Maximum value range.
| <code>UniformNoise</code> || Produces a noisy signal where each value is equally likely to occur ||
:; <code>resultVar</code>
''minVal''
:: Resulting value.
* Minimum value range.
; <code>GaussianNoise</code>
''maxVal''
: Produces a noisy signal where values are near the average.
* Maximum value range.
:; <code>mean</code>
''resultVar''
:: The average random value.
* Resulting value.
:; <code>halfWidth</code>
|-
:: The distance from the average at which it's only 30% likely to occur.
| <code>GaussianNoise</code> || Produces a noisy signal where values are near the average. ||
:; <code>minVal</code>
mean
:: Minimum value range (clamped).
* The average random value.
:; <code>maxVal</code>
''halfWidth''
:: Maximum value range (clamped).
* The distance from the average at which it's only 30% likely to occur.
:; <code>resultVar</code>
''minVal''
:: Resulting value.
* Minimum value range (clamped).
; <code>MatrixRotate</code>
''maxVal''
: Creates a rotation matrix from the provided axis and angle.
* Maximum value range (clamped).
:; <code>axisVar</code>
''resultVar''
:: Axis of rotation (x,y,z) = (0,1,2).
* Resulting value.
:; <code>angle</code>
|-
:: Degrees of rotation around axis.
| <code>MatrixRotate</code> || Creates a rotation matrix from the provided axis and angle. ||
:; <code>resultVar</code>
''axisVar''
:: Rotation matrix.
* Axis of rotation (x,y,z) = (0,1,2).
; <code>PlayerProximity</code>
''angle''
: Stores the distance from the entity the material is on to the player into a variable. <br> {{Note|Does not work on world surfaces.}}
* Degrees of rotation around axis.
:; <code>scale</code>
''resultVar''
:: An amount to scale the distance by.
* Rotation matrix.
:; <code>resultVar</code>
|-
:: Resulting value.
| <code>PlayerProximity</code> || Stores the distance from the entity the material is on to the player into a variable. <br> {{Note|Does not work on world surfaces.}} ||
; <code>PlayerView</code>
''scale''
: Stores the dot product of the view direction + the direction from the camera to the entity the material is on.<br>{{Note|Does not work on world surfaces.}}
* An amount to scale the distance by.
:; <code>scale</code>
''resultVar''
:: Amount to scale the dot product by.
* Resulting value.
:; <code>resultVar</code>
|-
:: Resulting value.
| <code>PlayerView</code> || Stores the dot product of the view direction + the direction from the camera to the entity the material is on.<br>{{Note|Does not work on world surfaces.}} ||
; <code>PlayerSpeed</code>
''scale''
: Stores the speed of the player into a variable.
* Amount to scale the dot product by.
:; <code>scale</code>
''resultVar''
:: Amount to scale the speed by.
* Resulting value.
:; <code>resultVar</code>
|-
:: Resulting value.
| <code>PlayerSpeed</code> || Stores the speed of the player into a variable. ||
; <code>PlayerPosition</code>
''scale''
: Stores the player's position into a variable.<br>{{Note|Only works for vector variables like <code>$baseTextureOffset</code> or <code>$color</code>.}}
* Amount to scale the speed by.
:; <code>scale</code>
''resultVar''
:: An amount to scale the position by.
* Resulting value.
:; <code>resultVar</code>
|-
:: Resulting value.
| <code>PlayerPosition</code> || Stores the player's position into a variable.<br>{{Note|Only works for vector variables like <code>$baseTextureOffset</code> or <code>$color</code>.}} ||
; <code>EntitySpeed</code>
''scale''
: Stores the entity's speed into a variable.<br>{{Note|Does not work on world surfaces.}}
* An amount to scale the position by.
:; <code>scale</code>
''resultVar''
:: An amount to scale the speed by.
* Resulting value.
:; <code>resultVar</code>
|-
:: Resulting value.
| <code>EntitySpeed</code> || Stores the entity's speed into a variable.<br>{{Note|Does not work on world surfaces.}} ||
; <code>EntityRandom</code>
''scale''
: A proxy that returns a random number associated with the entity the material is applied to. Can be helpful for making animated textures not all be in sync.
* An amount to scale the speed by.
:; <code>scale</code>
''resultVar''
:: Amount to scale the random number by.
* Resulting value.
:; <code>resultVar</code>
|-
:: Resulting value.
| <code>TextureTransform</code> || Generates a texture transform matrix. ||
; <code>CurrentTime</code>
''centerVar''
: Returns the current time as a float.
* Name of a variable holding the center of rotation and scaling. [Optional]
:; <code>resultVar</code>
''scaleVar''
:: The current time.
* Name of scale variable (2D vector). [Optional]
; <code>PlayerHealth</code>
''rotateVar''
: Stores the player health (0-1) in a variable. {{bug|This doesn't appear to work, unfortunately}}
* Name of rotation angle variable (float). [Optional]
:; <code>scale</code>
''translateVar''
:: Amount to scale the health value by.
* Name of the translation variable (2D vector).
:; <code>resultVar</code>
''resultVar''
:: Resulting value.
* Resulting value.
; <code>PlayerDamageTime</code>
|-
: Stores the time since the player was last damaged, in a variable.
| <code>Empty</code> || Used to comment out proxies. Surround a bunch of proxies with the empty proxy to cause those proxies to not operate.||
:; <code>scale</code>
|-
:: Amount to scale the time by.
| <code>TextureScroll</code> || Returns a transform matrix or vector that will translate a texture at a given angle at a given rate. ||
:; <code>resultVar</code>
''textureScrollVar''
:: Resulting value.
* Destination for the resulting transformation.
</div>
''textureScrollRate''
 
* Rate of scroll in units per second.
== Texture manipulation ==
''textureScrollAngle''
* Angle of rotation to move along. (90 = right, 180 = left, etc)
|-
| <code>ToggleTexture</code> || Toggles a texture based on the frame number set by the attached entity.<br> {{Note|Must be attached to an entity.}} ||
''toggleTextureVar''
* Texture to modify based on frames.
''toggleTextureFrameNumVar''
* Variable used for frame number.
''toggleShouldWrap''
* Whether the animation should wrap over not.
|-
| <code>EntityRandom</code> || A proxy that returns a random number associated with the entity the material is applied to. Can be helpful for making animated textures not all be in sync. ||
''scale''
* Amount to scale the random number by.
''resultVar''
* Resulting value.
|-
| <code>CurrentTime</code> || Returns the current time as a float. ||
''resultVar''
* The current time.
|-
| <code>PlayerHealth</code> || Stores the player health (0-1) in a variable. {{bug|This doesn't appear to work, unfortunately}} ||
''scale''
* Amount to scale the health value by.
''resultVar''
* Resulting value.
|-
| <code>PlayerDamageTime</code> || Stores the time since the player was last damaged, in a variable. ||
''scale''
* Amount to scale the time by.
''resultVar''
* Resulting value.
|-
| <code>MaterialModify</code> || Sets the base texture to a value held by the entity (used for entity controlled texture animations).<br>{{Note|Only works when attached to an entity.}} ||
No return value.
|-
| <code>WaterLOD</code> || Coordinates water LOD values between the map's <code>env_waterlod</code> entity and the materials internal values. ||
<code>$CHEAPWATERSTARTDISTANCE</code>
* Start distance for cheap water
{{note|must be set outside of proxy block.}}
<code>$CHEAPWATERENDDISTANCE</code>
* End distance for cheap water
{{note|must be set outside of proxy block.}}
No return value.
|-
| <code>BreakableSurface</code> || Sets the base texture to a material name held by the entity (used for switching surface material on shatter)<br>{{Note|Must be attached to a <code>func_breakablesurface</code> entity.}} ||
No return value.
|-
| <code>ConveyorScroll</code> || Returns the scroll parameters for a texture used as a conveyor. <br>{{Note|Must be attached to <code>func_conveyor</code> entity.}} ||
''textureScrollVar''
* Name of variable to place result in.
{{note|must be a matrix or vector type variable (i.e. <code>$baseTextureOffset</code>).}}
|-
| <code>LampBeam</code> || Modulates the material's alpha value based on angle between the beam's direction and the viewer's eye point. This is used to make the beams of volumetric light on lights fade as you look at them dead on.<br>{{Note|Must be attached to entity for angle use.}}||
No return value.
|-
| <code>LampHalo</code> || Modulates the material's alpha value based on angle between the beam's direction and the viewer's eye point.<br>Like the LampBeam proxy, but used for the halo at the beam's base.<br>{{Note|Must be attached to entity for angle use.}}||
No return value.
|-
| <code>AnimatedTexture</code> || Increments frame variable {{note|animatedtextureframerate can NOT be set to a local var to be changed on the fly. It's a fixed variable, unfortunately}} ||
''animatedtexturevar''
* Texture to increment frame for (i.e. <code>$basetexture</code>, <code>$bumpmap</code>, <code>$normalmap</code> (both <code>$bumpmap</code> and <code>$normalmap</code> use <code>$bumpframe</code>))
''animatedtextureframenumvar''
* Frame variable to increment (i.e. <code>$frame</code>, <code>$bumpframe</code>)
''animatedtextureframerate''
* Framerate in frames per second.
|-
| <code>Camo</code> || {{note|Only used by material "Dev\dev_camo.vmt".}} ||
''camopatterntexture''


''camoboundingboxmin''
<div style="-moz-column-count:2;">
; <code>TextureTransform</code>
: Generates a texture transform matrix.
:; <code>centerVar</code>
:: Name of a variable holding the center of rotation and scaling. [Optional]
:; <code>scaleVar</code>
:: Name of scale variable (2D vector). [Optional]
:; <code>rotateVar</code>
:: Name of rotation angle variable (float). [Optional]
:; <code>translateVar</code>
:: Name of the translation variable (2D vector).
:; <code>resultVar</code>
:: Resulting value.
; <code>Empty</code>
: Used to comment out proxies. Surround a bunch of proxies with the empty proxy to cause those proxies to not operate.
; <code>TextureScroll</code>
: Returns a transform matrix or vector that will translate a texture at a given angle at a given rate.
:; <code>textureScrollVar</code>
:: Destination for the resulting transformation.
:; <code>textureScrollRate</code>
:: Rate of scroll in units per second.
:; <code>textureScrollAngle</code>
:: Angle of rotation to move along. (90 = right, 180 = left, etc)
; <code>ToggleTexture</code>
: Toggles a texture based on the frame number set by the attached entity. {{Note|Must be attached to an entity.}}
:; <code>toggleTextureVar</code>
:: Texture to modify based on frames.
:; <code>toggleTextureFrameNumVar</code>
:: Variable used for frame number.
:; <code>toggleShouldWrap</code>
:: Whether the animation should wrap over not.
; <code>LampBeam</code>
: Modulates the material's alpha value based on angle between the beam's direction and the viewer's eye point. This is used to make the beams of volumetric light on lights fade as you look at them dead on.<br>{{Note|Must be attached to entity for angle use.}}
; <code>LampHalo</code>
: Modulates the material's alpha value based on angle between the beam's direction and the viewer's eye point.
: Like the LampBeam proxy, but used for the halo at the beam's base. {{Note|Must be attached to entity for angle use.}}
: No return value.
; <code>AnimatedTexture</code>
: Increments frame variable {{note|animatedtextureframerate can NOT be set to a local var to be changed on the fly. It's a fixed variable, unfortunately}}
:; <code>animatedtexturevar</code>
:: Texture to increment frame for (i.e. <code>$basetexture</code>, <code>$bumpmap</code>, <code>$normalmap</code> (both <code>$bumpmap</code> and <code>$normalmap</code> use <code>$bumpframe</code>))
:; <code>animatedtextureframenumvar</code>
:: Frame variable to increment (i.e. <code>$frame</code>, <code>$bumpframe</code>)
:; <code>animatedtextureframerate</code>
:: Framerate in frames per second.
</div>


''camoboundingboxmax''
== Entity integration ==


''surfaceprop''
<div style="-moz-column-count:2;">
|-
; <code>MaterialModify</code>
| <code>HeliBlade</code> || ||
: Sets the base texture to a value held by the entity (used for entity controlled texture animations). {{Note|Only works when attached to an entity.}}
|-
; <code>WaterLOD</code>
| <code>ParticleSphereProxy</code> || {{note|Only used by material "particle\SmokeStack.vmt".}} Seems to be defined in <code>particle_proxies.cpp</code>. Valve remark: "FIXME:  Is this even needed any more?" ||
: Coordinates water LOD values between the map's [[env_waterlod]] entity and the material's internal values.
No known parameters.
:; <code>$CHEAPWATERSTARTDISTANCE</code>
|-
:: Start distance for cheap water {{note|must be set outside of proxy block.}}
| <code>Shadow</code> || {{note|Only used by material "Decals\rendershadow.vmt".}} ||
:;<code>$CHEAPWATERENDDISTANCE</code>
No known parameters.
:: End distance for cheap water {{note|must be set outside of proxy block.}}
|-
; <code>BreakableSurface</code>
| <code>ShadowModel</code> || {{note|Only used by material "Decals\rendermodelshadow.vmt".}} ||
: Sets the base texture to a material name held by the entity (used for switching surface material on shatter)<br>{{Note|Must be attached to a <code>func_breakablesurface</code> entity.}}
No known parameters.
; <code>ConveyorScroll</code>
|}
: Returns the scroll parameters for a texture used as a conveyor. <br>{{Note|Must be attached to <code>func_conveyor</code> entity.}}
:; <code>textureScrollVar</code>
:: Name of variable to place result in.
{{note|must be a matrix or vector type variable (i.e. <code>$baseTextureOffset</code>).}}
; <code>Camo</code>
: {{note|Only used by material "Dev\dev_camo.vmt".}}
:; <code>camopatterntexture</code>
:: {{todo}}
:; <code>camoboundingboxmin</code>
:: {{todo}}
:; <code>camoboundingboxmax</code>
:: {{todo}}
:; <code>surfaceprop</code>
; <code>HeliBlade</code>
: {{todo}}
; <code>ParticleSphereProxy</code>
: {{note|Only used by material "particle\SmokeStack.vmt".}} Seems to be defined in <code>particle_proxies.cpp</code>. Valve remark: "FIXME:  Is this even needed any more?"
; <code>Shadow</code>
: Only used by material decals\rendershadow.vmt. No known parameters.
; <code>ShadowModel</code>
: Only used by material decals\rendermodelshadow.vmt. No known parameters.
</div>


== See also ==
== See also ==
* [[Material Proxies]]
* [[Material Proxies]]
* [[Material Creation]]
* [[Material Creation]]


[[Category:Material System]]
[[Category:Material System]]

Revision as of 16:05, 13 November 2009

Calculation

Add
Adds two variables.
srcVar1
srcVar2
resultVar
= srcVar1 + srcVar2
Multiply
Multiplies two variables.
srcVar1
srcVar2
resultVar
= srcVar1 * srcVar2
Subtract
Subtracts the second variable from the first.
srcVar1
srcVar2
resultVar
= srcVar1 - srcVar2
Divide
Divides the first variable by the second.
srcVar1
srcVar2
resultVar
= srcVar1 / srcVar2
Equals
Copies the value of a variable to another.
srcVar1
resultVar
= srcVar1
Abs
Computes the absolute value of a variable.
srcVar1
Name of the source variable.
resultVar
abs(srcVar1)
Frac
Returns the fractional component of a number.
Note.pngNote:If a vector type variable is provided, this function will return the fractional component of each member of the array.
srcVar1
Number to find the fractional component of
Exponential
Computes ( A * e ( srcVar1 + B ) ).
srcVar1
Name of the source variable.
scale
Specifies the value of A
offset
Specifies the value of B
minVal
Minimum clamping value
maxVal
Maximum clamping value
resultVar
( A * e ( srcVar1 + B ) )
Clamp
Clamps a variable to a specified range of values.
srcVar1
Name of the source variable.
min
Minimum clamping value
max
Maximum clamping value
resultVar
clamp( srcVar1, Min, Max )
LessOrEqual
Returns different values based relation of supplied variables.
srcVar1
Name of the first source variable.
srcVar1
Name of the second source variable.
lessEqualVar
Name of material variable to copy to result if (srcVar1 <= srcVar2)
greaterVar
Name of material var to copy to result if (srcVar1 > srcVar2)
resultVar
Resulting value

Number generation

Sine
Creates a sine wave.
sineperiod
Period of the sine wave in seconds.
sinemin
Minimum value of the sine wave.
sinemax
Maximum value of the sine wave.
timeoffset
Used to start the sine wave at a different point in time
resultVar
Resulting value.
LinearRamp
Produces an ever increasing value.
rate
Rate of increase of the value.
initialValue
Initial value to increase.
resultVar
Resulting value.
UniformNoise
Produces a noisy signal where each value is equally likely to occur
minVal
Minimum value range.
maxVal
Maximum value range.
resultVar
Resulting value.
GaussianNoise
Produces a noisy signal where values are near the average.
mean
The average random value.
halfWidth
The distance from the average at which it's only 30% likely to occur.
minVal
Minimum value range (clamped).
maxVal
Maximum value range (clamped).
resultVar
Resulting value.
MatrixRotate
Creates a rotation matrix from the provided axis and angle.
axisVar
Axis of rotation (x,y,z) = (0,1,2).
angle
Degrees of rotation around axis.
resultVar
Rotation matrix.
PlayerProximity
Stores the distance from the entity the material is on to the player into a variable.
Note.pngNote:Does not work on world surfaces.
scale
An amount to scale the distance by.
resultVar
Resulting value.
PlayerView
Stores the dot product of the view direction + the direction from the camera to the entity the material is on.
Note.pngNote:Does not work on world surfaces.
scale
Amount to scale the dot product by.
resultVar
Resulting value.
PlayerSpeed
Stores the speed of the player into a variable.
scale
Amount to scale the speed by.
resultVar
Resulting value.
PlayerPosition
Stores the player's position into a variable.
Note.pngNote:Only works for vector variables like $baseTextureOffset or $color.
scale
An amount to scale the position by.
resultVar
Resulting value.
EntitySpeed
Stores the entity's speed into a variable.
Note.pngNote:Does not work on world surfaces.
scale
An amount to scale the speed by.
resultVar
Resulting value.
EntityRandom
A proxy that returns a random number associated with the entity the material is applied to. Can be helpful for making animated textures not all be in sync.
scale
Amount to scale the random number by.
resultVar
Resulting value.
CurrentTime
Returns the current time as a float.
resultVar
The current time.
PlayerHealth
Stores the player health (0-1) in a variable.
Icon-Bug.pngBug:This doesn't appear to work, unfortunately  [todo tested in ?]
scale
Amount to scale the health value by.
resultVar
Resulting value.
PlayerDamageTime
Stores the time since the player was last damaged, in a variable.
scale
Amount to scale the time by.
resultVar
Resulting value.

Texture manipulation

TextureTransform
Generates a texture transform matrix.
centerVar
Name of a variable holding the center of rotation and scaling. [Optional]
scaleVar
Name of scale variable (2D vector). [Optional]
rotateVar
Name of rotation angle variable (float). [Optional]
translateVar
Name of the translation variable (2D vector).
resultVar
Resulting value.
Empty
Used to comment out proxies. Surround a bunch of proxies with the empty proxy to cause those proxies to not operate.
TextureScroll
Returns a transform matrix or vector that will translate a texture at a given angle at a given rate.
textureScrollVar
Destination for the resulting transformation.
textureScrollRate
Rate of scroll in units per second.
textureScrollAngle
Angle of rotation to move along. (90 = right, 180 = left, etc)
ToggleTexture
Toggles a texture based on the frame number set by the attached entity.
Note.pngNote:Must be attached to an entity.
toggleTextureVar
Texture to modify based on frames.
toggleTextureFrameNumVar
Variable used for frame number.
toggleShouldWrap
Whether the animation should wrap over not.
LampBeam
Modulates the material's alpha value based on angle between the beam's direction and the viewer's eye point. This is used to make the beams of volumetric light on lights fade as you look at them dead on.
Note.pngNote:Must be attached to entity for angle use.
LampHalo
Modulates the material's alpha value based on angle between the beam's direction and the viewer's eye point.
Like the LampBeam proxy, but used for the halo at the beam's base.
Note.pngNote:Must be attached to entity for angle use.
No return value.
AnimatedTexture
Increments frame variable
Note.pngNote:animatedtextureframerate can NOT be set to a local var to be changed on the fly. It's a fixed variable, unfortunately
animatedtexturevar
Texture to increment frame for (i.e. $basetexture, $bumpmap, $normalmap (both $bumpmap and $normalmap use $bumpframe))
animatedtextureframenumvar
Frame variable to increment (i.e. $frame, $bumpframe)
animatedtextureframerate
Framerate in frames per second.

Entity integration

MaterialModify
Sets the base texture to a value held by the entity (used for entity controlled texture animations).
Note.pngNote:Only works when attached to an entity.
WaterLOD
Coordinates water LOD values between the map's env_waterlod entity and the material's internal values.
$CHEAPWATERSTARTDISTANCE
Start distance for cheap water
Note.pngNote:must be set outside of proxy block.
$CHEAPWATERENDDISTANCE
End distance for cheap water
Note.pngNote:must be set outside of proxy block.
BreakableSurface
Sets the base texture to a material name held by the entity (used for switching surface material on shatter)
Note.pngNote:Must be attached to a func_breakablesurface entity.
ConveyorScroll
Returns the scroll parameters for a texture used as a conveyor.
Note.pngNote:Must be attached to func_conveyor entity.
textureScrollVar
Name of variable to place result in.
Note.pngNote:must be a matrix or vector type variable (i.e. $baseTextureOffset).
Camo
Note.pngNote:Only used by material "Dev\dev_camo.vmt".
camopatterntexture
[Todo]
camoboundingboxmin
[Todo]
camoboundingboxmax
[Todo]
surfaceprop
HeliBlade
[Todo]
ParticleSphereProxy
Note.pngNote:Only used by material "particle\SmokeStack.vmt".
Seems to be defined in particle_proxies.cpp. Valve remark: "FIXME: Is this even needed any more?"
Shadow
Only used by material decals\rendershadow.vmt. No known parameters.
ShadowModel
Only used by material decals\rendermodelshadow.vmt. No known parameters.

See also