$basetexture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
($basetexturetransform2's existence seems to be very borked, need further data)
(Updated $basetexturetransform2 bug)
Line 24: Line 24:
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|{{bug|<code>$basetexturetransform2</code> doesn't exist in the DX9 version of WorldVertexTransition, only working with the DX8 shader. This is the case in Source 2007, Source 2013, and Alien Swarm. Other games have not been tested.}}}}
{{MatParam|$basetexturetransform2|matrix|{{bug|<code>$basetexturetransform2</code> doesn't exist in the DX9 version of WorldVertexTransition, only working with the DX8 shader. <code>$basetexture2</code> will instead use the original <code>$basetexturetransform</code>. This is the case in Source 2007, Source 2013, and Alien Swarm. Other games have not been tested.}}}}
{{MatParam|$basetextureoffset2|normal|{{confirm|Does this parameter and the one below it even exist?}}}}
{{MatParam|$basetextureoffset2|normal|{{confirm|Does this parameter and the one below it even exist?}}}}
{{MatParam|$basetexturescale2|normal}}
{{MatParam|$basetexturescale2|normal}}

Revision as of 09:47, 25 August 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

$basetexturetransform $basetextureoffset $basetexturescale $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 $basetextureoffset2 $basetexturescale2 $frame2

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

See Also