Difference between revisions of "Post processing.tbl"

From FreeSpace Wiki
Jump to: navigation, search
(Replaced link to list of tables with actual list on the right.)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{SCP_table}}
 +
{{TableVersion|5715}}
 +
{{Tables}}
 +
The '''post_processing.tbl''' is a table file that controls the use of post-processing effects avaiable in FSO.
 +
 
==General Format==
 
==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:
+
In order to use post-processing, the following prerequisites must be met:
 
*FSO version 3.6.12 or higher
 
*FSO version 3.6.12 or higher
 
*GPU capable of running Shaders written in GLSL 1.2 or higher
 
*GPU capable of running Shaders written in GLSL 1.2 or higher
Line 48: Line 53:
 
*Syntax: '''''Boolean'''''
 
*Syntax: '''''Boolean'''''
 
*If this is set to true, the ship will not be rendered after the effect is completed.
 
*If this is set to true, the ship will not be rendered after the effect is completed.
 +
*Note: In order to reenable rendering, use an effect with this option set to false.
 +
 
===$Invert Timer:===
 
===$Invert Timer:===
 
*Syntax: '''''Boolean'''''
 
*Syntax: '''''Boolean'''''
Line 54: Line 61:
 
If this parameter is set to true, the computation is altered as follows:
 
If this parameter is set to true, the computation is altered as follows:
 
1.0 - ((Current time in milliseconds - effect start time in milliseconds) / (effect duration in milliseconds))
 
1.0 - ((Current time in milliseconds - effect start time in milliseconds) / (effect duration in milliseconds))
 +
 +
==#Light Shafts==
 +
{{Table3615|
 +
This section is used to define the parameters for the light shaft effect.
 +
===$AlwaysOn:===
 +
*If set to true, the effect will be on by default.
 +
*Syntax: '''''Boolean'''''
 +
===$Density:===
 +
*This changes the spacing between the individual samples taken by the shader. I smaller number means shorter lightshafts but less noticeable color banding.
 +
*Syntax: '''''Float'''''
 +
===$Falloff:===
 +
*This allows for a exponential falloff of the light shaft intensity the farther it gets away from the sun.
 +
*Syntax: '''''Float'''''
 +
===$Weight:===
 +
*This changes the amount of light every sample adds to the final brightness. Change this and $Intensity to vary contrast.
 +
*Syntax: '''''Float'''''
 +
===$Intensity:===
 +
*This is the overall intensity of the effect after all other calculations are done.
 +
*Syntax: '''''Float'''''
 +
===$Sample Number:===
 +
*This is the amount of texture samples used for every pixel on screen. Increasing this improves quality but also slows down the shader. Low end hardware should go with 25. High end can go up to or over 100.
 +
*Syntax: '''''Integer'''''}}
  
 
==Sample==
 
==Sample==
Line 107: Line 136:
 
$Default: 0.0
 
$Default: 0.0
 
$Div: 50
 
$Div: 50
$Add: 0
+
$Add: 0
 +
 
 +
#Ship Effects
 +
 
 +
$Name: Cloak
 +
$Shader Effect: 2
 +
$Disables Rendering: YES
 +
$Invert timer: YES
 +
 
 +
$Name: Decloak
 +
$Shader Effect: 2
 +
$Disables Rendering: NO
 +
$Invert timer: NO
 +
 
 +
#Light Shafts
 +
$AlwaysOn: NO
 +
$Density: 0.5
 +
$Falloff: 1.0
 +
$Weight: 0.02
 +
$Intensity: 0.5
 +
$Sample Number: 50
 
 
 
#End
 
#End

Latest revision as of 04:35, 13 October 2020

This feature requires FreeSpace Open

Revision information.....

FSO Revision: 5715
Note: Please update the version when the page is updated. If your edit had nothing to do with new code entries then please do not edit the version


List of Tables and related code files
* Notes Modular Tables
** Notes tables which only use modular tables
Ai.tbl* /ai/aicode.cpp
Ai_profiles.tbl* /ai/ai_profiles.cpp
Animation.tbl** /model/modelanimation.cpp
Armor.tbl* /ship/ship.cpp
Asteroid.tbl* /asteroid/asteroid.cpp
Autopilot.tbl* /autopilot/autopilot.cpp
Cheats.tbl* /cheats_table/cheats_table.cpp
Colors.tbl* /globalincs/alphacolors.cpp
Curves.tbl* /math/curves.cpp
Controlconfigdefaults.tbl /controlconfig/controlsconfigcommon.cpp
Credits.tbl* /menuui/credits.cpp
Cutscenes.tbl* /cutscene/cutscenes.cpp
Decals.tbl** /decals/decals.cpp
Fireball.tbl* /fireball/fireballs.cpp
Fonts.tbl* /graphics/font.cpp
Game_settings.tbl* /mod_table/mod_table.cpp
Glowpoints.tbl* /model/modelread.cpp
Help.tbl* /gamehelp/contexthelp.cpp
Hud_gauges.tbl* /hud/hudparse.cpp
Icons.tbl* /mission/missionbriefcommon.cpp
Iff_defs.tbl* /iff_defs/iff_defs.cpp
Keywords.tbl* Not In Codebase
Lighting_Profiles.tbl* /lighting/lighting_profiles.cpp
Lightning.tbl* /nebula/neblightning.cpp
Mainhall.tbl* /menuui/mainhallmenu.cpp
Medals.tbl* /stats/medals.cpp
Messages.tbl* /mission/missionmessage.cpp
Mflash.tbl* /weapon/muzzleflash.cpp
Music.tbl* /gamesnd/eventmusic.cpp
Nebula.tbl* /nebula/neb.cpp
Objecttypes.tbl* /ship/ship.cpp
Options.tbl* Not In Codebase
Particle effects(-part.tbm)** /particle/effects...
Post_processing.tbl /graphics/gropenglpostprocessing.cpp
Rank.tbl* /stats/scoring.cpp
Scpui.tbl* Not In Codebase
Scripting.tbl* /parse/scripting.cpp
Ships.tbl* /ship/ship.cpp
Sexps.tbl** /parse/sexp/sexp_lookup.cpp
Sounds.tbl* /gamesnd/gamesnd.cpp
Species_defs.tbl* /species_defs/species_defs.cpp
Species.tbl* /menuui/techmenu.cpp
Ssm.tbl* /hud/hudartillery.cpp
Stars.tbl* /starfield/starfield.cpp
Strings.tbl* /localization/localize.cpp
Tips.tbl* /menuui/playermenu.cpp
Traitor.tbl* /stats/scoring.cpp
Tstrings.tbl* /localization/localize.cpp
Virtual_pofs.tbl* /model/modelreplace.cpp
Weapon_expl.tbl* /weapon/weapons.cpp
Weapons.tbl* /weapon/weapons.cpp

The post_processing.tbl is a table file that controls the use of post-processing effects avaiable in FSO.

General Format

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:

#Effects

$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

#Ship Effects

This section is used to define effects for use with the ship-effect sexp or ship::addShipEffect() lua function.

$Name

  • Syntax: String
  • Defines a unique name for this effect, which is used as input for the sexp and lua function.

$Shader Effect:

  • Syntax: Integer
  • Defines a unique ID for this effect. This will be passed to the main shader as a uniform parameter. Note that IDs 0 and 1 are reserved for in-engine use.

$Disables Rendering:

  • Syntax: Boolean
  • If this is set to true, the ship will not be rendered after the effect is completed.
  • Note: In order to reenable rendering, use an effect with this option set to false.

$Invert Timer:

  • Syntax: Boolean
  • Controls the behaviour of the timer passed to the shader as a uniform variable. Timer values are always in the [0.0, 1.0] range, and are computed as follows:

(Current time in milliseconds - effect start time in milliseconds) / (effect duration in milliseconds) If this parameter is set to true, the computation is altered as follows: 1.0 - ((Current time in milliseconds - effect start time in milliseconds) / (effect duration in milliseconds))

#Light Shafts

FS2 Open, 3.6.16:

This section is used to define the parameters for the light shaft effect.

$AlwaysOn:

  • If set to true, the effect will be on by default.
  • Syntax: Boolean

$Density:

  • This changes the spacing between the individual samples taken by the shader. I smaller number means shorter lightshafts but less noticeable color banding.
  • Syntax: Float

$Falloff:

  • This allows for a exponential falloff of the light shaft intensity the farther it gets away from the sun.
  • Syntax: Float

$Weight:

  • This changes the amount of light every sample adds to the final brightness. Change this and $Intensity to vary contrast.
  • Syntax: Float

$Intensity:

  • This is the overall intensity of the effect after all other calculations are done.
  • Syntax: Float

$Sample Number:

  • This is the amount of texture samples used for every pixel on screen. Increasing this improves quality but also slows down the shader. Low end hardware should go with 25. High end can go up to or over 100.
  • Syntax: Integer

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

#Ship Effects

$Name: 			Cloak
$Shader Effect:		2
$Disables Rendering:	YES
$Invert timer:		YES

$Name:			Decloak
$Shader Effect:		2
$Disables Rendering:	NO
$Invert timer:		NO								

#Light Shafts
$AlwaysOn:		NO
$Density:		0.5
$Falloff:		1.0
$Weight:		0.02
$Intensity:		0.5
$Sample Number:		50
												
#End