There’s been a large amount of discussion on the Gearbox forums as well as other places with regards to Borderlands (PC) having horrible framerates. Numerous people reported that disabling Dynamic Shadows in the Video configuration menu (also known as DynamicShadows=False in WillowEngine.ini) increased their framerates dramatically (by almost 2x).
People have also complained about slow mouse response, recommending all kinds of weird workarounds.
Well, I can confirm both statements on my own system which uses an nVidia GeForce 9800GT (model BFGE981024GTGE). All of the below tests were done on said card, on Windows XP SP3, the latest DirectX 9 runtimes, and nVidia driver version 195.62. Your experience may vary depending on what card you have and other whatnots.
I began by looking at WillowCompat.ini and determined that depending on what model of video card you have (based on PCI Device ID; you can look this up using GPU-Z — there are multiple revisions of the same type of card, so keep that in mind) the game chooses options for you. In my case, my card is PCI Device ID 10DE-0614 (the last 4 hexadecimal digits are what defines card model). There appear to be some oddities in WillowCompat.ini too; for example, Trilinear=True, which isn’t defined or used in any other INI file. This probably enables/disables trilinear filtering, but I’m surprised that setting isn’t defined anywhere else.
Anyway, I experimented with combinations of certain WillowEngine.ini settings, as I wanted to find out what config options — or combination of them — were causing the framerate drop. I spent a couple hours this weekend doing tests, using the entrance at Krom’s Canyon as my testing environment. The reason I chose Krom’s is that it loads very quickly, contains a good number of high-polygon models, textures which make use of reflections (think bump mapping), in addition to a large number of shadows. I actually saw some reflection/texture rendering issues while in Krom’s, which is what started me on this whole goose chase to begin with….. :-)
Finally, I should note that with regards to mouse responsiveness, I have bEnableMouseSmoothing=False set in WillowInput.ini, as well as OneFrameThreadLag=False in WillowEngine.ini. The column is meant to represent how the mouse feels both in-game as well as in the UI; players very likely know what I mean by “floaty” vs. “accurate”.
avg fps Mouse resp. DynamicShadows LightEnvironmentShadows bEnablePSSMShadows Comments 33 Floaty True True True 64 Accurate True True False No object or terrain shadows 38 Floaty True False True 65 Accurate True False False No object or terrain shadows 38 Floaty False True True No gun shadows 64 Accurate False True False No object or terrain shadows 38 Floaty False False True No gun shadows 65 Accurate False False False No object or terrain shadows
Screenshots were taken for each of the above tests:
- Test #1
- Test #2
- Test #3
- Test #4
- Test #5
- Test #6
- Test #7
- Test #8
- ShadowResolution test
What this chart proves is that bEnablePSSMShadows is what’s responsible for the increased/decreased framerate as well as mouse responsiveness. Given that fact, there’s no real point toDynamicShadows=True when PSSM is disabled. DynamicShadows=False seemed to disable things like rendering shadows across your gun and so on; not really something I care about.
This, of course, made me ask: “What exactly is PSSM?” Thankfully there’s a significant amount of documentation on Parallel-Split Shadow Maps. Here’s a few resources I found online which visually demonstrate the concept:
http://appsrv.cse.cuhk.edu.hk/~fzhang/pssm_project/
http://appsrv.cse.cuhk.edu.hk/~fzhang/pssm_vrcia/
http://www.stevestreeting.com/2008/08/21/parallel-split-shadow-maps-are-cool/
http://hax.fi/asko/PSSM.html
The UE (Unreal Engine) has a multitude of shadow map methods which are available: PSSM, VSM (Variance Shadow Maps), and something called PCF (Percentage-Closer Filtering) or Branching PCF. Here are some more resources:
http://www.punkuser.net/vsm/
http://http.developer.nvidia.com/GPUGems3/gpugems3_ch08.html
http://pixelstoomany.wordpress.com/2007/09/03/a-not-so-little-teaser/
http://forum.beyond3d.com/showthread.php?t=40805
http://www.gamerendering.com/2008/11/15/percentage-closer-filtering-for-shadow-mapping/
http://www.fabiensanglard.net/shadowmappingPCF/index.php
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter17.html
I tried a multitude of config combinations with regards to these features to see if I could keep some form of shadowing but without the performance hit. Needless to say, I wasn’t successful.
So it seems that the best way to achieve proper framerates, at least with a 9800GT, is to set bEnablePSSMShadows=False and DynamicShadows=False (for a few extra fps) and accept the results.
Other footnotes:
- Adjusting
MinShadowResolutionandMaxShadowResolutionhad no effect on any of these tests. I mention this because I’ve seen forum users advocating decreasing these settings (from 1024 to 256) to solve framerate/mouse responsiveness issues. I adjusted these and found there to be no visual difference, nor any difference in framerate. - I’d really like to know what the
bNVIDIA3dconfig setting does. It’s not mentioned in the UE documentation or the Wiki. Hmm…








