WorldVertexTransition: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 30: Line 30:
* <code>[[$ssbump]]</code> (whole material only '''EDIT:''' What does "whole material" mean?)
* <code>[[$ssbump]]</code> (whole material only '''EDIT:''' What does "whole material" mean?)
* <code>[[$detail]]</code> (whole material only)
* <code>[[$detail]]</code> (whole material only)
* <code>[[$envmap]]</code>
* <code>[[$envmap]]</code> (will disable <code>[[$blendmodulatetexture]]</code> if both used)
* {{todo|<code>[[$outline]]</code>?}}
* {{todo|<code>[[$outline]]</code>?}}
* <code>[[$translucent]]</code> and <code>[[$alpha]]</code> (whole material only)
* <code>[[$translucent]]</code> and <code>[[$alpha]]</code> (whole material only)

Revision as of 02:18, 22 December 2016

Application without and with $blendmodulatetexture.

WorldVertexTransition is the shader 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.

Example

WorldVertexTransition
{
	$basetexture nature/dirtfloor006a
	$surfaceprop dirt

	$basetexture2 nature/rockfloor005a
	$surfaceprop2 rock

	%tooltexture nature/blendrockgrass004a_tooltexture
}
  • Just about all 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 effects

See also