Difference between revisions of "$vertexalpha"

From Valve Developer Community
Jump to: navigation, search
(Added a note about HUDs in Garry's Mod)
Line 4: Line 4:
  
 
Both commands are currently unfunctional in [[Counter-Strike: Global Offensive]]. Using either of the commands will result in the material to turn completely black in-game. Examples are detail props and particles who extensivly used these commands in older versions of the Source Engine, which now cannot use these anymore, resulting in the dissapearance of these entities.
 
Both commands are currently unfunctional in [[Counter-Strike: Global Offensive]]. Using either of the commands will result in the material to turn completely black in-game. Examples are detail props and particles who extensivly used these commands in older versions of the Source Engine, which now cannot use these anymore, resulting in the dissapearance of these entities.
 +
 +
For HUDs in ''Garry's Mod'', the parameter '''<code>$vertexalpha</code>''' is needed in order to make the alpha parameter of [http://wiki.garrysmod.com/page/surface/SetDrawColor <code>surface.SetDrawColor()</code>] working.
  
 
{{todo|Are these commands shader-agnostic?}}
 
{{todo|Are these commands shader-agnostic?}}
  
 
[[Category:List of Shader Parameters|V]]
 
[[Category:List of Shader Parameters|V]]

Revision as of 12:47, 7 June 2016

$vertexalpha and $vertexcolor are two VMT commands that make the surface derive its alpha and color values from per-vertex data provided by the engine.

Only particles and decals are known to modify their vertex data, but it should be possible to implement your own scenarios too. Vertex alpha and color cannot be compiled into a model however.

Both commands are currently unfunctional in Counter-Strike: Global Offensive. Using either of the commands will result in the material to turn completely black in-game. Examples are detail props and particles who extensivly used these commands in older versions of the Source Engine, which now cannot use these anymore, resulting in the dissapearance of these entities.

For HUDs in Garry's Mod, the parameter $vertexalpha is needed in order to make the alpha parameter of surface.SetDrawColor() working.

To do: Are these commands shader-agnostic?