Difference between revisions of "$blendmodulatetexture"
TomEdwards (talk | contribs) (incompatibilities) |
|||
Line 7: | Line 7: | ||
{{note|Incompatible with [[$basetexturetransform]] and [[$detail]].}} | {{note|Incompatible with [[$basetexturetransform]] and [[$detail]].}} | ||
− | + | {{note|In the 2006 engine, incompatible with [[$envmaptint]] and [[$envmapmask]].}} | |
== Blend modulate textures == | == Blend modulate textures == | ||
Revision as of 13:43, 24 December 2010
$blendmodulatetexture
is a material parameter for the WorldVertexTransition
shader. It changes the transition between the textures from a smooth, linear gradient to one "stamped" with a pattern.
You should use $blendmodulatetexture
wherever possible, as the improvement in visual quality is immense!


Blend modulate textures

Only two colour channels are read from the texture:
- Green
- Biases toward
$basetexture2
. 128 is normal. - The idea is to paint noise and patterns into this channel, so that the edge between the two textures becomes irregular. Valve's snow texture (see right) has lots of ragged edges in the green channel, and even some bootprints. There are also lines painted along the edges of the albedo's bricks that give them a tendency to have snow along their edges.
- Red
- Sharpens. 0 makes the transition binary, 255 effectively disables modulation.
- The red channel of Valve's snow modulation texture is a constant 99, which produces a fairly sharp falloff. Using different values in different places has the potential to produce a more complex effect.
There is not always a need for the texture to be high resolution - high frequency blends can be produced from low-re textures.