WorldTwoTextureBlend: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(reformatting and linking)
mNo edit summary
Line 2: Line 2:


{{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]]</code>, 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==

Revision as of 21:16, 28 December 2023

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