$basetexture: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) |
Le Glaconus (talk | contribs) m (formatting fix) |
||
Line 22: | Line 22: | ||
<span id="$frame"></span> | <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 {{Code|[[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.}} }} | ||
= <code>$basetexture2</code> = | = <code>$basetexture2</code> = |
Revision as of 11:17, 10 May 2025
$basetexture
is a material shader parameter available in all Source games. It typically defines a diffuse 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
$basetexture2
Some shaders (most notably WorldVertexTransition) allow the use of two diffuse textures. The second texture is handled by a mirrored set of commands with '2' in their name:
There are further '2' commands applying to various shader effects, which are each documented in their respective articles.
See also
- $envmapmask (specular mask)
- $envmap (environment map)
- $phong (diffuse reflection)
- $selfillum