Difference between revisions of "VortWarp"

From Valve Developer Community
Jump to: navigation, search
m (This shader is used on multiple models such as Alyx and Vortigaunts)
(Filled out this page with info about the shader, and included a example I worked with. Need some more clear info about how the shader works later.)
Line 1: Line 1:
{{stub}}
+
This is the shader used on the vortigaunts in the intro sequence in [[Half-Life 2: Episode One]].  It blends a [[Water_(shader)#Authoring_a_flow_map|Flowmap]] with a illumination mask, and creates a similar effect to how water uses Flowmaps in newer engine branches.  The shader can be both used on brushes and models.
This shader is used during the intro sequence of episode one.
+
 
 +
== Shader parameters ==
 +
; <code>$unlit <[[bool]]></code>
 +
: Whether or not the material should be lit.
 +
 
 +
; <code>$warpparam <[[float]]></code>
 +
: For models, causes the entire portion of the model that the material covers to squish itself inward.  1.0 will not perform any squishing, while lower values will cause the model to squish more and more, and 0.0 will make the model practically invisible.  On brushes, this doesn't do much.  {{TODO|Test on brushes more.}}
 +
 
 +
; <code>$entityorigin <[[vector]]></code>
 +
: {{TODO|Find out what this is for.  Seems to be related to EntityOrigin proxy.}}.
 +
 
 +
; <code>$selfillummap <[[texture]]></code>
 +
: A [[Glowing_Textures#.24selfillum_textures|$selfillummask]] to blend with the Flowmap.
 +
 
 +
== Supported effects ==
 +
 
 +
*<code>[[$bumpmap]]</code>
 +
*<code>[[$halflambert]]</code>
 +
*<code>[[$translucent]]</code> and <code>[[$alpha]]</code>
 +
 
 +
== Example ==
 +
Example showing the minimal needed parameters in order to make the shader work.
 +
 
 +
<source lang=php>
 +
VortWarp
 +
{
 +
 
 +
$basetexture lights/white
 +
$flowmap shadertest/cloud
 +
 
 +
$selfillummap shadertest/lump
 +
$selfillumtint "{ 200 15 0 }"
 +
 
 +
$warpparam 1.0
 +
 
 +
}
 +
</source>
 +
 
 +
== See also ==
 +
*<code>[[Water_(shader)|Water Shader]]</code>
 +
 
 
[[Category:Shaders]]
 
[[Category:Shaders]]

Revision as of 18:34, 21 January 2019

This is the shader used on the vortigaunts in the intro sequence in Half-Life 2: Episode One. It blends a Flowmap with a illumination mask, and creates a similar effect to how water uses Flowmaps in newer engine branches. The shader can be both used on brushes and models.

Shader parameters

$unlit <bool>
Whether or not the material should be lit.
$warpparam <float>
For models, causes the entire portion of the model that the material covers to squish itself inward. 1.0 will not perform any squishing, while lower values will cause the model to squish more and more, and 0.0 will make the model practically invisible. On brushes, this doesn't do much. To do: Test on brushes more.
$entityorigin <vector>
To do: Find out what this is for. Seems to be related to EntityOrigin proxy..
$selfillummap <texture>
A $selfillummask to blend with the Flowmap.

Supported effects

Example

Example showing the minimal needed parameters in order to make the shader work.

VortWarp
{

	$basetexture	lights/white
	$flowmap	shadertest/cloud

	$selfillummap	shadertest/lump
	$selfillumtint	"{ 200 15 0 }"

	$warpparam	1.0

}

See also