$lightmap
Jump to navigation
Jump to search
$lightmap
is a material shader parameter for the VertexLitGeneric shader available in Source 2013 Multiplayer and
Garry's Mod.

- The {{{game}}} parameter is inconsistent with the name defined by the {{Source 2013 MP}} template. This can most likely be fixed by setting the value of the {{{game}}} parameter to Source 2013 Multiplayer.
If a parameter is consistent but you're still seeing this warning, it may be an issue with the template itself. Please discuss it on the template's talk page.
It defines a lightmap to be used to light the MDL model's material, instead of the per-vertex lighting used by prop_static or point-based vertex lighting used by other models.
This parameter does not usually need to be added manually, as VRAD will generate model lightmaps automatically if generatelightmaps is enabled for the prop_static and -StaticPropLighting is enabled in VRAD. Nonetheless, it can still be added manually, such as for using a lightmap on a prop_dynamic, or if a prop_static has multiple materials (as VRAD can only generate lightmaps for the first material and skin).

VRAD has a -dumppropmaps option, which will create external TGA versions of the generated static prop lightmaps which can be converted to VTF and manually defined as a $lightmap.
- For already-compiled maps, the lightmaps are stored as PPL files. These can be converted to VTF using Ficool2's proptexelvtf.exe (direct download).




VMT syntax
$lightmap <texture>
Limitations and caveats


See also
- Modulate - A shader that can be used to fake lightmaps or vertex coloring in all Source engine branches. It can bypass some of the limitations of $lightmap, but requires additional setup to look convincing.