This article's documentation is for anything that uses the Source engine. Click here for more information.

Mat dxlevel: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{this is a|console variable|name=mat_dxlevel|except-multi={{l4dbranch|4}} (or some third-party branches) and above}}
{{this is a|console variable|name=mat_dxlevel|except-multi={{l4dbranch|4}} (or some third-party branches) and above}}
{{note|This command is not available in any game made using {{l4dbranch|2}} and later branches, or in some third-party branches.<br> Furthermore, since around {{src07|1}} up to {{src13|1}}, only DirectX 8.0 and 8.1 levels are supported, DX7 and earlier was dropped (except in {{portalrtx|1}}).}}
{{note|This command is hidden or not available in any game made using {{l4dbranch|2}} and later branches, or in some third-party branches.<br> Furthermore, since around {{src07|1}} up to {{src13|1}}, only DirectX 8.0 and 8.1 levels are supported, DX7 and earlier was dropped (except in {{portalrtx|1}}).}}
{{Note|This command can be seen on {{l4dbranch|2}} using [[SourceMod]], however, changing it will cause the game to freeze.}}
{{Code|mat_dxlevel}} changes the DirectX (feature level) mode used within a Source game. The player is only able to use modes that their hardware supports. The format is
{{Code|mat_dxlevel}} changes the DirectX (feature level) mode used within a Source game. The player is only able to use modes that their hardware supports. The format is
{{pre|
{{pre|
Line 15: Line 16:
{{pre|
{{pre|
mat_dxlevel 90 - DX9 with Shader Model 2
mat_dxlevel 90 - DX9 with Shader Model 2
mat_dxlevel 92 - Mac/Linux only, same as dxlevel 95
mat_dxlevel 92 - Mac/Linux only on Source 2009-2013, same as dxlevel 95. It is also default on L4D or above on all OS (incl. Windows).
mat_dxlevel 95 - DX9 with Shader Model 3
mat_dxlevel 95 - DX9 with Shader Model 3
mat_dxlevel 98 - {{360|name}} only, always enabled
mat_dxlevel 98 - {{360|name}} only, always enabled
mat_dxlevel 100 - {{sfm|name}} and {{dota2|name|nt=1}}, always enabled, game will still runs on D3D9, however.
mat_dxlevel 100 - {{sfm|name}} and {{dota2|name|nt=1}}, always enabled, game will still runs on D3D9, however. Also default on {{l4dbranch|1}} on some systems.
}}
}}
This can also be specified with Launch Options, use '''+mat_dxlevel [DirectX version]''' on the launch options of any Source game to do so. Alternatively, you can use '''-dxlevel [DirectX version]''', however this specifies a number of extra presets, including but not limited to:
This can also be specified with Launch Options, use '''+mat_dxlevel [DirectX version]''' on the launch options of any Source game to do so. Alternatively, you can use '''-dxlevel [DirectX version]''', however this specifies a number of extra presets, including but not limited to:

Revision as of 02:59, 7 January 2025

English (en)Русский (ru)Translate (Translate)

mat_dxlevel is a console variable available in all Source Source games except Left 4 Dead engine branch Left 4 Dead engine branch (or some third-party branches) and above.

Note.pngNote:This command is hidden or not available in any game made using Left 4 Dead engine branch Left 4 Dead engine branch and later branches, or in some third-party branches.
Furthermore, since around Source 2007 up to Source 2013, only DirectX 8.0 and 8.1 levels are supported, DX7 and earlier was dropped (except in Portal with RTX).
Note.pngNote:This command can be seen on Left 4 Dead engine branch Left 4 Dead engine branch using SourceMod, however, changing it will cause the game to freeze.

mat_dxlevel changes the DirectX (feature level) mode used within a Source game. The player is only able to use modes that their hardware supports. The format is

mat_dxlevel [DirectX version]
mat_dxlevel 60 - only on Source 2004, 2006
mat_dxlevel 70 - only on Source 2004, 2006 (and Portal with RTX/RTX Remix games)
mat_dxlevel 80
mat_dxlevel 81 - Softer shadow
...

For DirectX 9 the value depends on the hardware's capability:

mat_dxlevel 90 - DX9 with Shader Model 2
mat_dxlevel 92 - Mac/Linux only on Source 2009-2013, same as dxlevel 95. It is also default on L4D or above on all OS (incl. Windows).
mat_dxlevel 95 - DX9 with Shader Model 3
mat_dxlevel 98 - Xbox 360 only, always enabled
mat_dxlevel 100 - Source Filmmaker and Dota 2 (pre-Reborn), always enabled, game will still runs on D3D9, however. Also default on Left 4 Dead engine branch on some systems.

This can also be specified with Launch Options, use +mat_dxlevel [DirectX version] on the launch options of any Source game to do so. Alternatively, you can use -dxlevel [DirectX version], however this specifies a number of extra presets, including but not limited to:

  • Resolution
  • Windowed/Fullscreen status
  • MSAA sample count (mat_antialias)
  • Motion blur (mat_motion_blur_*)
  • Shadow depth textures
  • Gamma (mat_monitorgamma)
Note.pngNote:This command does not change the Direct3D renderer to run on other versions. All Source games will always run on Direct3D 9 (or 11/12 in some third-party games), regardless which mat_dxlevel is specified.
Warning.pngWarning:Using -dxlevel launch parameter makes alt tabbing in and out of the game really slow, this will also resets all video configs. It's better to use +mat_dxlevel launch parameter instead, or to place mat_dxlevel command inside a config file.
Futhermore, -dxlevel should be only used a workaround to fix the issue that the game (especially all Source 2013 games except Team Fortress 2) defaults on DX8 mode which may happen on some modern hardware.

See also