$blendmodulatetexture
Jump to navigation
Jump to search
Template:Shaderparam It changes the transition between the textures from a smooth, linear gradient to one "stamped" with a pattern.

$blendmodulatetexture
wherever possible, as the improvement in visual quality is immense!Caveats
- Incompatible with
$normalmapalphaenvmapmask
(use$envmapmask
instead).Todo: Only in later games? - In Template:Game name, Template:Game name, and Template:Game name, incompatible with
$basetexturetransform
and$detail
. - In Template:Game name, additionally incompatible with
$envmaptint
and$envmapmask
. - In Template:Game name, modulation textures are not aligned correctly. Use
$blendmasktransform "center .5 .5 scale 1 -1 rotate 90 translate 0 0"
to fix them up.
In some additional cases, textures will blend as if $blendmodulatetexture
were not used:
- Does not display when viewed through water. Todo: Only in earlier games?
- Does not display when illuminated with player's flashlight in Template:Game name. This is fixed in Template:Game name.
- Does not display in the Hammer Editor in most games. Known exceptions include Template:Game name, Template:Game name, Template:Game name, and Template:Game name.
Parameters
$blendmodulatetexture
$blendmasktransform
Blend Modulation Textures

Only two colour channels are read from the texture:
- Green
- Biases in favor of
$basetexture
; high-value areas will be the most resistant to modulation. 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-res textures.