$basetexture: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) m (→VMT Syntax: forward slashes are preferred) |
ShiroDkxtro2 (talk | contribs) m (No, Transform Parameters don't mess with Lightmaps) |
||
Line 14: | Line 14: | ||
<span id="$basetexturetransform"></span> | <span id="$basetexturetransform"></span> | ||
{{MatParam|$basetexturetransform|matrix| Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. | {{MatParam|$basetexturetransform|matrix| Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. | ||
{{note|This '' | {{note|This ''will'' transform other textures such as {{ent|$detail}}, {{ent|$bumpmap}} and {{ent|$envmapmask}}, if their own respective texture transform parameters haven't been set.<br> | ||
Sometimes, it can transform the textures even then. Usually when the Interpolator limit on the Vertex Shader Output is reached.<br> | |||
The Programmers cut down on required Interpolators by forcing textures to use the same UV and thus the same transform parameter.<br> | |||
As a general rule of thumb, base and envmapmask transforms stay separate, bump and detail transforms are prone to merge.<br> | |||
The extent to which this happens, varies drastically with Shader and even Branch of the Engine.}} | |||
{{VMT UVtransform}} }} | {{VMT UVtransform}} }} | ||
Revision as of 16:15, 8 August 2024
$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 albedos. 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