screenspace general
Description
The shader is a wrapper for providing custom pixel (and in some games vector) shaders.
Unfortunately (at the moment of 2024-12-22), the only way for Garry's Mod to find and mount custom .VCS shaders, is to provide them in root garrysmod folder. For other games this is not required, and you can provide .vcs shaders via BSPZIP for an example. Issue describing this is located here
This shader can be used on brushes, decals, info_overlays, models, etc. More detail information about this is listed on ficool2's screenspace shader sdk
Source engine games use game/shaders/fxc
(in gmod case it is garrysmod/shaders/fxc
) folder to load .vcs shaders. They can be compiled either via this guide on valve wiki
If you are a Linux/Mac user, you can use Wine/Crossover and SCell555's Shader Compiler in order to build your shaders. Keep in mind, that only 2.0b shaders are properly being translated into OpenGL's shaders via ToGL. Some 3.0 shader specifics are available from 2.0b shaders (like screenspace positions) in some specific vendor drivers.
If you encounter
SM1 non-float expression
, then it means you have to download original d3dcompiler for Wine via winetricks.Example of custom pixel shader.
Parameters
boolean x360appchoser
Setting this to 1 allows to supply mesh colors, and to multiply meshes to view projection. It's recommended to be set to 1
number fix_fb
A custom parameter provided by ficool2's sdk, which is set to 32768. Used to transfer it's value to $flags2. It allows FB texture to show up.