CEnvTonemapController
Code classes:
CEnvTonemapController
CPointEntity
CBaseEntity
(all ents)
CEnvTonemapController
controls tonemapping. Think of it as a method of controlling how the player's pupils adjust as they look at areas of different brightnesses. Also controls bloom. To see the effects of this, the map must be compiled with HDR (check the HDR box in the compile options, or use -hdr
or -both
on the VRAD command line) and the player in question must have HDR enabled in their video settings. (HDR is always enabled in some games. If you don't see the option for it, it's on.)
Classnames:
env_tonemap_controller
env_tonemap_controller_ghost
(only available in ) - Used in Versus mode for zombie players that have not physically spawned into active gameplay yet.env_tonemap_controller_infected
(only available in ) - Used in Versus mode for zombie players that have physically spawned into active gameplay.
Tonemapping affects all players at once in multiplayer, unless if it's changed by using fog_volume
(and with the exception of player zombies in ). HDR settings should otherwise be changed through triggers, whenever transitioning between environments of different light levels.
Bug: In rare circumstances, the renderer will re-decide if the scene is bright or dark depending on the tonemapping and bloom alone, leading to a map-wide strobe effect.
- Fix: This is usually a sign that the settings are too extreme. Tone them down.
Flags[edit | edit source]
- 1: Master (available in all games since ) - For use with
trigger_tonemap
. If no other tonemap entities are active, the game will default to this one (usually ideal for HDR settings while outdoors).
Inputs[edit | edit source]
- SetAutoExposureMin
<float>
- Sets exposure level when looking at bright things. (Darkens environment in response.)
- SetAutoExposureMax
<float>
- Sets exposure level when looking at dark things. (Brightens environment in response.)
- SetBloomScale
<float>
- Sets how intense bloom is. Does nothing in .
- SetTonemapRate
<float>
- If set to less than 1.0, divides the time it takes to transition between exposure levels by that much.
- UseDefaultAutoExposure
- If either SetAutoExposureMin or SetAutoExposureMax has been used, sets their values back to their defaults. (Determined by
mat_autoexposure_min
andmat_autoexposure_max
.) - UseDefaultBloomScale (Not in FGD)
- If SetBloomScale has been used, sets the value back to its default. (Determined by
mat_bloomscale
.) SetTonemapScale<float>
- No effect.
BlendTonemapScale<float>
- No effect.
SetBloomScaleRange (Not in FGD)<float>
- Broken.
- SetBloomExponent
<float>
(available in all games since ) - To do: Description.
- SetBloomSaturation
<float>
(available in all games since ) - To do: Description.
- SetTonemapPercentTarget
<float>
(only available in ) - Sets how bright the percent of pixels set by SetTonemapPercentBrightPixels should be.
- SetTonemapPercentBrightPixels
<float>
(only available in ) - Sets the percent of pixels that should be brightened by the amount specified by SetTonemapPercentTarget.
- SetTonemapMinAvgLum
<float>
(only available in ) - To do: Description.