Quote:

d3d_automaterial
Activates automatic material assignments by material names. This way, default materials can be assigned to individual level textures and entity files, and material effects like bumpmapping and shaders can be assigned to level texures.
Range:
0 no automatic material assignment (default).
1 assign a material to all level textures with the same name.
2 assign a material to all level textures and entity files with the same name ('.' replaced by an underscore '_').

Type:
var, redefine
Remarks:
For assigning a material to a certain texture, define it with the same name as the texture.
For assigning a material to a certain file, define a material that has the same name as the file with the extension preceded by an underscore (like "warlock_mdl" or"brickwall_tga").
Surface texture names are limited to 15 characters.
Levels load faster if this variable is at 0.
Example:
d3d_automaterial = 2;
...
material stonewall { ... } // assigned to all "stonewall" surface textures
material skyblue_tag { ... } // assigned to "skyblue.tga"
material monster_mdl { ... } // assigned to "monster.mdl"