WorldVertexTransition: Difference between revisions
(Note that $vertexalpha requires $vertexcolor) |
SirYodaJedi (talk | contribs) m (→Supported Parameters: fix formatting) |
||
Line 34: | Line 34: | ||
== Supported Parameters == | == Supported Parameters == | ||
{{MatParam|$basetexture|texture| The first texture in the blend.}} | |||
{{MatParam|$basetexture2|texture| The second texture to blend to.}} | |||
{{MatParam|$bumpmap|texture|bumpmap for the first texture.}} | |||
{{MatParam|$bumpmap2|texture| bumpmap for the second texture.}} | |||
{{MatParam|$blendmodulatetexture|texture|since={{src06}}|Modulate the blending between materials using a special texture.}} | |||
{{MatParam|$detail|texture| Detail texturing. Applies the same detail texture to both materials. In {{csgo}}, [[$detail#CS:GO_WorldVertexTransition_Parameters|each layer can use their own detail texture.]]}} | |||
{{MatParam|$envmap|texture|Specular reflections. In {{csgo}}, [[$envmapmask#CS:GO_WorldVertexTransition_Parameters|each layer can have their own specular mask.]] {{todo|Might disable <code>$blendmodulatetexture</code> if both are used.}} }} | |||
{{MatParam|$lightwarptexture|texture|since={{src06}}| Per-texel color modification via a warp texture. Applies the lightwarp to both materials.}} | |||
{{MatParam|$seamless_scale|float|since={{src07}}| Mitigation for displacement texture stretching.}} | |||
{{MatParam|$selfillum|bool| Self-illumination. Applies the self-illumination to both materials. {{todo|Might disable <code>$blendmodulatetexture</code> if both are used.}} }} | |||
{{MatParam|$ssbump|bool|since={{src07}}|Self-shadowing bumpmapping. If two bumpmaps are used, both must be self-shadowing bumpmaps in order for this to work properly.}} | |||
{{MatParam|$translucent|bool}} | |||
{{MatParam|$alpha|float| Expensive and cheap transparency{{clarify}}. Applies the transparency to both materials.}} | |||
{{MatParam|$vertexalpha|bool| Causes the material to blend between the primary texture and full transparency. Automatically marks the material as {{ent|$translucent}}. Requires <code>$vertexcolor</code> to be set to 1.}} | |||
{{MatParam|$additive|bool| Adds the color of the pixels on the surface with the pixels of objects behind it.}} | |||
{{MatParam|$phong|bool|only={{csgo}}}| Diffuse reflections.}} | |||
{{MatParam|$layertint1|color255|only={{csgo}}| SRGB tint layer 1.}} | |||
{{MatParam|$layertint2|color255|only={{csgo}}}| SRGB tint layer 2.}} | |||
{{MatParam|detailtype{{!}}%detailtype|string| Specifies what {{ent|Detail props}} to spawn on the material. The string should be the name of a detail type outlined in "detail.vbsp" or your specified .vbsp file.[[%detailtype]] | |||
{{note|On some materials, the sprites only show up on $basetexture, but not on $basetexture2. This may also happen when you make your own blend material using rocks and grass. If rock is $basetexture, only the rock will have grass sprites, which looks odd.}}}} | |||
{{note|On some materials, the sprites only show up on $basetexture, but not on $basetexture2. This may also happen when you make your own blend material using rocks and grass. If rock is $basetexture, only the rock will have grass sprites, which looks odd.}} | |||
== See also == | == See also == |
Revision as of 20:04, 25 June 2023

Remember to check for any notes left by the tagger at this article's talk page.

$blendmodulatetexture
.
WorldVertexTransition
It is a shader functionally similar to LightmappedGeneric primarily used to perform a per-vertex linear blend between two textures on a displacement surface. Many of the parameter definitions for the secondary material are the same as the first material except with a "2" at the end. ex: $basetexture2
You can choose which texture you would like to appear on a vertex using Hammer's alpha painting tool. The blend is normally a linear gradient, but you can control the blend on a per-pixel basis by specifying $blendmodulatetexture in the material.
Caveats






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
$basetexture
$basetexture2
$bumpmap
$bumpmap2
$blendmodulatetexture
$detail
$envmap
$lightwarptexture
$seamless_scale
$selfillum
$ssbump
$translucent
$alpha
$vertexalpha
$additive
$phong
$layertint1
$layertint2
%detailtype|detailtype|%detailtype
See also
- LightmappedGeneric, the standard shader for lightmapped surfaces.
- Lightmapped_4WayBlend, an upgraded displacement blend shader for
.
- LightmappedTwoTexture, a brush shader that multiplies a texture on top of another one.
- WorldTwoTextureBlend, a brush shader that applies a texture on top of another one using $detail.
- Displacement, the surface type this shader is used on.