WorldVertexTransition: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Misc fixes)
m (Changed add templates to since template)
Line 25: Line 25:
== Supported Parameters ==
== Supported Parameters ==


; {{ent|$blendmodulatetexture}} {{EP1 add}}
; {{ent|$blendmodulatetexture}} {{since|{{src06}}}}
: Modulate the blending between materials using a special texture.
: Modulate the blending between materials using a special texture.
; {{ent|$bumpmap}}
; {{ent|$bumpmap}}
Line 33: Line 33:
; {{ent|$envmap}}
; {{ent|$envmap}}
: Specular reflections. {{todo|Might disable <code>$blendmodulatetexture</code> if both are used.}}
: Specular reflections. {{todo|Might disable <code>$blendmodulatetexture</code> if both are used.}}
; {{ent|$lightwarptexture}} {{EP1 add}}
; {{ent|$lightwarptexture}} {{since|{{src06}}}}
: Per-texel color modification via a warp texture. Applies the lightwarp to both materials.
: Per-texel color modification via a warp texture. Applies the lightwarp to both materials.
; {{ent|$seamless_scale}} {{EP2 add}}
; {{ent|$seamless_scale}} {{since|{{src06}}}}
: Mitigation for displacement texture stretching.
: Mitigation for displacement texture stretching.
; {{ent|$selfillum}}
; {{ent|$selfillum}}
: Self-illumination. Applies the self-illumination to both materials. {{todo|Might disable <code>$blendmodulatetexture</code> if both are used.}}
: Self-illumination. Applies the self-illumination to both materials. {{todo|Might disable <code>$blendmodulatetexture</code> if both are used.}}
; {{ent|$ssbump}} {{EP2 add}}
; {{ent|$ssbump}} {{since|{{src07}}}}
: Self-shadowing bumpmapping. If two bumpmaps are used, both must be self-shadowing bumpmaps in order for this to work properly.
: Self-shadowing bumpmapping. If two bumpmaps are used, both must be self-shadowing bumpmaps in order for this to work properly.
; {{ent|$translucent}}
; {{ent|$translucent}}
; {{ent|$alpha}}
; {{ent|$alpha}}
: Expensive and cheap transparency. Applies the transparency to both materials.
: Expensive and cheap transparency. Applies the transparency to both materials.
; {{ent|$phong}} {{CSGO only}}
; {{ent|$phong}} {{only|{{csgo}}}}
: Diffuse reflections.
: Diffuse reflections.



Revision as of 20:17, 22 April 2020

Application without and with $blendmodulatetexture.

Shader-ball.png WorldVertexTransition It is used to blend the vertices of a displacement surface between two different materials. It handles two at once by using a mirrored set of parameters with "2" in their name.

The pattern of the blend is defined by Hammer's alpha painting tool. The blend is normally a linear gradient, but it can also be "stamped" by a texture specified with $blendmodulatetexture. This command makes the material look considerably better for very little cost - use it often!

Note.pngNote:This shader now only works on displacements. If used on a regular brush, VBSP will generate and pack a LightmappedGeneric version of the material automatically, discarding the secondary texture.

Example

WorldVertexTransition
{
	$basetexture nature/dirtfloor006a
	$surfaceprop dirt

	$basetexture2 nature/rockfloor005a
	$surfaceprop2 rock

	%tooltexture nature/blendrockgrass004a_tooltexture
}
  • Some visual effects can be selectively applied to one sub-material or the other. See the relevant articles for more details.
  • The Hammer material browser won't be able to display a preview of the material unless it's given a %tooltexture.

Supported Parameters

$blendmodulatetexture (in all games since Source 2006)
Modulate the blending between materials using a special texture.
$bumpmap
Bumpmapping.
$detail
Detail texturing. Applies the same detail texture to both materials.
$envmap
Specular reflections.
Todo: Might disable $blendmodulatetexture if both are used.
$lightwarptexture (in all games since Source 2006)
Per-texel color modification via a warp texture. Applies the lightwarp to both materials.
$seamless_scale (in all games since Source 2006)
Mitigation for displacement texture stretching.
$selfillum
Self-illumination. Applies the self-illumination to both materials.
Todo: Might disable $blendmodulatetexture if both are used.
$ssbump (in all games since Source 2007)
Self-shadowing bumpmapping. If two bumpmaps are used, both must be self-shadowing bumpmaps in order for this to work properly.
$translucent
$alpha
Expensive and cheap transparency. Applies the transparency to both materials.
$phong (only in Counter-Strike: Global Offensive)
Diffuse reflections.

See also