$basetexture: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{ | {{Lang}}__NOTOC__ | ||
{{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. | {{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 Syntax == | ||
$basetexture <texture without extension, relative to <game>\materials\> | $basetexture <texture without extension, relative to <game>\materials\> | ||
Line 10: | Line 12: | ||
== Additional Parameters == | == Additional Parameters == | ||
{{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}}}} | {{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>$basetexture2</code> = | = <code>$basetexture2</code> = | ||
Some shaders (most notably {{ | Some shaders (most notably {{Code|[[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}} doesn't exist in the DirectX 9 version of {{Code|[[WorldVertexTransition]]}}, only working with the DX8 shader. In DX9, {{Code|$basetexture2}} will instead move with the original {{Code|$basetexturetransform}} in sync with {{Code|$basetexture}}. 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}} 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 | |||
}} | |||
}} | |||
{{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}} | |||
[[Category:List of Shader Parameters|B]] | [[Category:List of Shader Parameters|B]] |
Revision as of 06:54, 2 May 2023
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:
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