# $basetexture

## $basetexture

**`$basetexture`** is a [material](/titanfall2/documentation/textures/valve-material-type-vmt.md) [shader](https://developer.valvesoftware.com/wiki/Shader) parameter available in all Source games. It defines an [albedo](/titanfall2/documentation/textures/albedo.md) texture. It is very rare for a [material](/titanfall2/documentation/textures/valve-material-type-vmt.md) not to use this parameter and some [shaders](/titanfall2/documentation/textures/shader.md) will load a default [texture](/titanfall2/documentation/textures.md) if it stays undefined.

## VMT syntax

```
$basetexture	<texture without extension, relative to <game>\materials\>
```

```
LightmappedGeneric
{
	$basetexture	brick\brickwall031b
}
```

### Additional parameters

#### `$basetexturetransform` `<`[`matrix`](https://developer.valvesoftware.com/wiki/Matrix)`>`

Transforms the texture before use in the material. This does not affect [lightmaps](/titanfall2/documentation/textures/lightmap.md) on the surface.The default position is `"center .5 .5 scale 1 1 rotate 0 translate 0 0"`.

1. `center` defines the point of rotation. Only useful if `rotate` is being used.
2. `scale` fits the texture into the material the given number of times. '`2 1`' is a 50% scale in the X axis.
3. `rotate` rotates the texture counter-clockwise in degrees. Accepts any number, including negatives.
4. `translate` shifts the texture by the given numbers. '`.5`' will shift it half-way.

{% hint style="info" %}
All values must be included!
{% endhint %}

{% hint style="warning" %}
**Bug:** Scaling the texture may cause odd issues where the Texture Lock tool in Hammer will not actually lock the texture in place.
{% endhint %}

{% hint style="warning" %}
**Bug:** Rotating textures applied on brushes will rotate around the map origin (confirm: Orangebox engine only?). A fix for this is to change the center position in the VMT to the brush's origin.
{% endhint %}

#### `$frame` `<`[`integer`](https://developer.valvesoftware.com/wiki/Integer)`>`

The frame displayed for a multi-frame texture. This is normally set by the [AnimatedTexture](https://developer.valvesoftware.com/wiki/List_Of_Material_Proxies#Texture_manipulation) or [TextureToggle](https://developer.valvesoftware.com/wiki/List_Of_Material_Proxies#Entity_integration) proxies, but can be set manually. The value must be a valid index, or crashes might occur.

## $basetexture2

Some shaders (most notably [WorldVertexTransition](https://developer.valvesoftware.com/wiki/WorldVertexTransition)) allow the use of two albedos. The second texture is handled by a mirrored set of commands with '2' in their name:

#### `$basetexture2` `<`[`texture`](/titanfall2/documentation/textures.md)`>`

#### `$basetexturetransform2` `<`[`matrix`](https://developer.valvesoftware.com/wiki/Matrix)`>`

{% hint style="warning" %}
**Bug:** `$basetexturetransform2` doesn't exist in the DX9 version of WorldVertexTransition, only working with the DX8 shader. In DX9, `$basetexture2` will instead move with the original `$basetexturetransform` in sync with `$basetexture`. This is the case in [![\<Source>](https://developer.valvesoftware.com/w/images/1/18/Source_07_icon_16x16.png)](https://developer.valvesoftware.com/wiki/Source_2007) [Source 2007](https://developer.valvesoftware.com/wiki/Source_2007), [![\<Source>](https://developer.valvesoftware.com/w/images/3/3b/Source_13_icon_16x16.png)](https://developer.valvesoftware.com/wiki/Source_2013) [Source 2013](https://developer.valvesoftware.com/wiki/Source_2013), and [![\<Alien Swarm>](https://developer.valvesoftware.com/w/images/c/c9/AS-16px.png)](https://developer.valvesoftware.com/wiki/Alien_Swarm) [Alien Swarm](https://developer.valvesoftware.com/wiki/Alien_Swarm). Other games have not been tested.
{% endhint %}

{% hint style="info" %}
**Code Fix:** [![\<Mapbase>](https://developer.valvesoftware.com/w/images/a/a8/Icon_Mapbase.png)](https://developer.valvesoftware.com/wiki/Mapbase) [Mapbase](https://developer.valvesoftware.com/wiki/Mapbase) adds support for `$basetexturetransform2` in Source 2013. The specific code can be found [on its repository](https://github.com/mapbase-source/source-sdk-2013) in the [LightmappedGeneric](https://developer.valvesoftware.com/wiki/LightmappedGeneric) shader files.
{% endhint %}

#### `$frame2` `<`[`integer`](https://developer.valvesoftware.com/wiki/Integer)`>`

There are further '2' commands applying to various shader effects, which are each documented in their respective articles.

## **Source & reference**

{% hint style="info" %}
Source: <https://developer.valvesoftware.com/wiki/$basetexture>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://noskill.gitbook.io/titanfall2/documentation/textures/shader/usdbasetexture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
