Difference between revisions of "LightmappedGeneric"

From Valve Developer Community
Jump to: navigation, search
m (Added a language button at the top of the page)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{lang | LightmappedGeneric}}
 
{{lang | LightmappedGeneric}}
{{Shader|LightmappedGeneric}} It is the shader most commonly used to render brushes, displacements and [[lightmap]]ped surfaces.
+
{{Shader|LightmappedGeneric}} It is the shader most commonly used to render brushes, displacements and [[lightmap]]ped surfaces.  
 +
 
 +
Only some games like {{tf2}} support this shader to be used on models. {{todo|Which other games support it?}}
  
 
== Supported Parameters ==
 
== Supported Parameters ==
  
;{{ent|$bumpmap}}
+
=== Basics ===
: Bumpmapping.
+
;{{ent|$basetexture}}
;{{ent|$ssbump}} {{since|{{src07}}}}
+
: Defines an albedo texture.
: Self-shadowing bumpmapping.
 
;{{ent|$color}}
 
: Color tinting.
 
 
;{{ent|$decal}}
 
;{{ent|$decal}}
 
: Use this material as a decal.
 
: Use this material as a decal.
 
;{{ent|$detail}}
 
;{{ent|$detail}}
 
: Detail texturing.
 
: Detail texturing.
 +
;{{ent|$surfaceprop}}
 +
: Links the surface to a set of physical properties.
 +
;{{ent|%tooltexture}}
 +
: Used to blend texture previews in Hammer.
 +
 +
=== Adjustment ===
 +
;{{ent|$color}}
 +
: Independently scales the red, green and blue channels of an albedo.
 +
;{{ent|$pointsamplemagfilter}} {{only|{{csgo}}}}
 +
: Disables texture filtering.
 +
;{{ent|$seamless_scale}} {{since|{{src07}}}}
 +
: Mitigation for displacement texture stretching.
 +
 +
=== Transparency ===
 +
;{{ent|$alpha}}
 +
: Scales the opacity of an entire material.
 +
;{{ent|$alphatest}}
 +
: Specifies a mask to use to determine binary opacity.
 
;{{ent|$distancealpha}} {{since|{{src07}}}}
 
;{{ent|$distancealpha}} {{since|{{src07}}}}
 
: Vector-like edge filtering.
 
: Vector-like edge filtering.
;{{ent|$envmap}}
+
;{{ent|$nocull}}
: Specular reflections.
+
: Disables backface culling.
 +
;{{ent|$translucent}}
 +
: Specifies that the material should be partially see-through.
 +
 
 +
=== Lighting ===
 +
;{{ent|$bumpmap}}
 +
: Specifies a texture that will provide three-dimensional lighting information for a material.
 
;{{ent|$lightwarptexture}} {{since|{{src06}}}}
 
;{{ent|$lightwarptexture}} {{since|{{src06}}}}
 
: Per-texel color modification via a warp texture.
 
: Per-texel color modification via a warp texture.
;{{ent|$seamless_scale}} {{since|{{src07}}}}
 
: Mitigation for displacement texture stretching.
 
 
;{{ent|$selfillum}}
 
;{{ent|$selfillum}}
: Self-illumination.
+
: Determines whether the surface is self-illuminated independent of environment lighting.
;{{ent|$translucent}}
+
;{{ent|$ssbump}} {{since|{{src07}}}}
;{{ent|$alpha}}
+
: Flags a $bumpmap texture as being a self-shadowing bump map.
: Expensive and cheap transparency.
+
 
 +
=== Reflection ===
 +
;{{ent|$envmap}}
 +
: Specular reflections.
 
;{{ent|$phong}} {{only|{{csgo}}}}
 
;{{ent|$phong}} {{only|{{csgo}}}}
 
: Diffuse reflections.
 
: Diffuse reflections.
;{{ent|$PointSampleMagFilter}} {{only|{{csgo}}}}
+
 
: Disables texture filtering.
+
=== Effect ===
 +
;{{ent|$nofog}}
 +
: Prevents fog from overdrawing a material.
 +
 
 +
== Caveats ==
 +
 
 +
=== Mapbase ===
 +
Unlit materials in [[Mapbase]] should have the shader '''<code>SDK_LightmappedGeneric</code>'''.
 +
 
  
 
== See also ==
 
== See also ==

Latest revision as of 07:33, 16 October 2021

English Français

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

Only some games like Team Fortress 2 support this shader to be used on models. To do: Which other games support it?

Supported Parameters

Basics

$basetexture
Defines an albedo texture.
$decal
Use this material as a decal.
$detail
Detail texturing.
$surfaceprop
Links the surface to a set of physical properties.
%tooltexture
Used to blend texture previews in Hammer.

Adjustment

$color
Independently scales the red, green and blue channels of an albedo.
$pointsamplemagfilter (only in Counter-Strike: Global Offensive)
Disables texture filtering.
$seamless_scale (in all games since <Source><Source>)
Mitigation for displacement texture stretching.

Transparency

$alpha
Scales the opacity of an entire material.
$alphatest
Specifies a mask to use to determine binary opacity.
$distancealpha (in all games since <Source><Source>)
Vector-like edge filtering.
$nocull
Disables backface culling.
$translucent
Specifies that the material should be partially see-through.

Lighting

$bumpmap
Specifies a texture that will provide three-dimensional lighting information for a material.
$lightwarptexture (in all games since <Source><Source>)
Per-texel color modification via a warp texture.
$selfillum
Determines whether the surface is self-illuminated independent of environment lighting.
$ssbump (in all games since <Source><Source>)
Flags a $bumpmap texture as being a self-shadowing bump map.

Reflection

$envmap
Specular reflections.
$phong (only in Counter-Strike: Global Offensive)
Diffuse reflections.

Effect

$nofog
Prevents fog from overdrawing a material.

Caveats

Mapbase

Unlit materials in Mapbase should have the shader SDK_LightmappedGeneric.


See also