From Valve Developer Community
Jump to: navigation, search
postprocess_controller is a point entity available in all Source games since <Left 4 Dead> Left 4 Dead. (Not available in 2013 SDK)
Bug: None of these effects work in [Portal 2] except for vignette.

Entity description

Postprocess controller.png

An entity that controls the postprocess settings in the map: film grain, vignette, and local contrast. Color correction is controlled by another entity. It may be necessary to have at least one fog_volume in the map in order for a master postprocess_controller to take effect.

Film grain

Film grain on and off. Click for detail.
Film grain heightens the frightening feeling of dark and shadowy environments. This helps make the cinematic experience as gritty and authentic as possible and effectively implies a greater detail to the surrounding darkness than is actually there. The technique avoids applying film grain uniformly as it causes players to get tired of it fast. Instead, in very dark areas with a lot of shadows, there is a lot of film grain visible. But the brighter an area gets, the more the grain fades into the background, and disappears entirely in very bright areas.


Vignette on and off. Click for detail.
Vignetting is a lens artifact you'll often see in lower budget films where cheap cameras were used: specifically, dark edges seeping in around the edges of the screen. Even still, it usually needs to be applied sparingly. As show in the example picture, the effect was only applied around all of the top edges of the screen, so a player wouldn't feel like they were looking through a telescope. A little goes a long way — playtesters don't feel like it intrudes their view at all. It also does a good job of softening the top edges, focusing the gameplay downwards to the center of the screen, where you want a player to look.

Local contrast

Local contrast on and off. Click for detail.
Local contrast is a technique borrowed from photo retouching, where the contrast is adjusted specifically on areas of an image that contain a high level of visual detail. This technique helps make the visuals sharper and more focused. It is a convenient way to effectively imitate the feeling of an adrenaline rush or near-death experience. The effect gives the player a sense of heightened perspective, and is a great subliminal way to foreshadow imminent danger.

Depth and full screen blur

To do: Example picture and explanation.


Fade-in time <float>
Fade-in time
Local contrast strength [-1..x] <float>
Local contrast strength
Local contrast edge strength [0..1] <float>
Local contrast edge strength
Vignette start distance [0..1] <float>
Vignette start distance
Vignette end distance [0..x] <float>
Vignette end distance
Vignette blur strength [0..1] <float>
Vignette blur strength
Fade to black strength [0..1] <float>
Fade to black strength
Film grain strength [0..x] <float> (in all games since <Left 4 Dead 2>)
Film grain strength
Top-of-screen vignette strength [0..1] <float> (in all games since <Left 4 Dead 2>)
Top-of-screen vignette strength
Depth-blur focal plane distance [0..1] <float> (in all games since <Alien Swarm>)
Depth-blur focal plane distance
Depth-blur effect strength [0..x] <float> (in all games since <Alien Swarm>)
Depth-blur effect strength
Full-screen blur strength [0..1] <float> (in all games since <Alien Swarm>)
Full-screen blur strength


Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist> (in all games since <Left 4 Dead 2>)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function (thinkfunction) <string> (in all games since <Left 4 Dead 2>)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.


  • 1 : Master (Has priority if multiple postprocess_controllers exist)


SetLocalContrastStrength <float>
Set the local contrast strength.
SetLocalContrastEdgeStrength <float>
Set the local contrast strength at the edge of the screen (controlled by vignette).
SetVignetteStart <float>
Set the vignette start distance (from screen center).
SetVignetteEnd <float>
Set the vignette end distance.
SetVignetteBlurStrength <float>
Set the strength of the desaturated blur on the vignette.
SetFadeToBlackStrength <float>
Set the fadeout strength.
SetDepthBlurFocalDistance <float> (in all games since <Alien Swarm>)
Set the focal distance of the depth blur effect (in the range [0,1]).
SetDepthBlurStrength <float> (in all games since <Alien Swarm>)
Set the depth blur effect strength.
SetScreenBlurStrength <float> (in all games since <Alien Swarm>)
Set the screen blur effect strength.
SetFilmGrainStrength <float> (in all games since <Alien Swarm>)
Set the film grain effect strength.
SetFadeTime <float> (in all games since <Alien Swarm>)
Set the fade time between post process settings.


Removes this entity from the world.
Removes this entity and its children from the world.
Note:Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than Kill.
AddOutput <string>
Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care.
KV Format: <key> <value>
I/O Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything depending on the entity. Can also be invoked by firing an output that does not specify an input.
RunScriptFile <script> (in all games since <Left 4 Dead 2>)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string> (in all games since <Left 4 Dead 2>)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug: In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction <string> (in all games since <Left 4 Dead 2>) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin <coordinates> (in all games since <Alien Swarm>) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles <angles> (in all games since <Alien Swarm>) !FGD
Set this entity's angles.



OnUser1 to OnUser4
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (only in <Left 4 Dead><Left 4 Dead 2>)
This output fires when the entity is killed and removed from the game.

See also

External links

L4D Art Direction, Part 1: Filmic Effects - Valve blog regarding film effects in Left 4 Dead