$basetexture: Difference between revisions
Jump to navigation
Jump to search
(Removed the $basetextureoffset/scale parameters, as they're apparently only used by the Shadow shader) |
(Added Template:Game link usage; mentioned Mapbase fix) |
||
Line 22: | Line 22: | ||
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: | 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: | ||
{{MatParam|$basetexture2|texture}} | {{MatParam|$basetexture2|texture}} | ||
{{MatParam|$basetexturetransform2|matrix|{{ | {{MatParam|$basetexturetransform2|matrix|{{bugfix|<code>$basetexturetransform2</code> doesn't exist in the DX9 version of WorldVertexTransition, only working with the DX8 shader. In DX9, <code>$basetexture2</code> will instead move with the original <code>$basetexturetransform</code> in sync with <code>$basetexture</code>. This is the case in {{Game link|Source 2007}}, {{Game link|Source 2013}}, and {{Game link|Alien Swarm}}. Other games have not been tested.|{{Game link|Mapbase}} adds support for <code>$basetexturetransform2</code> in Source 2013. The specific code can be found [https://github.com/mapbase-source/source-sdk-2013 on its repository] in the [[LightmappedGeneric]] shader files.|code}}}} | ||
{{MatParam|$frame2|int}} | {{MatParam|$frame2|int}} | ||
Revision as of 20:29, 24 December 2019
Template:Otherlang2 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
$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
- $envmapmask (specular mask)
- $envmap (environment map)
- $phong (diffuse reflection)
- $selfillum