Post processing.tbl
From FreeSpace Wiki
Contents
General Format
Post_processing.tbl is a table file that controls the use of the post-processing effects available in FSO. In order to use post-processing, the following prerequisites must be met:
- FSO version 3.6.12 or higher
- GPU capable of running Shaders written in GLSL 1.2 or higher
- -post_process commandline flag must be enabled
- post-processing shader files must be present and named post-f.sdr/post-v.sdr
Post_processing.tbl allows the modder to set default values for the effects supported effects. The table must begin with "#Effects" and must end with "#End". For each effect, the following options apply:
$Name:
- Name of the effect. This is used to refer to the effect with the post-processing sexps.
- Syntax: String
$Uniform:
- For every effect, a uniform variable is needed to pass data from the engine to the shader. This is the variables' name, and it has to match the name as used by the shader. All uniforms declared here are of type "float".
- Syntax: String
$Define:
- In the post-processing shader, each effects' code is encapsulated in a preprocessor define. Since the engine only uses one post-processing shader, the shader has to be recompiled every time an effect is activated or deactivated. To control which effects are in use, preprocessor defines are used. The name given here must match the name used in the shader.
- Syntax: String
$AlwaysOn:
- If set to true, the effect will be on by default.
- Syntax: Boolean
$Default:
- The default value of the passed uniform variable. This value is modified by the values given in $Div and $Add as follows: value = (default value / div) + add
- Syntax: Float
$Div:
- Syntax: Float
$Add:
- Syntax: Float
Sample
This is the default table used by FSO executables if no post_processing.tbl can be found.
#Effects $Name: distort noise $Uniform: noise_amount $Define: FLAG_DISTORT_NOISE $AlwaysOn: false $Default: 0.0 $Div: 20000 $Add: 0 $Name: saturation $Uniform: saturation $Define: FLAG_SATURATION $AlwaysOn: false $Default: 0.9 $Div: 50 $Add: 0 $Name: contrast $Uniform: contrast $Define: FLAG_CONTRAST $AlwaysOn: false $Default: 1.1 $Div: 50 $Add: 0 $Name: film grain $Uniform: film_grain $Define: FLAG_GRAIN $AlwaysOn: false $Default: 0.1 $Div: 50 $Add: 0 $Name: stripes $Uniform: tv_stripes $Define: FLAG_STRIPES $AlwaysOn: false $Default: 0.0 $Div: 50 $Add: 0 $Name: dithering $Uniform: dither $Define: FLAG_DITH $AlwaysOn: false $Default: 0.0 $Div: 50 $Add: 0 #End