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

LightmappedGeneric: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added bug to $color where projected textures do not affected color tinted materials.)
m (Shifted bug to within $color border segment)
Line 14: Line 14:
=== Adjustment ===
=== Adjustment ===
{{MatParam|$basetexturetransform|matrix| Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. }}
{{MatParam|$basetexturetransform|matrix| Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. }}
{{MatParam|$color|RGB matrix|Independently scales the red, green and blue channels of an albedo.}}
{{MatParam|$color|RGB matrix|Independently scales the red, green and blue channels of an albedo.
{{bug|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 {{src13sp}}, {{src13mp}}.}}
{{bug|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 {{src13sp}}, {{src13mp}}.}}}}
{{MatParam|$decalscale|float|Same as a brush face's texture scale value: the number of [[unit|units]] that each [[texel]] covers. Normally 0.25 or lower. }}
{{MatParam|$decalscale|float|Same as a brush face's texture scale value: the number of [[unit|units]] that each [[texel]] covers. Normally 0.25 or lower. }}
{{MatParam|$detailscale|float|Fits the detail texture onto the material the given number of times (default {{=}} 4). Generally used instead of {{mono|$detailtexturetransform}} with a value of around 7 or 8 for a 128px detail texture. To independently scale the X and Y coordinates, place your values in brackets: {{mono|$detailscale "[ 4 8 ]"}}}}
{{MatParam|$detailscale|float|Fits the detail texture onto the material the given number of times (default {{=}} 4). Generally used instead of {{mono|$detailtexturetransform}} with a value of around 7 or 8 for a 128px detail texture. To independently scale the X and Y coordinates, place your values in brackets: {{mono|$detailscale "[ 4 8 ]"}}}}

Revision as of 14:03, 12 March 2025

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 $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