UnlitGeneric: Difference between revisions
Line 25: | Line 25: | ||
If a [[Skybox]] has an '''<code>UnlitGeneric</code>''' shader applied to it, some visual bugs can occur. Notably, if a projected texture is shone near a Skybox using an '''<code>UnlitGeneric</code>''' shader, the Skybox will appear to ignore surrounding geometry and phase through walls for as long as the projected texture is active. | If a [[Skybox]] has an '''<code>UnlitGeneric</code>''' shader applied to it, some visual bugs can occur. Notably, if a projected texture is shone near a Skybox using an '''<code>UnlitGeneric</code>''' shader, the Skybox will appear to ignore surrounding geometry and phase through walls for as long as the projected texture is active. | ||
To fix this, ensure that a [[ | 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)|sky shader]] instead. | Preferably, use the purpose-built [[Sky_(shader)|sky shader]] instead. |
Revision as of 05:01, 16 October 2021
UnlitGeneric
draws an albedo 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). It accepts only the most rudimentary of VMT commands.
Supported Parameters
- $alpha
- Expensive and cheap transparency.
- $color
- Color tinting.
- $nofog
- Prevents fog from overdrawing a material.
- $surfaceprop
- Links the surface to a set of physical properties.
- $translucent
- Specifies that the material should be partially see-through.
Additional Parameters
[[$receiveflashlight|$receiveflashlight]]
[[$singlepassflashlight|$singlepassflashlight]]
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 will 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
.