HDR rendering


High Dynamic Range (HDR), in Source and
Source 2 (and most games in 2000s), refers to High Dynamic Range rendering (HDR Rendering for short, or HDR lighting), which simulates brightness above that which a computer monitor is capable of displaying, before downconverting to
Standard Dynamic Range (SDR, internally referred to in Source and Source 2 as LDR, for Low Dynamic Range) video. This mainly involves "blooming" colors above 100% brightness into neighboring areas and adjusting a virtual camera aperture to compensate for any over-exposure that results.
Besides the obvious effects of this (see right), HDR gives richer colors, better contrast and finer gradients: since bright and dark areas are pushed into white and black, correctly exposed areas are drawn with a far wider range of values.
Predecessor to HDR
Counter-Strike (Xbox), a GoldSrc game, had a feature called "Dynamic iris simulation". This adjusts the screen brightness depending on where you look.
HDR in Source
HDR rendering was first demonstrated in Half-Life 2 during it's development (2003), but it was later eventually cut before Half-Life 2 was released.
Later, HDR rendering is reintroduced with Half-Life 2: Lost Coast, a tech demo, along with Day of Defeat: Source, released in Sep 2005 (both runs on updated version of Source 2004).
Source 2006 and subsequent Source branches later ships with HDR support out of the box. HDR requires DirectX 9 (dxlevel 90 or higher) level GPU for Windows (or OpenGL 1.4 and later for macOS/Linux), and maps must be compiled with HDR lighting data. It is optional but recommended that the map's skybox textures are HDR-capable.
While HDR was introduced in both Source 2004 (since Lost Coast engine update) and Source 2006, initially in certain games such as Counter-Strike: Source,
Half-Life 2 (both at the time having been upgraded to Lost Coast engine and later Source 2006), Counter-Strike: Source only had some maps were compiled with HDR rendering, while Half-Life 2 had none until the engine (and Mac) update in 2010, upgrading it to
Source 2009 along with changes to the maps and skybox textures to support HDR. Half-Life 2 on console (The Orange Box for Xbox 360 and PlayStation 3, runs on Source 2007), did have HDR rendering in all maps, however.
However, as of today (with both CSS and HL2 are running on Source 2013), Valve forgot to compile all the maps with both LDR and HDR support in Half-Life 2, leaving some of the maps LDR only, and others HDR only, requiring users to enable HDR, otherwise the HDR-only map will be rendered in fullbright.
Additionally, Source 2007 improves HDR through remade HDR tonemapping in order to better fits outdoor scenes. This may results in brighter or darker image, if tonemapping was not adjusted.
Limitations
Source does not have a physically accurate HDR simulation. Its camera has a far wider range than the human eye (let alone real cameras), and it also adjusts to changes in brightness far faster (this can be adjusted through env_tonemap_controller's SetTonemapRate keyvalue however). Both of these are expedient to gameplay of course, especially in multiplayer.
HDR display output
Source does not create "proper" HDR images, and does not support native HDR output for HDR-capable TV/monitors. Instead, it collapses the image down to SDR early, like many other games in the 2000s/early 2010s due to hardware and software limitations at the time. The only Source engine game that currently support native HDR output is Apex Legends on consoles, and it requires HDR-capable TV/monitors.
On systems with Windows 11, you can use Auto HDR, or RTX HDR ( Nvidia GPUs only) as a workaround. However this only works with Source games running on Direct3D 11. Many other Source games (which often runs on Direct3D 9) requires
dgVoodoo2 to translates D3D9 to D3D11/D3D12 in order to use Auto HDR/RTX HDR. But keep in mind that using dgVoodoo2 is not recommended on Source 2006 games or earlier because it will break the gray fog bug fix on NVIDIA GPUs.
The average user would be hard-pressed to tell the difference, however, and the benefits include support for all DX9+ GPUs, MSAA compatibility, and excellent performance.
LDR deprecation in newer games
Since the Left 4 Dead engine branch and later games (with some exceptions), HDR rendering is now required and LDR/SDR rendering has been deprecated, with the option to disable HDR removed.


Despite LDR being deprecated since Left 4 Dead, some games like
Portal 2 as well as the original release of
Dota 2 allow users to disable HDR through console commands, however:
- In Portal 2, while you can disable HDR using console commands (mat_hdr_level 0), no Portal 2 maps have LDR lighting compiled by default, which will cause "mat_fullbright" ('full bright' lighting) to be enabled.
- In the original release of Dota 2, the game only uses LDR lighting, and none of the maps appear to have HDR lighting data. Additionally the game does not have an option to enable HDR aside from using console commands.
- In
Left 4 Dead and
Left 4 Dead 2, HDR can be only disabled via the launch command (mat_hdr_level 0) as the command is hidden ingame, but you can use SourceMod (for
) or VScript (for
) to disable it while the game is already running.
HDR in Source 2
Counter-Strike 2 adds a option for switching between Performance and Quality HDR.