WorldTwoTextureBlend: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (fix link)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''<code>WorldTwoTextureBlend</code>''' is a [[lightmap]] shader used to render two [[albedo]]s at the same time with a single material. It uses the <code>$detail</code> command to draw the uppermost albedo. <code>$detail</code> must have an [[alpha channel]] if <code>$basetexture</code> is to be seen!
{{cleanup|Bring to standards set by other shader pages, and mention other available shader parameters (what's {{cmd|$albedo}}?) See [https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/materialsystem/stdshaders/worldtwotextureblend.cpp SDK source code].}}
'''{{code|WorldTwoTextureBlend}}''' is a [[lightmap]] shader used to render two [[albedo]]s at the same time with a single material. It uses the {{cmd|$detail}} command to draw the uppermost albedo (unlike the command's normal usage). {{code|$detail}} must have an [[alpha channel]] if {{cmd|$basetexture}} is to be seen!


{{note|Do not confuse this shader with <code>[[WorldVertexTransition]]</code>, which blends between textures but does not display one above the other.}}
{{note|Do not confuse this shader with {{code|[[WorldVertexTransition]]}}, which blends between textures but does not display one above the other.}}
{{tip|Effectively equivalent to {{code|$detailblendmode 2}} (working around the blend mode's incompatibility with {{code|LightmappedGeneric}} and {{code|WorldVertexTransition}}), but with fewer available parameters.}}


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


'''WorldTwoTextureBlend'''
==Supported effects==
{
* {{cmd|$bumpmap}} (will not apply to {{code|$detail}})
[[$basetexture]] <texture>
* {{cmd|$translucent}} and {{cmd|$alpha}}
$detail <texture with alpha channel>
* {{cmd|$seamless_scale}}
[[$detailscale]] <[[float]]> ''// Behaves normally''
This shader does ''not'' support {{ent|$envmap}}.
}


== Supported effects ==
==See also==
* {{ent|WorldVertexTransition}}
* {{ent|LightmappedGeneric}}
* {{cmd|$detailscale}}
* {{ent|LightmappedTwoTexture}}


*<code>[[$bumpmap]]</code> (will not apply to <code>$detail</code>)
[[Category:Shaders]]
*<code>[[$translucent]]</code> and <code>[[$alpha]]</code>
 
This shader does ''not'' support <code>[[$envmap]]</code>.
 
== See also ==
 
*<code>[[WorldVertexTransition]]</code>
*<code>[[LightmappedTwoTexture]]</code>
*<code>[[LightmappedGeneric]]</code>
 
[[Category:List of Shaders]]

Latest revision as of 20:35, 16 March 2025

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality because:
Bring to standards set by other shader pages, and mention other available shader parameters (what's $albedo?) See SDK source code.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

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.pngNote:Do not confuse this shader with WorldVertexTransition, which blends between textures but does not display one above the other.
Tip.pngTip:Effectively equivalent to $detailblendmode 2 (working around the blend mode's incompatibility with LightmappedGeneric and WorldVertexTransition), but with fewer available parameters.

Syntax

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

Supported effects

This shader does not support $envmap.

See also