The FPS Commands of Counter-Strike Source
Person A: Hi, my FPS in Source suck, what can i do?
Person B: Hey, this is easy: AA Off, AF Off, Vsync Off and all settings in Video Options menu to low. Do this and your FPS will skyrocket, because it's l33t and the Pro's use it too.
Does this sound familiar to you? Yes? No wonder, because this is probably the main topic in every Counter-Strike Source related Forum. Makes sense, because if you set everything to low and disable everything that could add some beauty to your beloved game, your FPS must become Pro. Of course the game will look like shit, but it's a worthy sacrifice in order to squeeze out every single frame, right?!
But what would you say if i tell you, that this is minimum 50% of the time utterly bullshit!?! What if you could maintain a good FPS and have at the same time a good looking Counter-Strike Source?
Before we come to the interesting Part let me clear up one thing: if you have a crap PC your FPS will stay low no matter what you do. However, those with a decent PC can expect a nice improvement FPS-wise and still have a nicely looking CS:S.
Below is a list of commands that affect the FPS and the optic of Counter-Strike Source. Those are by far not all commands that affect the graphics, but the most important. I try to explain what the commands do -if necessary- and which setting i recommend. Some of the more important commands also have screenshots that show you ultimately what the setting does ingame. If i tell you that mipmap and picmip alter the appearance of the Textures, then you have most likely no clue what i talk about. But if i show you some screenshots you can see it on your own and understand what it does - at least i hope you do. ^^
Note: All the following recommendations are based on my own system (specs below). If you have a different setup -which is more than likely- then you have to test and test more to find the tweaks and settings that works best for you!
I am by no means liable if you screw up your Counter-Strike Source or your whole PC! You use everything on this site on your own risk!
My Computer Specifications are as follows: (as of July 2007)
- Mainboard: ASRock AM2NF3-VSTA (AGP-8 Board)
- CPU: AMD Athlon 64 X2 4800+ (Brisbane)
- RAM: G.E.I.L. 2 GB PC-800 (Dual Channel Mode)
- Graphic Adapter: XFX 7600GT M580 (256 MB - AGP Card, hence the ASRock Board)
- Sound Card: X-Fi Xtreme Gamer (I'm going to say a word about this card at the end of the Guide)
- HD: Western Digital SATA 320 GB, Seagate Barracuda IDE 160 GB, IBM/Hitachi IDE 160 GB (Primary HD)
- Graphics Driver: nVIDIA XG 94.20 (modded Driver from TweaksRUs)
Like you can see is my PC pretty much the mainstream shit and far from superior. Especially the low cost Board and the vid card is something some of you may laugh about. The vid card is good enough to play games like CS:S on high settings and the Board was necessary, because this was the only one available that offered an AGP Slot and IDE.
Ok let's go.
The Commands are grouped by sections for a better overview. Screenshots -if available- open in a new window. Let the screenshots load fully, which can take a second or two. Make sure to enable JavaScript, because the screenshots work with MouseOver that you can better see the difference between the settings. On the screenshots is usually Net_Graph 3 visible that you can see the FPS difference between certain settings.
Note: FPS fluctuation on the Screenshots in the range of +2 to -2 FPS are absolutely normal. Also some Screenshots show lower FPS than previous Screenshots. The reason for this is, that i had to restart CS:S multiple times and the more you do this the lower the FPS get over time.
In order to test/use the commands it is recommended that you place the commands in your autoexec.cfg in your cfg directory. If there is no autoexec.cfg yet, simply create one. Note: Make sure the file is really named autoexec.cfg and not autoexec.cfg.txt - this is a very common mistake and afterwards people wonder why the commands have no effect. Here is an example path to your cfg directory:
C:\Program Files\Valve\Steam\Steamapps\YourAccountName\Counter-Strike Source\cstrike\cfg\
Important: Before you set up your own FPS config make sure and double sure that the commands you use are legal in the league you play. My recommendations are based on FPS gain while maintain a good looking CS:S and not if commands are legal in leagues! My recommendations also don't aim to reach the maximum possible FPS, but get more FPS and have a good looking game. For example, between the default quality settings and my own quality settings am i able (on my system) to gain, depending on which map i am, between 25 and 40 FPS while the map looks similar good.
Command Overview
CPU Commands
The CPU commands is the smallest group and there is not much to say. Make sure to set all CPU settings to 1 for best performance.
- r_mmx - extended MMX commands for Intel CPUs
- r_sse - also for Intel CPUs
- r_sse2 - you guessed it, Intel CPUs
- r_3dnow - this is important for AMD CPUs
Command Overview
Global Graphic Settings
These commands affect everything and are responsible for the over all look. The biggest FPS killer hides here as well!
- cl_forcepreload - Preloads the needed data for the current map. Possible value 0 = Off | 1 = On
recommendation: 1
- fps_max - Not really a command to raise the FPS but to display the current value. Basically you can set it to whatever you want, it should be set to the same value as your monitor Hz is set to.
recommendation: Same value as your Monitor Hz
- mat_antialias - The majority think that AntiAliasing has to be set to Off in order to get a good FPS. This is wrong like the Screenshots prove. The reason is rather simple: CS:S is CPU dependant which leaves enough resources to the graphic adapter to handle the extra load with ease. Anything equal or better than my 7600 GT should be easily able to handle 4x AA and a 6600 GT (or equal) should be able to handle 2x AA to 4x AA. Possible values 0 = Off | 2 = 2x AA | 4 = 4x AA | 6 = 6x AA
recommendation: 7600 GT or better: 4 | 6600 GT or equal: 2
Alternate screenshot
- mat_colorcorrection - Generates a depth that is blurrier the farther away it is. This is made by recalculating the colors and is pretty much a resource waster. Possible values 0 = Off | 1 = On
recommendation: 0
- mat_dxlevel - This set the DirectX Level to a certain value. Once it was possible to set it to either 50/60/70/80/81/90/95 while 50 and 60 was never officially supported. There revolved also a long term hoax that a wrong DX value would damage your graphic adapter - but this is completely nonsense. However, many leagues require you to set the DX Level to either 80, 90 or 95 which is absolutely no problem with modern vid cards.
recommendation: 95
- mat_monitorgamma - Let you adjust the over all gamma in game. While a high gamma is good to see in dark environment (e.g. tunnel on de_dust2 or under trains on de_train) does it also have an negative influence on flash grenades (you are simply longer blind). You have to try out what works best for you. Possible values are 1.6 (brightest) to 2.6 (darkest) in steps by 0.1
recommendation: map dependant. I personally prefer 1.6 (brightest)
- mat_reducefillrate - Reduces the fill rate (Shaders). It's too complex to explain what Shaders are and what they do, so i don't even try. However, on Wikipedia is an article about the different types of Shader if you are interested in. Possible values 0 = Off | 1 = On
recommendation: 1
- mat_texture_limit - Let you determine how much VRAM (Video RAM) will be used to store Textures. The value is determined in Kilobyte. However, it's best if you let decide your Computer and CS:S how much VRAM it will use for it.
recommendation: -1 * (the negative value set it to unlimited so CS:S can decide how much VRAM it requires)
- mat_vsync - Turns VSync On and Off if not already set by your graphics driver. Generally do i recommend to set VSync On whenever possible. If you can actually use it depend on which Monitor you use and how much Hz it delivers. Possible values 0 = Off | 1 = On
recommendation: personal preference. I personally have VSync On whenever possible.
- r_3dsky - No doubt, the 3D Sky looks great and let appear the maps very realistic. However, the screenshots speak for itself and the great looks is not worth the FPS loss. Possible values 0 = Off | 1 = On
recommendation: 0
Alternate screenshot
- r_fastzreject - Optimized Z Buffer Algorithm. Possible values 0 = force Off | 1 = force On | -1 = On if supported by hardware
recommendation: 1 (all modern cards support it)
- r_rootlod - The over all model quality for objects. Values between 0 (best) and 7 (worst) in steps by 1 are possible. Attention, most leagues require you to set this value to either 0, 1 or 2.
recommendation: 1
Command Overview
Textures and Surfaces
- mat_bumpmap - Bump mapping is a technique to let flat objects appear as 3D. Note: this command goes hand in hand with the mat_specular command below. Both must always be set to either 0 or 1. If you set one of these commands to a different value your player model will look like C3PO from Star Wars. Possible values 0 = Off | 1 = On
recommendation: 0
- mat_compressedtextures - Textures are compressed to load faster. The gained speed is very little but since it doesn't harm, do we activate this funktion. Possible values 0 = Off | 1 = On
recommendation: 1
- mat_fastnobump - Speed up the procedure of Bump mapping. It's not really needed because we set mat_bumpmap to 0, but activate it nonetheless just in case of. Possible values 0 = Off | 1 = On
recommendation: 1
- mat_fastspecular - Same comment from mat_fastnobump applies here. Possible values 0 = Off | 1 = On
recommendation: 1
- mat_forceaniso - The Anisotropic Filtering (AF) is beside AntiAliasing (AA) the second command where people always think it is "evil" and must be set to zero (Off). Get a look at the screenshot and see for yourself the impact of the command and check out the FPS on Net_Graph. You'll see that it give you sharper Textures in depth and doesn't cost any performance at all, if you use a moderate value. Possible values are dependent on your graphic adapter and can go from 2x AF to 16x AF and with special tools you can use values beyond 16x or not supported values such as 6x and 12x AF. Possible values 0 = Bilinear | 1 = Trilinear | 2 = 2x AF | 4 = 4x AF | 8 = 8x AF | 16 = 16x AF
recommendation: Up to 6600 GT: 2 or 4 | 7600 GT or better: 4 or 8 | 8800GT: 8 or 16
- mat_picmip - This is the command that has the biggest impact on the look and feel of Counter-Strike Source. Depending on the Texture Level does the game look superb or ugly as hell. Check out the screenshots for a comparison of the different Texture levels. The possible values are 0 = high | 1 = normal | 2 = low | 3 = wtf | 4 = omg i must puke
recommendation: 0
Alternate screenshot
- mat_specular - Please read the comment at mat_bumpmap above.
recommendation: same value as mat_bumpmap
- mat_trilinear - Trilinear Filtering is pretty much the lesser version of Anisotropic Filtering and can be used with old vid cards. Below Trilinear Filtering is Bilinear Filtering which is comparable to the above mentioned mat_picmip=3 setting. It looks like shit and doesn't bring any mentionable FPS gain, therefore it is -in my opinion- just stupid to play with the Bilinear setting. Possible values 0 = Off | 1 = On
recommendation:1 (is overruled by your graphics driver or mat_forceaniso)
- r_decal_cullsize - Determine how close you must be to an object to see it - for example bullet holes in walls. If the holes are below a certain pixel value you don't see them from distance. If you get closer to the holes they will appear on your screen. The possible value is set by pixel. The higher the value the more game elements you see from distance the more must the vid card draw.
recommendation: 5
- r_renderoverlayfragment - Here it comes, this inconspicuous command is the second big FPS killer in the game. Please check out the screenshots to see what this command does. Although it adds a good portion realism to the game, is it not worth the huge FPS loss. Possible values 0 = Off | 1 = On
recommendation: 0
Command Overview
Light, Shadow and Effects
- mat_bloomscale - Determine the intensity of the Bloom effect. Value range from 0 (Off) to 20 (awful ugly) in steps by 0.1
recommendation: 0 if you have this effect disabled, otherwise 1 is enough
- mat_disable_bloom - Turns the Bloom effect On and Off. Possible values 0 = Off | 1 = On
recommendation: 0
- mat_filterlightmaps - Lightmaps are a kind of pre-defined textures that determine how certains things look like. For example the shape of the flashlight at a wall. The shape of the light always remains the same, it just scale depending how far or close you are to the object (wall). Possible values 0 = Off | 1 = On
recommendation: 0
- mat_hdr_enabled - The High Dynamic Range Rendering adds beauty to certain maps, but it's not important for the game, hence it only waste resources. Possible values 0 = Off | 1 = On
recommendation: 0
- mat_hdr_level - If you have HDR or Bloom enabled you can set here which level should be applied. Possible values are 0 = No HDR | 1 = LDR and Bloom on HDR maps | 2 = Full HDR if the map support it
recommendation:0
- cl_c4dynamiclight - Determines if the blinking C4 light is mapped on nearby objects such as boxes and walls or if only the C4 blinks red. It's easier to see where the bomb was planted with dynamic light On. Possible value 0 = Off | 1 = On
recommendation: 1
- muzzleflash_light - Turn off the flash light if the enemy fires his gun. It is not really necessary, but it can be useful if your enemy fires at you through a smoke, so you see the flash light and can guess his position. Possible values 0 = Off | 1 = On
recommendation: 0
- r_dynamic - You can disable the dynamic environment light here. Dynamic light is e.g. if the sun stands high on de_dust2 it is brighter on certain map areas, if the sun is low you have more shadows on the map. This adds some realism to the game and doesn't cost much resources. Possible values 0 = Off | 1 = On
recommendation:0
- r_shadowmaxrendered - Set the player shadow detail. Shadows can be very important in Source, because you often see the shadow before you see the actual enemy. A high detail level is highly recommended. Possible values are 0 (more a black clump than a shadow) to 32 (Setting High in the Options - the shadow looks realistic like a human shadow)
recommendation: 32
- r_shadowrendertotexture - Shadow to Texture means, that you see other players shadow on the ground, at walls and on other object (barrels, boxes and so on). Possible values 0 = Off | 1 = On
recommendation: 1
- r_shadows - Disable/Enable Shadows at all. Like i already mentioned can shadows be game deciding. Possible values 0 = Off | 1 = On
recommendation: 1
Command Overview
Model Textures and Physics
- cl_ragdoll_collide - If you kill two or more enemies at the same spot and this command is set to 1, the bodies will mound. If the command is disabled, the bodies fall in each other, so they lie flat on the ground. Possible values 0 = Off | 1 = On
recommendation: 0
- cl_ragdoll_physics_enable - The physics of the game can be used to ones advantage. This command let you disable the physics for corpses, so they don't whirl around if a HE detonates close to it. Further is there no death animation, but the body of a killed players simply vanish. Possible values 0 = Off | 1 = On
recommendation: 1
- ragdoll_sleepaftertime - Time in seconds how long the Rag-doll animation last. You see this effect when you kill an enemy at a ramp and the dead body slides downhill for a while.
recommendation:3.5
- cl_wpn_sway_scale - This is the motion your weapon model does when you turn around really fast. Possible values 0 = Off | 1 = On
recommendation: 1 *
- r_lod - Detail level of player models and some other textures. Get a lok at the Screenshot to see what it does. The player models clothing simply look more realistic, because details can be seen. Possible values -1 (best) to 2 (worst)
recommendation:-1
- cl_min_ct - If cl_minmodels is set to 1 you can determine here which model should be used for CTs. Possible values 1 = SEAL | 2 = GSG9 | 3 = SAS | 4 = GIGN
recommendation: personal preference
- cl_min_t - Same as above, but for Terror. Possible values 1 = Phoenix | 2 = Leet | 3 = Arctic Avenger | 4 = Guerilla
recommendation: personal preference
- cl_minmodels - If set to 1 CS:S only shows one model type for each side - see above. Possible values 0 = Off | 1 = On
recommendation: 1
Command Overview
Objects and Environment
- cl_ejectbrass - Show shells on the ground. Possible values 0 = Off | 1 = On
recommendation: 0
- mp_decals - Maximum number of bullet holes, spraylogos, and other, that will remain visible on the map. You can set this to whatever, but it is recommended to keep the number low. CS:S original value is 2048.
recommendation:50 to 100 should be fine
- r_decals - Same as mp_decals. Set this number to the same amount.
recommendation: same as mp_decals
- r_drawmodeldecals - Show decals on models. Possible value 0 = Off | 1 = On
recommendation: 1
- r_maxmodeldecal - Maximum number of decals on models.
recommendation: 50
- r_spray_lifetime - How many rounds will a spraylogo be shown. The longer this time is and the more spraylogos there are the more has to be re-rendered. The lower the better, hence
recommendation:1
- cl_detaildist - How far you can be away from a model/object and still see it. Possible value from 0 to 1200
recommendation: 1200 *
- cl_detailfade - Duration how fast a object fade out if it get out of sight.
recommendation: 200 *
Command Overview
Important: Values with a red asterisk (*) are default values and can only be changed with sv_cheats enabled!
That's it!
Those are the -in my opinion- most important commands to build up a FPS config. The Objects and Environment as well as the Model Textures and Physics Section have a rather little impact FPS-wise, that's why these sections are not explained in depth. Feel free to use the commands to test out different values and see what works best for you. You are pretty much safe if you make a back up of your configs and place these commands in your autoexec.cfg. If you don't like the changes simply delete the config file and you are back to default.
To show you the difference between all important settings Off and On get a look at the: Comparison Screenshot
And here is the comparison between the Default CS:S Settings and my tweaked High Settings: Comparison Screenshot
Now let me get back to the previously mentioned X-Fi Sound card.
Before this card, did i use a somewhat outdated Creative Player Live card, which was okay. Then i switched to the X-Fi Xtreme Gamer and was immediately astonished! The sound is so much better, clearer and crisp with this card and not even a Audigy 2 comes close to it (i tested it out of curiosity). I have read alot about the card and multiple times have i read, that the X-Fi use the fastest sound chip that was ever produced. I thought "ok, nice! fast sound chip, great." and didn't fully realized what this means. In fact does this sound card manage to take away so much load off of the CPU to "render" the sound on it's own, that it indeed freed so much resources that i got a boost between 8 and 15 FPS depending on which map i'm on!
Yes you read correctly! Only for the fact that i switched to a better sound card did i not only got a superior sound experience but i also got a gratis 8-15 FPS boost in Source!
I think the sound is an often underestimated and overlooked resource to boost the over all performance. Especially if you use OnBoard sound should you consider to get a real sound card. The reason is simple: OnBoard sound uses usually integrated low cost sound chip and all the calculating work for the sound must be done by the CPU alone. If you now think about the fact that Counter-Strike Source is heavily CPU dependant, then it is obvious that you waste a lot resources right here. So before you consider to buy more RAM or an even better vid card, consider to upgrade your sound devices and i guarantee you that you wont regret it!
Alright boys, we are at the end of this looong article. I hope it was somewhat helpful for you to squeeze out some more FPS.
Best wishes to you all,
Bossi
p.s. Big Thanks to aMies for "beta read" the article :-)
© 2007 by Bossi