This article's documentation is for anything that uses the Source engine. Click here for more information.

LightmappedGeneric

From Valve Developer Community
Revision as of 14:02, 12 March 2025 by JasperCarmack (talk | contribs) (Added bug to $color where projected textures do not affected color tinted materials.)
Jump to navigation Jump to search
English (en)Français (fr)Русский (ru)Translate (Translate)

LightmappedGeneric is a Pixel shader available in all Source Source games. It is the shader most commonly used to render lightmapped brushes and displacements.

Models cannot use this shader; lightmapped models use the VertexLitGeneric shader.

Supported Parameters

Basics

$basetexture $decal $detail $surfaceprop

Adjustment

$basetexturetransform $color

Icon-Bug.pngBug:Greyscale materials using $color as a sole source of tint will not appear colored under light cast by the player flashlight (or a projected texture). This results in textures appearing grey and desaturated. A workaround for this is to add a base grey $detail to the material and then and then use $detailtint to color it. Tested in Source 2013 Singleplayer, Source 2013 Multiplayer.  [todo tested in ?]

$decalscale $detailscale $detailblendfactor $detailblendmode $modelmaterial $pointsamplemagfilter $seamless_scale

Transparency

$alpha $alphatest $distancealpha $nocull $translucent

Lighting

$bumpmap $blendmodulatetexture $lightwarptexture $selfillum $ssbump

Reflection

$envmap $phong $phong_exp $phong_exp2

Portal 2Paint

$paintsplatnormalmap $paintsplatbubblelayout $paintsplatbubble $paintenvmap


Texture Organization

%keywords %notooltexture %tooltexture

Effect

$nofog

Caveats

Mapbase

LightmappedGeneric materials in Mapbase should have the shader SDK_LightmappedGeneric.


See also