UnlitGeneric
UnlitGeneric draws a diffuse without standard lighting passes. It is used for things like UI images, pure white, and pitch blackness, but also in situations when software lighting is used (like on detail props).
Supported Parameters
Basics
- $basetexture <texture>
- Defines a diffuse texture.
- $surfaceprop <string>
- Links the surface to a set of physical properties.
Adjustment
Transparency
- $alphatest <boolean>
- Specifies a mask to use to determine binary opacity.
- $translucent <boolean>
- Specifies that the material should be partially see-through.
- $vertexalpha <boolean>
- Per-vertex translucency on displacements
Texture Organization
- %notooltexture <boolean>
- Hides the material from Hammer's texture browser.
- %tooltexture <texture>
- Used to blend texture previews in Hammer.
Effect
Additional Parameters
- $linearwrite <boolean>
- Instructs the System that the Shader writes Linear Values that require conversion, or sRGB Values that don't require conversion. The Parameter Name is a tad confusing. A Value of 0 means the Shader outputs Linear Values. A Value of 1 means the output shouldn't be converted.
- $receiveflashlight <boolean>
- Allow the player's flashlight to illuminate the material.
- $singlepassflashlight <boolean>
- Possibly used to allow shadows to form from this decal.
For example, found in L4D2 decals/detail/ruraldetailsprites.vmtTodo: confirm.
- $deferred <boolean> (only in
)
Confirm:Enables/disables deferred lighting on this material?
Caveats
Projected Texture Bugs
If a skybox has an UnlitGeneric shader applied to it, some visual bugs can occur. Notably, if a projected texture is shone near a Skybox using an UnlitGeneric shader, the Skybox may appear to ignore surrounding geometry and phase through walls for as long as the projected texture is active.
To fix this, ensure that a sky_camera exists in the world, typically in its own box which exists outside of the rest of the map.
Preferably, use the purpose-built Sky shader instead.
Models
If this shader is being used on a model, you must specify $model 1 to prevent errors.
Mapbase
Unlit materials in Mapbase should have the shader SDK_UnlitGeneric.