Author Topic: [Fix] Broken Wounded Shaders on Nvidia with AA enabled  (Read 10022 times)

Offline Apo-TTCC

  • Jr. Member
  • **
  • Posts: 53
  • FH2 Betatester
    • View Profile
EDIT: 2012 January
These methods are now outdated. Unstickied.
Nvidia drivers have hardcoded disabled AA on BF2.exe due to a bug in teargas (which we use for post processing), so don't expect the wounded shader to work anymore.
Luckily FH2 now uses ForgottenHope2.exe for optimal AA settings.
http://ifihada.com/~jbp/fh2pub/usermanual/#2b
Other BF2 shader bugs, such as black terrain patches, were fixed at the root, which Nvidia and ATi had both modified drivers to fix.


Original:

Here is a fix that can be used for the broken shaders when AA is enabled, that were introduced by Nvidia with their drivers newer than 177.83. We told Nvidia/DICE about it but they did not do anything yet to fix it.

Usually when your health goes under 25% the shader kicks in and your screen gets blurry and your minimap is not showing any infos until you apply a bandage to stop the bleeding. When AntiAliasing is enabled ingame this did no longer work, also forcing AA via the ControlPanel was simply ignored and no AA was present ingame.

Now this can be fixed by using a tool called nHancer, it does override the AA setting from outside and the shader works like intended.

What you need:
nHancer http://www.nhancer.com/?language=e
Ingame BF2 Video Settings > AA > Off

nHancer Settings:
- enable 'Options > Allow override of predefined settings'
- pick the BF2 profile
- enable AA > Multisampling > set AA to what you like/your PC can handle
- optional you can also enable AF (AnisotropicFiltering) for some smoother textures, depending on the distance. (the ingame setting 'texture filtering' has a maximum of 4x compared to the possible 16x via nHancer)

nHancer does not need to run in the background for the changes to kick in, it will override the settings anyway.

Another good idea, not 100% sure if it is necessary at all, is to delete the shaders cache for BF2 and FH2 after the changes were done.
C:\...\My Documents\Battlefield 2\mods\bf2\cache
C:\...\My Documents\Battlefield 2\mods\fh2\cache
They look like: {D7B71E3E-46A3-11CF-9854-9B0400C2CB35}_3134_3

Important:
Since the latest version of nHancer is a few month old now there are some problems when running it with the latest Nvidia drivers. If you use 19x.xx you might want to to try nhancer 2.5.3 beta.
http://forum.nhancer.com/showpost.php?p=4492&postcount=18
hslan.Lord Helmchen just tried the nHancer beta with 190.62 and said it works.



What the shader looks like:


Additional infos
Card: GTX285
Driver used: 186.18 WHQL, all BF2 settings on default in the ControlPanel
DirectX: 9.0c 9.27.1734 August 2009 http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=04ac064b-00d1-474e-b7b1-442d8712d553
Alt+Tab Hotfix http://forums.electronicarts.co.uk/battlefield-2/804570-battlefield-2-update-1-50-alt-tab-fix.html (might not be necessary any more, did not test that)
XP Pro 32bit SP3

« Last Edit: 16-01-2012, 16:01:01 by Kev4000 »
ß

Offline Admiral Donutz

  • Global Moderator
  • *****
  • Posts: 901
  • Betatester
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #1 on: 12-09-2009, 13:09:58 »
Nice work mate! If only Nvidia/Dice would fix this, it would stop many people from getting confused about "their minimap acting weird with missing icons" and such.

Offline Mr_Cheese

  • Developer
  • ******
  • Posts: 199
  • FH2 dev
    • View Profile
    • My Portfolio Website
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #2 on: 12-09-2009, 16:09:50 »
Do you set the application to bf2.exe or fh2.exe?

Offline Apo-TTCC

  • Jr. Member
  • **
  • Posts: 53
  • FH2 Betatester
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #3 on: 12-09-2009, 16:09:40 »
Do you set the application to bf2.exe or fh2.exe?
Changed the BF2 profile in nHancer, for launching FH2 i'm using the FH2 (FH2.exe) shortcut with nHancer running in the background.
ß

Offline hOMEr_jAy

  • Hero Member
  • ****
  • Posts: 2.808
  • Lannister Loyalist
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #4 on: 12-09-2009, 20:09:47 »
Strangely I can´t run nHancer because it givs me an error message when I try to run the program o0
And so he spoke, and so he spoke, that lord of Castamere,
But now the rains weep o'er his hall, with no one there to hear.
Yes now the rains weep o'er his hall,
and not a soul to hear.

Offline Mr_Cheese

  • Developer
  • ******
  • Posts: 199
  • FH2 dev
    • View Profile
    • My Portfolio Website
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #5 on: 12-09-2009, 20:09:51 »
http://forum.nhancer.com/showthread.php?t=1123 this one?

I had it too, just open the xml file it says in Wordpad and delete the text the post shows in red and save. It'll work fine after that.

Although mine doesn't seem to apply profiles... I click on fh2.exe and the game loads without AA.

Offline Wilhelm

  • FH-Betatester
  • ***
  • Posts: 594
  • Betatester
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #6 on: 12-09-2009, 20:09:23 »
You can also just use the Nvidia Control Panel to force the AA while having it off in the ingame video settings.  I also have nHancer, but it is not running at the times I have been playing.

For me, the Nvidia Control Panel AA works fine ingame and I can now also see the shader.

For BF2, I have the AA set to use Global Settings in the Nvidia Control Panel.

Offline hOMEr_jAy

  • Hero Member
  • ****
  • Posts: 2.808
  • Lannister Loyalist
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #7 on: 12-09-2009, 20:09:21 »
Thanks for the quick answer, mr. Cheese, nHancer works now ;)
I have to try later if the bleeding shader (something I really missed) works.
And so he spoke, and so he spoke, that lord of Castamere,
But now the rains weep o'er his hall, with no one there to hear.
Yes now the rains weep o'er his hall,
and not a soul to hear.

Offline Wilhelm

  • FH-Betatester
  • ***
  • Posts: 594
  • Betatester
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #8 on: 12-09-2009, 20:09:42 »
Although mine doesn't seem to apply profiles... I click on fh2.exe and the game loads without AA.

Did you try using a profile for just BF2?  That is what I did before with the reasoning that whatever it applied to BF2 would also be applied to its mods.  It worked for me.

Offline Mr_Cheese

  • Developer
  • ******
  • Posts: 199
  • FH2 dev
    • View Profile
    • My Portfolio Website
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #9 on: 12-09-2009, 21:09:03 »
I made a profile that would activate with bf2.exe or fh2.exe.

Offline Apo-TTCC

  • Jr. Member
  • **
  • Posts: 53
  • FH2 Betatester
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #10 on: 13-09-2009, 00:09:56 »
You can also just use the Nvidia Control Panel to force the AA while having it off in the ingame video settings.  I also have nHancer, but it is not running at the times I have been playing.

For me, the Nvidia Control Panel AA works fine ingame and I can now also see the shader.

For BF2, I have the AA set to use Global Settings in the Nvidia Control Panel.
I tried forcing AA via the control panel several times for BF2.exe but it was always ignored and there was no AA present ingame.
edit:
I think it is because nHancer does still override the control panel settings, even when not running and something was changed for the game in nHancer before. At least the FAQ says that it does not need to run in the background to kick in.

« Last Edit: 14-09-2009, 21:09:09 by Apo-TTCC »
ß

Offline MK

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #11 on: 14-09-2009, 14:09:39 »
Doesn't work,190.38 and 8800gt

Quote
I tried forcing AA via the control panel several times for BF2.exe but it was always ignored and there was no AA present ingame.

exactly

Offline Apo-TTCC

  • Jr. Member
  • **
  • Posts: 53
  • FH2 Betatester
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #12 on: 14-09-2009, 15:09:59 »
Doesn't work,190.38 and 8800gt

Quote
I tried forcing AA via the control panel several times for BF2.exe but it was always ignored and there was no AA present ingame.

exactly
Did you try it with the nHancer beta linked in the first post?
ß

Offline MK

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #13 on: 14-09-2009, 15:09:11 »
Yes,beta(2.5.3 beta 2)and nvidia control panel too...result is no AA in game

Offline Apo-TTCC

  • Jr. Member
  • **
  • Posts: 53
  • FH2 Betatester
    • View Profile
Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
« Reply #14 on: 14-09-2009, 15:09:01 »
So it looks like a pre 19x.xx driver is needed to make it work as intended. I'm still at 186.18WHQL right now.
ß