This article's documentation is for anything that uses the Source engine. Click here for more information.

$basetexture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Minor change to {{this is a}})
m (Multipage removal)
Line 1: Line 1:
{{langsp}}__NOTOC__
{{LanguageBar}}
__NOTOC__
{{this is a|shader parameter|name=$basetexture}} It defines a [[diffuse]] 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.
{{this is a|shader parameter|name=$basetexture}} It defines a [[diffuse]] 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.


Line 45: Line 46:
* {{Ent|$phong}} (diffuse reflection)
* {{Ent|$phong}} (diffuse reflection)
* {{Ent|$selfillum}}
* {{Ent|$selfillum}}
[[Category:Shader parameters|b]]

Revision as of 02:02, 12 July 2024

English (en)Español (es)Русский (ru)Translate (Translate)

$basetexture is a material shader parameter available in all Source Source games. It 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

$basetexturetransform

$frame

$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