$basetexture: Difference between revisions
Jump to navigation
Jump to search
m (Used colorful game links. Added anchors for shader parameters so redirects can directly target the right spot of this page.) |
Kestrelguy (talk | contribs) m (minor formatting changes) |
||
Line 1: | Line 1: | ||
{{lang|$basetexture}} | {{lang|$basetexture}}[[Category:Glossary]][[Category:List of Shader Parameters|B]]__NOTOC__ | ||
{{Shaderparam| | {{Shaderparam|$basetexture}} It defines an [[albedo]] texture. It is very rare for a [[material]] not to use this parameter and some [[shader]]s will load a default [[texture]] if it stays undefined. | ||
== VMT Syntax == | |||
== VMT | |||
$basetexture <texture without extension, relative to <game>\materials\> | $basetexture <texture without extension, relative to <game>\materials\> | ||
Line 10: | Line 9: | ||
} | } | ||
== Additional | == Additional Parameters == | ||
<span id="$basetexturetransform"></span> | <span id="$basetexturetransform"></span> | ||
{{MatParam|$basetexturetransform|matrix|Transforms the texture before use in the material. This does not affect [[ | {{MatParam|$basetexturetransform|matrix|Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. | ||
{{VMT UVtransform}}}} | {{VMT UVtransform}}}} | ||
<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 [[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]]</code> or <code>[[List_Of_Material_Proxies#Entity_integration|TextureToggle]]</code> proxies, but can be set manually. {{warning|The value must be a valid index, or crashes might occur.}}}} | ||
= <code>$basetexture2</code> = | = <code>$basetexture2</code> = | ||
Some shaders (most notably | Some shaders (most notably {{ent|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}} | ||
<span id="$basetexturetransform2"></span> | <span id="$basetexturetransform2"></span> | ||
{{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 {{ | {{MatParam|$basetexturetransform2|matrix|{{bugfix|<code>$basetexturetransform2</code> doesn't exist in the DX9 version of <code>WorldVertexTransition</code>, 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 {{src07|4}}, {{src13|4}}, and {{as|4}}. Other games have not been tested.|{{mapbase|4}} 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 {{ent|LightmappedGeneric}} shader files.|code}}}} | ||
<span id="$frame2"></span> | <span id="$frame2"></span> | ||
{{MatParam|$frame2|int}} | {{MatParam|$frame2|int}} | ||
There are further '2' commands applying to various shader effects, which are each documented in their respective articles. | There are further '2' commands applying to various shader effects, which are each documented in their respective articles. | ||
==See Also== | ==See Also== | ||
* | * {{ent|$envmapmask}} (specular mask) | ||
* | * {{ent|$envmap}} (environment map) | ||
* | * {{ent|$phong}} (diffuse reflection) | ||
* | * {{ent|$selfillum}} | ||
Revision as of 15:00, 9 May 2022
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