Shaders
docs/shaders
Last updated by F1F7Y on 2022-11-7
Shaders ( Files which end with .shader ) allow us to specify texture parameters which are then used by the editor and compiler to determine both visual and collision attributes.
For a shader to be recognized it needs to be placed in ResourcesFolder/game/scripts/ where game is the directory of your selected game.
Example shader:
textures/tools/toolsnodraw
{
// Compile flags
surfaceparm nodraw
}
{
// Compile flags
surfaceparm nodraw
}
In the example shader above you can see how shaders are structured. You first start with a path and then put parameters in curly brackets. It is important that the path matches the path of a texture file.
List of supported parameters:
- nodraw - Textures with this flag wont have meshes generated for them.
- sky2d - Unknown.
- sky - Skybox.
- trans - Translucent.
- unlit - Unlit.
- litflat - Default vertex type when no type is selected
- litbump - Lit, used by most visible geometry in official maps.
- unlit - Unlit.
- unlitts - Unlit transparent, used by transparent surfaces.