Garry's Mod Wiki
Description
This shader is a wrapper for providing custom pixel and vertex shaders, while it is named screenspace_general
there is nothing inherently screenspace
only about this shader, it is merely the name that was chosen before it received extra functionality that allowed it to do more than just screenspace work, as such this is a general shader that can be used on brushes, decals, info_overlays, models, and more.
The following content paths are supported: MOD, BSP, THIRDPARTY
Source Engine games use the game/shaders/fxc
(GMod uses the garrysmod/shaders/fxc
) folder to load .vcs
shaders.
$linearwrite
to 1 (and linearread_basetexture
/etc in case if you are using textures in your shader).Example of custom pixel shader

See Also
- Shader Authoring - Valve Developer Community for the shader authoring process.
- SDK Screenspace Shaders - ficool2 GitHub for more information on screenspace_general.
- SCell555's Shader Compiler for standalone shader compilation which is useful for Linux/Mac users through Wine/Crossover, or for CI/CD processes. If you encounter
SM1 non-float expression
, it means you have to download the original d3dcompiler for Wine via winetricks. - Srlions's RDNX library a shader example which draws rounded shapes.
- EthanTheGreat's gm_universe shaders a shader example which draws planets.
- EthanTheGreat's gm_shaderbuild utility a utility that allows you to hotload shaders for easy development.
Parameters
_ps20
postfix at the end. If you want to use SM3.0 pixel shaders you must also pass a SM3.0 vertex shader, otherwise you are limited to SM2.0b.Default: ""
_vs20
or _vs30
postfix at the end.Default: ""
Default: false
Default: false
Default: false
Default: false
Default: false
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated four times a day. Edits and history are not available.
Last Parsed: Loading...