Enhancing videogame graphics on a Mac (Windows 7, Battlefield 3)

May 16th, 2012 by Mark Nanut Leave a reply »

BF3Update 4.5.2013: The methods I originally described in this post did work fine, but I just wasn’t completely satisfied with the image quality (still jaggies here and there even at 2xMSAA and general lack of detail at 0xMSAA). Turns out the only real fix for my eyes is to use 4xMSAA with postAA low, no injector, no sharpening, no color fixes (other settings: textures+shadows low, effects+mesh: ultra, terrain medium, deco high, no AO). I was surprised to find that 4xMSAA actually does work smoothly on my 6750M with measly 512 MB VRAM at 1366×768 (non-native though, but also non-scaled of course) resolution with new 13.5 catalyst beta drivers. Had to free as much VRAM as possible (desktop at 16bit color in non-aero mode, using only some 5 MB VRAM, kill hardware acceleration in Firefox) and remove all injectors though (FXAA/SMAA/SweetFX) because they were hurting performance in combination with 4xMSAA. The game now looks sharp and smooth, is a pleasure to watch and play, graphics are easier on the eyes and spotting enemies is much easier with details so carved out and image so clear. So basically if you can afford 4xMSAA at a decent (laptop) resolution even at some low settings, go with it.

Other honorable mentions: The other method I tried prior to settling for 4xMSAA was to use SweetFX injector (a great injector btw) combo with SMAA, sharpening, color vibrance and contrast correction, ingame PostAA low and 2xMSAA. Looked pretty much great, especially the colours, you might want to try that out if 4xmsaa is not an option. In my “quest” for the perfect image quality I even came across a very interesting SSAA injector (download SSAA-Tool at http://www.tommti-systems.de/start.html). What SSAA (true supersampling which can actually be forced upon BF3) injector did in my case was to render the image at double pixels (2880×1800) and then display it downsampled to display’s native 1440×900 resolution. As you can imagine, the image quality is perfect this way, but it murdered my framerates in BF3 therefore it wasn’t even remotely usable, but with a high-end card (or a less demanding game) that would be a different story.

So the takeaway of this whole bf3 image improving oddyssey would be: some games can look near perfect with merely an FXAA injector (BC2 and countless others), but shader based antialiasing (FXAA or SMAA) alone is not enough for BF3, this game is simply made the way it is made, the injector spells work only partially. Use 4xMSAA with BF3 (or at least 2xMSAA). At least for me, 4xMSAA on low has better image fidelity than 0xMSAA on ultra, the difference between jaw-dropping versus sort-of-ok-but-kinda-sloppy. Happy gaming, over and out.

The original post 14.5.2012:
This is a follow-up post to the previous one. This time around, we’re going to sharpen BF3 graphics further and improve the image quality in BF3, at no performance cost and start enjoying some high-fidelity visuals. No, it’s not yet another post about DANOC FXAA.

——-update 30.9.2012——–

Still using the sharpening injector, only I have set “#define SharpenEdge 0.1″, it hits the right balance between keeping the image sharper than default, and the image jaggies can be smoothed out by using the Post AA set only to Medium. This will give a decent image if you don’t have a powerful enough GPU to use 2xMSAA or 4xMSAA. But then again, if you want the best possible image quality, use at least 2xMSAA + Post AA Medium/Low. The visual difference between 0xMSAA + Post AA Medium and 2xMSAA + Post AA Medium could be worth sacrificing a few FPS for.

Since the original post I have switched from mid-2009 MBP (with Nvidia 9600M GT 256MB) to late-2011 MBP (with Radeon 6750M 512MB). The new card is decent, but of course it cannot max out BF3. So after a lot of tweaking, these are finally the settings I’m overall sort of satisfied with:

Resolution: 1280×800 (to be able to play nice with 2xMSAA), non-scaled of course, FOV 54. Otherwise 1440×900, 0xMSAA, FOV 60.

Textures low (or medium), shadows low, effects ultra, mesh low (or medium), terrain medium, terrain decoration ultra.

Antialiasing deferred: 2xMSAA (for visuals) or 0xMSAA (for action)
Antialiasing Post: Medium (or low with 2xMSAA)
Motion blur: off
Anisotropic filtering: 8x
Ambient occlusion: HBAO.

So to sum it up: Sharpening injector + HBAO + 2xMSAA + Post AA medium/high = WIN. HBAO in combination with 2xMSAA seems to make the most visual difference, even at low textures and yes, low shadows. Shadow quality makes surprisingly little difference in image quality once you have HBAO and/or 2xMSAA enabled (with sharpening injector of course).

FPS with 2xMSAA: 30-45
FPS with 0xMSAA: 45-60+
(6750M overclocked at 800/1000 @ 1.01v, 12.9 beta driver, CPU capped at multiplier 14x-18x to keep the overall temps down – getting around 85C CPU and 85C GPU, fans maxed to 6000rpm with Lubbos fan control)
Other settings in Ati Tray Tools: Catalyst AI, Texture quality and Mipmap quality – all three set to High Quality, Antialiasing set to “Application-controlled” but set to “Supersampling” regardless. High Quality AF = enabled.

WorldRender.Dxdeferredcspathenable in console set to 0 (disabled). Deferred compute shader (CS) will show benefit only in scenes with lots of different light sources, for instance when you’re close to burning vehicles – having it enabled will prevent frame drops in such scenes, but it will sap FPS in all other, regular scenes. That’s why it’s more practical to keep it disabled.

One more thing: The new Catalyst beta driver 12.9 rocks in Battlefield 3 on 6750M – highly recommended. I used 12.6 WHQL before that and the jump in frames per second is substantial.

——-end of update 30.9.2012——–

While the fundamentals of this method are similar to DANOC or other FXAA/SMAA injector, I got super sharp graphics and better IQ (image quality, obviously) :) in BF3 a bit differently – by trying something maybe a bit counter-intuitive, so here it is:

1. Turn in-game Post AA to HIGH. Yes, this is BF3 in-game implementation of FXAA which I was previously avoiding as much as I could, since it blurs the image so much. But it turns out there’s a benefit to it. So, the first step requires we get this super-blurry image, and then:

2. Apply classic FXAA injector, but with a twist: we’ll use ONLY the sharpening pass (Sharpen.h) which comes with it, and disable ANY antialiasing by this injector. I disabled injector antialiasing by editing these lines in the file “shader.hlsl” to this:

0, //fxaaQualitySubpix (default: 0.75)
1, //fxaaQualityEdgeThreshold
1, //fxaaQualityEdgeThresholdMin

This effectively “disables” antialiasing by the injector. Next, don’t forget to include the “Sharpen.h” by uncommenting the line to this:

#include “Sharpen.h”

Then you can make minor adjustments inside the “Sharpen.h” file by editing the amount of edge sharpening (I leave it at 0.2 or set it to 0.4):

#define SharpenEdge 0.2

Simplest procedure (summary) to get things working as explained:

If you have never used an FXAA injector before and don’t want to fiddle with the above mentioned settings, or just want to jump straight to the results, here’s what to do:

1. Turn in-game Antialiasing Post to High (and turn off Antialiasing deferred (MSAA))
2. Download my FXAA injector files, extract and put all 4 files in the BF3 game directory (to reverse this, simply delete those 4 files).

That’s all.

Now, some of the results first (zoom to see actual image size):

Quite impressive for LOW textures setting, I think (use medium textures for even more eye pleasing porn). Now, I’m not claiming that this method removes all aliasing, but still it yields much better results than anything else I tried.

Apart from injector file settings, to get the image quality as in the posted images, set textures and shadows low, all the rest to medium, Post AA High, AF 16x, SSAO on.


In Nvidia Control Panel i have texture filtering set to Quality, LOD bias: Clamp.

So maybe you’re asking – why this alternative sharpening method, when for instance Danoc FXAA injector does just fine and everybody else seems to be using it? Or why use in-game Post-AA instead of injector FXAA together with the sharpening pass?

The simple answer is: I tried it both/all – and wasn’t satisfied with the results at all. This “Post AA High + Sharpen.h” thing was almost an act of desperation, the final thing I was about to try before giving up on trying to get any better image quality in BF3. To be honest: out of the box and on low/medium settings (which quite a few gamers are forced to resort to), Battlefield 3 looks OK, but it just feels like it should look better, and overall just feels a little blurry and unpolished, despite superior lighting and effects. For instance, in BFBC2 I could achieve marvelous image crispness at practically zero aliasing with the FXAA injector, so I found it frustrating that whatever I tried to achieve with the same FXAA injector in BF3, resulted in somewhat non-crisp image and/or jagged edges. And DANOC FXAA injector seemed to spoil the image even more, by making it unnaturally sharp, even without the color correction.

It seems that FXAA injector works differently in BFBC2 vs BF3 because of the differences in lighting between game engines. For instance, in BFBC2 there is a lot more bloom which smooths out object edges, and on top of that these object edges don’t seem to reflect white specular light, and it’s exactly these white object jaggies which are a MAJOR annoyance in BF3 (if you are not using 4xMSAA – and on a low-spec machine you definitely aren’t – yet even 4xMSAA doesn’t smooth out the white aliasing out completely). Apart from white edge “pigeon-shit” aliasing, there’s also black edge aliasing, but it’s not nearly as distracting.

In short, FXAA (and SMAA) injectors did more or less a good job at smoothing out almost all of the edges, except this white edge aliasing on fences and stuff – moving forward in a scene with fences resulted in unsightly edge flickering/flashing. Obviously one thing to try to fix that was to apply more blur to minimize this white aliasing. And this is how we got back to the infamously blurry in-game FXAA (Post AA HIGH) to enhance BF3 graphics. Yet somehow, when you apply the sharpening pass over it, the result is almost, ehm, magical. The shitty low textures actually start looking as if they are at least medium quality, the white aliasing is tamed, and while there is and occasional jagged edge here and there (due to FXAA not fixing it because the line is dashed / or due to extra sharpening), the results are great overall and this is more or less how Battlefield 3 should have looked from the start. Of course, there is also the annoyance of bland colours thanks to much “praised” art direction, but you can fix that by adjusting vibrance/gamma in Nvidia Control Panel.

I’m well aware of the possibility that Nvidia driver FXAA (in 301.24 driver) + sharpening might give even better graphics quality in BF3, but I’ll try that some other time, maybe we’ll even have the highly anticipated FXAA 4 by then. :) —>UPDATE 1: I tried also the combination of driver FXAA + FXAA injector (with antialiasing off and sharpening on; PostAA in game off), driver FXAA forced through nvidia inspector for the newest 301.42 driver for “Battlefield 3″ profile. The image quality is nice, although it has more aliasing compared to Post AA HIGH + FXAA injector (with antialiasing off and sharpening on). Still there’s less aliasing compared to using antialiasing of only the FXAA injector at the highest setting (FXAA injector with enabled antialiasing + sharpening; PostAA in game off). But what’s most bothersome, driver FXAA seems to give a very noticeable performance hit, so for me at least, it’s not an acceptable option. It just slows the game down for me. So Post AA HIGH + FXAA injector (with antialiasing off and sharpening on) is the winner for now.

UPDATE 2: even on high-end machines with all settings maxed this method might prove useful if you would like to get a bit clearer/sharper image. Here are two cropped screenshots of a scene from BF3 campaign, all settings maxed (4xMSAA and Post AA HIGH) with the injector on versus injector off:

BF3campaign-all-maxed-ultra-PostAAHigh-4xMSAA-injector OFF (very slighty blurry)
BF3campaign-all-maxed-ultra-PostAAHigh-4xMSAA-injector ON (clearer)

Hope this helps a bit,

Test link 1
Test link 2

Test link 2

Most Commented Posts

  • o1s1n

    Came from EAUK forums just to say what a great solution this is.
    Thanks a million!!.

  • Ross-mart34

    I also read about this on the EA UK Forums and I have a question:

    Can I enable color correction using this “package?” I was previously using DANOC for color correction and am glad to switch to this for a sharper image; but, custom colors would be nice if possible with this.  

    Thank you.

  • http://www.google.com/profiles/marknanut Mark Nanut

    You could:
    1. use Nvidia Control Panel and adjust colors there
    2. of course: use DANOC injector instead of the original fxaa injector (which is also the one I posted above), and adjust settings to be analog to settings in “my” fxaa injector yet keep the color correction filter. So, I'm guessing that in DANOC injector in injFX_settings you should disable everything but presharpen filter (which is analogue to sharpen filter in my setting) and color correction filters. Definitely DO disable postsharpen or you'll just make the image too sharp. So achieving a similarly high image quality should be perfectly doable with DANOC fxaa injector as well, though I haven't tried specifically that. Since I (mostly) don't have any need to correct colors in bf3, I just went forward with the simpler, more straightforward version of the FXAA injector. I might take time and experiment a bit with DANOC fxaa too. 

  • http://www.google.com/profiles/marknanut Mark Nanut

    Update: Here you go, I adjusted DANOC fxaa injector to work in a similar manner as the first one (classic fxaa injector), with color correction enabled. Tested it briefly and seems to give results in the same vein.


    Try it and pls report back if it's satisfactory. :) Of course, don't forget to set Post AA to High.


  • Ross-mart34

    Got stuttering with this one for some reason..? Weird. My in-game settings are:
    * All HIGH (All LOW if I'm really feeling competitive)
    * MSAA  x4
    * Post AA HIGH
    * AF x16
    * Motion Blur OFF
    * Ambient Occlusion HBAO

    Thank you for the effort, though. I really appreciate it. I'll just use your Sharpen Injector. It works great.

    I do have one more question if you don't mind, regarding this value   “#define SharpenEdge 0.2″ What is the highest this value can go to? Is it  0.4? I tried 0.65 and it made my AfterBurner OSD act all crazy for some reason; instead of my Adaptive VSync keeping my frames at 60.1, they went up to 185…. Very strange.

  • http://www.google.com/profiles/marknanut Mark Nanut

    about the SharpenEdge value…I wouldn't know since it is more of a trial and error thing and for me even 0.4 is a bit too high from a graphical viewpoint (makes edges too sharp). I'm just using 0.2 in all situations now. Why too high a value would bork your OSD is beyond me, it's weird and interesting though.

    About that modified DANOC 1.3 Beta injector I posted…I noticed somewhat less smooth performance myself with it too, which is weird since all that is different is supposed to be the color correction (technicolor, sepia and tonemap filters). There must be something in the settings I've missed. And also the image is not as sharp as with the “basic” injector, haven't found out why yet. The textures also seem less detailed with it, or maybe it's just me. The colors seem nice though, even on Caspian they are not too intrusive, and make “gray” maps like Karkand more lively. I might take another look at this DANOC injector and try to optimize it a bit further.

    You seem to be able to run BF3 on max settings and it's good to know that these injector settings are helpful even in such situations. From what I saw, the difference between using the injector or not, with all settings maxed, is not that big, but it's there, the extra sharpness is definitely noticeable. But on low-end machines (with 0xMSAA) this injector should make all the difference.

    Can you achieve satisfying colors at least via graphic card control panel? Maybe the colors aren't exactly the same as with the DANOC color correction injector, but it just feels a bit redundant to correct colors through a cascade of injector filters instead of directly through control panel. Again, just an opinion.


  • Ross-mart34

    an you achieve satisfying colors at least via graphic card control panel? Maybe the colors aren't exactly the same as with the DANOC color correction injector, but it just feels a bit redundant to correct colors through a cascade of injector filters instead of directly through control panel. Again, just an opinion.”

    Yeah. I've used the nvidia panel to adjust my colors but, the only problem is, I like brilliant colors in BF3 and to get them (BF3 is kinda washed out at stock) I have to make some serious adjustments using Digital Vibrance and whatnot and it affects my screen when viewing other things in an overpowering way.

    I appreciate all your help and I'm grateful for it.

  • o1s1n

    Me again, so after getting the latest driver and trying out NVIDIA's implementation of FXAA I have to say that your method is still far better.
    I actually didn't see a performance hit (on this low end machine) but the aliasing was still pretty bad in places, especially on far to mid distance objects and terrain such as buildings across the street.

  • Chris Blahh

    Best yet! Looks really good on my PC.

  • Darkjedi8

    Sir. U deserve my best wishes. Thanks.

  • Peanutplanters

    Any luck on getting color correction with this mod? I love the FXAA this does, but also want the color correction that DANOC provides :)

  • Ross-mart34

    Couldn't get it to work, brother.  I ended up using this and just using my control panel to get my colors as bright as possible without overdoing it in other applications. At this point it's a trade off: DANOCs colors or this better FXAA….

  • Peanutplanters

    What settings did you use in your control panel for color correction? Just digital vibrance? 

    Also, is it possible to active the correction ONLY when bf3 runs?

  • Ross-mart34

    I opened some High Definition pictures on my screen, of several different things, showing the entire color spectrum: a colorful parrot, the blue sky, etc etc. I went through them 1 at a time, and adjusted my contrast, gamma, digital vibrance in my control panel…then I used my monitor to adjust my colors just a tiny bit. Just be sure and write down the values you try in your control panel so you can know where you started and where you set them.

    I don't think there is a way to make a “profile” for colors to switch when BF3 opens. Not in the control panel. I can't seem to find one and nobody I've asked thinks it's possible.

    Personally, between this and the DANOC colors, I choose this—with this my frames stay high enough to keep that “edge” and image quality is very good.

    Sorry it took so long for me to answer. I never got any e-mail until yesterday…

  • bingobawler

    Superb, great work. Runs well and looks great. gtx560ti. Very sharp, i am noticing details i have never seen before. Amaze! Thanks

  • peanutlasko

    I think something like Powerstrip (http://entechtaiwan.com/util/p... can be used to create a color profile that you can toggle on/off easily.

    If you feel up to it, try installing the software and tweaking your settings in that application instead (leave windows settings at stock). Then you can share the profile settings for the colors. 

  • Gib007

    Thanks a lot for this. Along with Digital Vibrance set to 70% instead of the default 50%, this FXAA Injector gives BF3 a very sharp, new look! :)

  • http://www.google.com/profiles/marknanut Mark Nanut

    Using a Radeon 6750M now. The new preferred combination is: FXAA sharpening injector + 2xMSAA + Post AA High. 

    2xMSAA makes a huge difference in fleshing out extra details and smoothing stray aliasing – it brings image fidelity to a whole new level. 

Web Analytics