This article's documentation is for anything that uses the Source engine. Click here for more information.

VortWarp: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Oops, forgot one of the most important parameters.)
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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 is a|vertex shader|name=VortWarp|since=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.
 
{{bug|Acts weirdly when lit by flashlight.}}


== Shader parameters ==
== Shader parameters ==
Line 8: Line 10:
: Flowmap to use.
: Flowmap to use.


; <code>$warpparam <[[float]]></code>
; <code>$entityorigin <[[vector]]></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.}}
: The point which the model will be squished to. The entire model will try to be squished into that point. If unspecified becomes the world origin by default, "[0 0 0]".


; <code>$entityorigin <[[vector]]></code>
{{TODO|Test on brushes more. Test on world brushes, and on entity brushes. Do entities (ex. prop_static) and brushes have their $entityorigin centered by default, or again defaults to world origin?}}
: {{TODO|Find out what this is for. Seems to be related to EntityOrigin proxy.}}.


; <code>$warpparam <[[float]]></code>
: Warping amount toward the specified $entityorigin. 1.0 leaves the model unaffected, lower values squish more, while 0.0 makes it practically invisible. Does not accept values outside of that range.
; <code>$selfillummap <[[texture]]></code>
; <code>$selfillummap <[[texture]]></code>
: A [[Glowing_Textures#.24selfillum_textures|$selfillummask]] to blend with the Flowmap.
: A [[Glowing_Textures#.24selfillum_textures|$selfillummask]] to blend with the Flowmap.

Latest revision as of 18:20, 17 May 2024

VortWarp is a Vertex shader available in all Source Source games since Half-Life 2: Episode One 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.

Icon-Bug.pngBug:Acts weirdly when lit by flashlight.  [todo tested in ?]

Shader parameters

$unlit <bool>
Whether or not the material should be lit.
$flowmap <texture>
Flowmap to use.
$entityorigin <vector>
The point which the model will be squished to. The entire model will try to be squished into that point. If unspecified becomes the world origin by default, "[0 0 0]".
Todo: Test on brushes more. Test on world brushes, and on entity brushes. Do entities (ex. prop_static) and brushes have their $entityorigin centered by default, or again defaults to world origin?
$warpparam <float>
Warping amount toward the specified $entityorigin. 1.0 leaves the model unaffected, lower values squish more, while 0.0 makes it practically invisible. Does not accept values outside of that range.
$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