$basetexture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 12: Line 12:


== Additional Parameters ==
== Additional Parameters ==
<span id="$basetexturetransform"></span>
{{MatParam|$basetexturetransform|matrix| Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. {{VMT UVtransform}} }}
{{MatParam|$basetexturetransform|matrix| Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. {{VMT UVtransform}} }}


<span id="$frame"></span>
{{MatParam|$frame|int| The frame displayed for a multi-frame texture. This is normally set by the {{Code|[[List Of Material Proxies#Texture manipulation|AnimatedTexture]]}} or {{[[List Of Material Proxies#Entity integration|TextureToggle]]}} proxies, but can be set manually. {{Warning|The value must be a valid index, or crashes might occur.}} }}
{{MatParam|$frame|int| The frame displayed for a multi-frame texture. This is normally set by the {{Code|[[List Of Material Proxies#Texture manipulation|AnimatedTexture]]}} or {{[[List Of Material Proxies#Entity integration|TextureToggle]]}} proxies, but can be set manually. {{Warning|The value must be a valid index, or crashes might occur.}} }}


Line 21: Line 23:
{{MatParam|$basetexture2|texture}}
{{MatParam|$basetexture2|texture}}


<span  id="$basetexturetransform2"></span>
{{MatParam|$basetexturetransform2|matrix|
{{MatParam|$basetexturetransform2|matrix|


Line 31: Line 34:
}}
}}


<span  id="$frame2"></span>
{{MatParam|$frame2|int}}
{{MatParam|$frame2|int}}



Revision as of 07:02, 2 May 2023

English (en)Español (es)Русский (ru)Translate (Translate)

Template:Shaderparam It defines an albedo texture. It is very rare for a material not to use this parameter and some shaders will load a default texture if it stays undefined.

VMT Syntax

$basetexture	<texture without extension, relative to <game>\materials\>
LightmappedGeneric
{
	$basetexture	brick\brickwall031b
}

Additional Parameters

$basetexturetransform

$frame

$basetexture2

Some shaders (most notably WorldVertexTransition) allow the use of two albedos. The second texture is handled by a mirrored set of commands with '2' in their name:

$basetexture2

$basetexturetransform2

$frame2

There are further '2' commands applying to various shader effects, which are each documented in their respective articles.

See Also