color_correction

From Source Entities
Jump to navigation Jump to search
For info about the color correction concept, see this VDC page.

Code classes:

Color correction.png

color_correction is a point entity present in all Source games. It loads a color correction lookup table (.raw) and controls its strength. Correction is applied in a sphere surrounding the entity, with a configurable amount of falloff.

Bug: In Dods.png color correction will not apply at the same time as the film grain effect.

Flags[edit | edit source]

  • 1: Master (available in all games since L4d.png) - For use with fog_volume. If no other color_corrections are active, the game will default to this one (usually ideal for CC settings while outdoors).
  • 2: Simulate client-side (available in all games since L4d.png) - Important: Needs to be set if using the entity with fog_volume, and needs to be unchecked if not! Otherwise, unintended things may happen, including color correction not working at all if there are no fog_volumes in the map, or color_corrections applying outside of their intended fog_volumes.

Keyvalues[edit | edit source]

Lookup Falloff Start Distance (minfalloff) <float>
Within this range to the entity, the effect will be at full strength. If this is larger than the End Distance, the effect will apply to the entire map.
Lookup Falloff End Distance (maxfalloff) <float>
Maximum distance from the entity that the effect is applied. At this distance, the effect is barely apparent but will strengthen to 100% as the viewer approaches the Start Distance.
Maximum Weight (maxweight) <float>
How strongly this entity should apply the effect. This is a decimal percent, e.g. 0.45 = 45%.
Lookup Fade In Duration (fadeInDuration) <float>
How long this color correction should take to fade in.
Lookup Fade out Duration (fadeOutDuration) <float>
How long this color correction should take to fade out.
Lookup Table Filename (filename) <string>
Filepath to the .raw being used. Example: scripts/colorcorrection/landingbay_exterior.raw.
Exclusive (exclusive) <boolean> (available in all games since L4d.png)
Makes all other color_correction entities be disabled if this one becomes active. This only applies when enabling and disabling correction entities (only one fog_volume can be active at a time, and there's no way to give one priority).
Start Disabled (StartDisabled) <boolean>
Stay inactive until Enabled.

Inputs[edit | edit source]

SetFadeInDuration <float>
Sets Lookup Fade In Duration.
SetFadeOutDuration <float>
Sets Lookup Fade out Duration.
Enable
Makes the entity active.
Disable
Makes the entity inactive.

See Also[edit | edit source]