Difference between revisions of "WorldTwoTextureBlend"

From Valve Developer Community
Jump to: navigation, search
m (Added note to avoid further confusion.)
(reformatting and linking)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
A partially transparent detail texture is blended on top of the base texture, according to the alpha channel of the detail texture.
+
'''<code>WorldTwoTextureBlend</code>''' is a [[lightmap]] shader used to render two [[albedo]]s at the same time with a single material. It uses the {{ent|$detail}} command to draw the uppermost albedo (unlike the command's normal usage). <code>$detail</code> must have an [[alpha channel]] if {{ent|$basetexture}} is to be seen!
{{note|Do not confuse this shader with the [[WorldVertexTransition]] shader used for displacement surfaces.}}
 
  
===Basic VMT Syntax===
+
{{note|Do not confuse this shader with <code>[[WorldVertexTransition]]</code>, which blends between textures but does not display one above the other.}}
{{stub}}
 
  
WorldTwoTextureBlend ?
+
==Syntax==
 +
<pre>
 +
WorldTwoTextureBlend
 +
{
 +
    $basetexture    <texture>
 +
    $detail        <texture with alpha channel>
 +
    $detailscale    <float>// Behaves normally
 +
}
 +
</pre>
  
===Additional Parameters===  
+
==Supported effects==
* $basetexture <texture>
+
*{{ent|$bumpmap}} (will not apply to <code>$detail</code>)
* $detail <texture>
+
*{{ent|$translucent}} and {{ent|$alpha}}
* $detailscale <float>
+
This shader does ''not'' support {{ent|$envmap}}.
* $surfaceprop <type>
 
  
 +
==See Also==
 +
*{{ent|WorldVertexTransition}}
 +
*{{ent|LightmappedGeneric}}
 +
*{{ent|$detailscale}}
  
 
+
[[Category:Shaders]]
[[Category:List of Shaders]]
 

Latest revision as of 12:24, 6 July 2018

WorldTwoTextureBlend is a lightmap shader used to render two albedos at the same time with a single material. It uses the $detail command to draw the uppermost albedo (unlike the command's normal usage). $detail must have an alpha channel if $basetexture is to be seen!

Note:Do not confuse this shader with WorldVertexTransition, which blends between textures but does not display one above the other.

Syntax

WorldTwoTextureBlend
{
    $basetexture    <texture>
    $detail         <texture with alpha channel>
    $detailscale    <float>// Behaves normally
}

Supported effects

This shader does not support $envmap.

See Also