$basetexture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
'''The $basetexture shader parameter specifies the [[VTF]] texture to use for the basic diffusemap (local colour) of the material surface.'''
'''The $basetexture shader parameter specifies the [[VTF]] texture to use for the basic 'skin' or diffusemap of the material surface.'''


=== Syntax ===
=== Basic VMT Syntax ===
  "$basetexture" "Path/Texture"  
  "$basetexture" "Path/TextureA"  
* <code>Path</code> is relative to <code>game_directory/materials</code> folder.
* where '''<code>Path</code>''' is the filepath relative to <code>game_directory/materials</code> folder.
* <code>Texture</code> is the filename, eg <code>texture.vtf</code>.  
* where '''<code>TextureA</code>''' is the filename; ie <code>TextureA.vtf</code>.  
* Notice the <code>.vtf</code> file extension is not used in VMT texture references.
* Notice the <code>.vtf</code> file extension is not used in VMT texture references.


Line 10: Line 10:


=====$basetexture2=====
=====$basetexture2=====
  "$basetexture2" "Path/Texture2"  
"$basetexture" "Path/TextureA"
  "$basetexture2" "Path/TextureB"  
* Used for the [[WorldVertexTransition]] shader.  
* Used for the [[WorldVertexTransition]] shader.  


=====$texture2=====
=====$texture2=====
  "$texture2" "Path/Texture2"  
"$basetexture" "Path/TextureA"
  "$texture2" "Path/TextureB"  
* Used for the [[WorldTwoTextureBlend]] and [[UnlitTwoTexture]] shaders.  
* Used for the [[WorldTwoTextureBlend]] and [[UnlitTwoTexture]] shaders.  
=== See Also ===
* Tutorial [[Multiple Skins for a Single Model]]





Revision as of 16:21, 8 November 2007

The $basetexture shader parameter specifies the VTF texture to use for the basic 'skin' or diffusemap of the material surface.

Basic VMT Syntax

"$basetexture" "Path/TextureA" 
  • where Path is the filepath relative to game_directory/materials folder.
  • where TextureA is the filename; ie TextureA.vtf.
  • Notice the .vtf file extension is not used in VMT texture references.

Additional Parameters

$basetexture2
"$basetexture" "Path/TextureA" 
"$basetexture2" "Path/TextureB" 
$texture2
"$basetexture" "Path/TextureA" 
"$texture2" "Path/TextureB" 


See Also