LightmappedGeneric
LightmappedGeneric
is a pixel shader available in all 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.
Contents
Supported Parameters
Basics
Defines an diffuse texture.
Links the surface to a set of physical properties.
Adjustment
Transforms the texture before use in the material. This does not affect lightmaps on the surface.
Fits the detail texture onto the material the given number of times (default = 4). Generally used instead of $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: $detailscale "[ 4 8 ]"
Controls the amount that the detail texture affects the base texture. The precise use of this depends on the blend factor; in most cases it acts similarly to $alpha. A value of 0 usually makes the detail texture have no effect, whilst a value of 1 applies the full effect.
How to combine the detail material with the albedo.
A separate VertexLitGeneric material to that will replace this one if the decal hits a model.
Disables texture filtering.
Mitigation for displacement texture stretching.
Transparency
Specifies a mask to use to determine binary opacity.
Vector-like edge filtering.
Specifies that the material should be partially see-through.
Important:Can result in alpha sorting issues if brush is flagged as detail or tied to an entity!
Lighting
Control sharpness and bias of blend. See Blendmodulate
Per-texel color modification via a warp texture.
Note:Does not appear to be featured on
LightmappedGeneric
in CS:GO engine branch.Determines whether the surface is self-illuminated independent of environment lighting.
Reflection
Diffuse reflections.
Note:Phong is reflected only from env_cascade_light.
- Todo: Are there reflections from any other light sources?.
Warning:Standard phong color is always white and doesn't depend on the color of light_environment or env_cascade_light.
Bug:Normal map does not affect phong reflections if there is empty $envmap on the material, or if you haven't assigned any brush face on env_cubemap entity. [todo tested in?]
Confirm:Is this for LW's Blinn–Phong reflections?
Confirm:Is this for LW's Blinn–Phong reflections?
Paint
The paint splat normal map to use when paint is applied to the material. Defaults to
paint/splatnormal_default
if not specified.The layout texture which defines the distribution of bubbles in the paint. Defaults to
paint/bubblelayout
if not specified.The normal mapped texture of a single bubble. Defaults to
paint/bubble
if not specified.The environment map reflected in the paint. Defaults to
paint/paint_envmap_hdr
if not specified.
Texture Organization
Hides the material from Hammer's texture browser.
Warning:Non-functional in Hammer++.
Used to blend texture previews in Hammer.
Effect
Caveats
Mapbase
LightmappedGeneric materials in Mapbase should have the shader SDK_LightmappedGeneric.
See also
- WorldVertexTransition, a shader used on displacements to blend two materials together.
- LightmappedTwoTexture, a brush shader that multiplies a texture on top of another one.
- Lightmapped_4WayBlend, a shader used on displacements to blend up to four materials together.