Forgotten Hope Public Forum

Forgotten Hope 2 => FH2 Help / Support => Topic started by: Apo-TTCC on 11-09-2009, 22:09:49

Title: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Apo-TTCC on 11-09-2009, 22:09:49
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.

(http://img42.imageshack.us/img42/7791/shaderfix.jpg)

What the shader looks like:
(http://img42.imageshack.us/img42/9972/woundedshader.jpg)

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

Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Admiral Donutz 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.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Mr_Cheese on 12-09-2009, 16:09:50
Do you set the application to bf2.exe or fh2.exe?
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Apo-TTCC 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.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hOMEr_jAy 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
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Mr_Cheese 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.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Wilhelm 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.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hOMEr_jAy 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.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Wilhelm 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.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Mr_Cheese on 12-09-2009, 21:09:03
I made a profile that would activate with bf2.exe or fh2.exe.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Apo-TTCC 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.

Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: MK 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
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Apo-TTCC 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?
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: MK 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
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Apo-TTCC 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.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Ionizer on 14-09-2009, 17:09:41
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.

If you're going to do that, might as well just use an older driver that doesn't break the whole damn thing in the first place....
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Apo-TTCC on 14-09-2009, 19:09:23
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.

If you're going to do that, might as well just use an older driver that doesn't break the whole damn thing in the first place....
Well the last known working driver, 178.83, was released mid August 2008. So it is a bit out of date for my card, which came out January 2009 and also does not contain several fixes i need for some of my newer games. 186.18, the one i'm using now, is from late June 2009. So we are just waiting for an updated and working with the latest Nvidia drivers nHancer version right now.  ;)

This workaround is not a final, 100% working fix, due to the known circumstances but it is at least one way to have the mod to perform the way it is intended to with having AA running at the same time, while using an almost up to date driver.

I was just informed that nHancer Beta 2 and the 190.62 drivers work well together and that the fix is working with those two combined. Added the infos to the first post.


Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: MK on 15-09-2009, 00:09:44
Quote
I was just informed that nHancer Beta 2 and the 190.62 drivers work well together and that the fix is working with those two combined

Sorry but doesn't work,tested witch 190.62 :-\
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Apo-TTCC on 15-09-2009, 01:09:04
Quote
I was just informed that nHancer Beta 2 and the 190.62 drivers work well together and that the fix is working with those two combined

Sorry but doesn't work,tested witch 190.62 :-\
I'll tell Lord Helmchen about, he was the one who tried it and it worked for him. Maybe he can reply with some helpful additional infos what exactly he did.

He mentioned that he did delete the shader cache too, did you try that yet?

Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: MK on 15-09-2009, 02:09:50
Yes i deleted all shaders,what card Helmchen have?
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hslan.Lord Helmchen on 15-09-2009, 15:09:36
Ok here we go:

I did all the steps apo explained in order. First installed nhancer (the recent beta!), secondly applied his described changes to the bf2 profile (and only that one), then deleted the cache folders, set the ingame aa to "off" (!) and ultimately ran the game.
Everything works like a charm now. The anisotropic filtering gives very nice additional eyecandies to the game ;)
I own a geforce 8800 gt with 190.62 on win xp sp 3.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: MK on 15-09-2009, 16:09:44
I did all the steps but I don't see AA in game :( omfg

8800gt,190.62,xp sp3
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hslan.Lord Helmchen on 16-09-2009, 18:09:34
YOu have to activate the 8x aa not the 8xQ aa!
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: MK on 16-09-2009, 20:09:57
Yes i did it, AAx8 and AFx16 too and many other things  ??? i did exactly like in first post here
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hslan.Lord Helmchen on 17-09-2009, 00:09:04
All I then can suggest is to reinstall the driver and reapply the nhancer once more. Be sure to disable the ingame aa before that.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: SchwererGustav on 20-09-2009, 16:09:03
I have it working this way don't know atm.  what version of Driver i have...

anyway @MK:  maybe a silly question but do you have activate the BF2 profil in the enhancer?

I forgot it at the first time  :P
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: MK on 20-09-2009, 19:09:56
Activate?how?all changes are applied automatically

is any option to activate?how look active and inactive profile?
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: SchwererGustav on 20-09-2009, 19:09:09
Activate?how?all changes are applied automatically

is any option to activate?how look active and inactive profile?


right click enhancer ->activate Profil (the first) -> Battlefield 2


not sure about "activate Profil" i have a german version
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hslan.Lord Helmchen on 26-09-2009, 14:09:09
Ok now I managed somehow to screw up my stuff here, too. The problem was solved all the time until yesterday were suddenly everything was messed up again (no AA).

BUT

after a lot of trying I found a way to make it work again with 190.62! I followed this link:http://forum.nhancer.com/showthread.php?t=1086&page=9 (http://forum.nhancer.com/showthread.php?t=1086&page=9) and found following solution:

"Uninstall nHancer v2.5.3 beta 2
Uninstall v190.62WHQL
Reboot
Delete all remaining nvapps.xml and extendedProfiles.xml files (use search on c:\) <-- important!
Reinstall 190.62 WHQL
Go into CP and in 3D options and in "AA mode" for global, set AA mode on "Override all applications parameters"
Reinstall nHancer v2.5.3 beta 2
Set AA in all your games
Go back into CP and restore original settings of 3D options for global"

The order is very important!! So follow it wisely.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hslan.Lord Helmchen on 11-10-2009, 20:10:21
theres a new version of nhancer out there: http://nhancer.com/ (http://nhancer.com/). It seems as if it clears all probs without walkaround. Made it successfully working with 191.07
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Mr_Cheese on 11-10-2009, 22:10:51
Ok, here's some weirdness: I disabled nVidia control panel AA, disabled ingame AA and uninstalled nHancer (wasn't using it anyway) - now ingame shaders work fine and I still have AA! The problem now is actually being able to join a server... (http://fhpubforum.warumdarum.de/index.php?topic=2140.0)
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: hslan.Lord Helmchen on 12-10-2009, 18:10:56
afaik writes several informations deep into registry. Maybe you should delete these .xml datas, too and make a deep registry clean.
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Raziel on 05-02-2010, 15:02:24
Hey everyone! First of all thanks for the extremely useful hints and tips in this thread!
Yesterday I finally managed to get the wounded shader working with the 196.2 Nvidia driver.
These are the steps:
1) Installed Nhancer 2.5.3
2) After installing I set the Bf2 profile as instructed on the first page of the thread.
3) Do not close Nhancer yet....Click on Tools > Activate profiles
4) close enhancer
5) delete the cache (my documents/Battlefield2)
6) Disable AA in game

and walaaa! Shader works again.

Also as someone else stated b4 if in nhancer you activate the Antisotropic filtering even at 2x, FH2 graphics are so much better!!!  :o

For your info my system is Amdx2 4200+, WinXp sp3, Nvidia 9600gt, 4GB DDR2 Ram
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: EverettWV on 23-11-2010, 03:11:11
I am having problems getting nhancer to run. When ever I start it, all i see is the logo and then it exits. I can see the process running in task manager while the logo is up but disappears when the logo disappears. I have tried running / installing it as "run as administrator" and windows xp compatibility mode. Also tried restarting after each step. Any idea what could be wrong?

My card is a gtx 460, driver version 260.99, operating system windows 7 pro 64bit.

Going from a laptop that could barley play fh2 with everything on low to a computer that handles every thing on high is amazing. I don't know how I ever play on low settings for so long. I just hope I can get the wounded shaders working.

BTW, reading through this thread since you disable aa in game, how do you tell that you have aa in game or that its working?
Title: Re: [Fix] Broken Wounded Shaders on Nvidia with AA enabled
Post by: Maretti on 06-08-2011, 06:08:53
Well, nHancer is pretty much dead about a time right now and the Wounded Shaders bug persists in FH2 2.4.
It's a shame that the software doesn't work anymore. I've tried nVidia Inspector, but without success.

I've got a question for the devs: the Anti-Aliasing bug hits ONLY the wounded shader? Nothing in the mod is lost? Like structures, vehicles, weapons. Textures, Geometries.. anything?
If it is only the wounded stuff (although the effect is pretty nice), guess I shall stick with the 8xAA.


Note: A tutorial about the fix with the Nvidia Inspector would be much appreciated. Noobs like me suffer with those creepy softwares.  ;D