cRPG
cRPG => General Discussion => Topic started by: Delusianne on August 01, 2011, 05:37:59 pm
-
Heya folks,
I posted this over at the steam forums, also being part of of the below mentioned thread (all props to "some dude" who came up with this solution, and also BeetleatWar1977 working on direct shader implementation in general and last but not least Timothy Lottes at Nvidia for giving us FXAA in the first place, I was merely pushing and analyzing on topic, cross referencing known stuff and issues to gain the needed attention and get the real smart folks together to get it going) and just thought this might be nice for a lot of ppl especially if you already suffer from performance issues with warband (or at least running cRPG) and maybe also in other games but still would like to use some form of AA. So here it goes:
just wanted to let you know about this awesome stuff, keep in mind tho it might cause troubles in Steam/VAC/ punkbuster/ GFWL anti cheat enabled Games (as false positives, so could in that case get one banned or even make your babies cry), so maybe stay away from those for now (not the babies tho).
Confirmed to work in a lot of DX9 and now even in some DX10/ 11 games.
You have no idea what this actually does? read this:
Performance/ Quality trade off is quite good (especially compared to more traditional power hungry antialiasing methods (http://en.wikipedia.org/wiki/Spatial_anti-aliasing) moreso on systems which can't handle those very well without performance issues). If you come across any issues/ bugs, please report them in this thread as detailed as possible (so post your system specs, a description of the issue and upload some screenhots).
Hi, I'm some dude and just wanted to see how fxaa looks on my notebook. But oh noes, I have only two old games and both use d3d9.
So instead of complaining I wrote some code and play those games with fxaa
now. It's faster than with the aa provided by the games.
@some dude
thx for providing your work on fxaa injection, basically we were (well it's really all User BeetleatWar1977, props to him) trying to figure out how to make it work with games based on an UE3 Engine for starters (partly because of the freely accessible shaders, I brought up the topic because I had noticed some time ago that really most compatibility AA bit modes remove/ disable some ingame effects/ shaders so if FXAA would be useable that wouldn't be an issue anymore and maybe combined with higher res downsampling be almost as "perfect" as it could get).
While I lack the background to do much with it (shader code/ing), it's good some ppl do know a thing or two about it but it also seems to need ppl asking the right questions and/ or getting some attention of those who can actually figure this out, really took me by surprise this potential seemed largely undiscovered/ gone unnoticed, not just on the topic of FXAA but shaders tweaking in general, with so many enthusiast and talented game modders/ devs around. That's kinda my part so far, pushing for it and asking questions for some really smart ppl to figure it out. A few pages back I posted what Timothy Lottes from Nvidia answered to a quick question about FXAA injection, while he kept it short he described a quick and dirty implementation. Not sure if it might be of any use to you as you and BeetleatWar1977 might have already surpassed this from the looks of it but it'd be cool if you'd stay around!
Timothy Lottes said...
"might be possible to quickly prototype FXAA in a GL or DX11 game which provides editable shaders. You would need to find a late-in the-frame post processing shader which samples each pixel once, then run FXAA to "sample the pixel" with FXAA_GREEN_AS_LUMA and use in-pixel-shader texture size queries to produce the required inputs to FXAA (so DX9 is likely out). This would NOT be the correct way to integrate FXAA, but might work."
----- http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8869098#post8869098
While this is a German forum (all is also explained in english) english speaking guests are greatly welcome (no registration necessary to post on this part of the forums).
Give it a try it's really sweet.
But please keep this in mind besides the fact that it is work in progress on a lot of ends:
Without FXAA's Pixel and Sub-Pixel Contrast Reduction, visually aliasing still remains. With FXAA, aliasing is much reduced and consistent across image features. No post-process AA filter is going to fix everything, there is always a compromise between sharpness and lack of aliasing, but I feel as if FXAA does a good job and has a great quality/cost ratio.
Certainly some developers and users will have different preferences on the aliasing vs softness trade-off. For this FXAA 3.9 Quality algorithm has a tuning knob: FXAA_QUALITY__SUBPIX. The "No Contrast Reduction" images were produced by zeroing this tuning knob.
-----
04 August 2011 - Beta 8 of the hook:
[some dude] Minor changes in d3d9 mode, no changes in d3d10 (due to no bugreports with small demos and my lack of d3d11 hardware). Additionally I gave Anarki_Hunter's suggestion some attention. Beta 7 gives you the possibility to add a sharpening pass [you don't have to bother with this at all for now- delu] in DirectX 9 prior to fxaa execution. The readme contains how.
[some dude]
Sorry guys, I tried to consider all the different game engines I encountered so far and sometimes a new version creates and breaks compatibilities at the same time. [talking about the 1 pack for 3 renderpath hook approach for lots of games]
However, I think to have found a good solution for the "darkness" problem which also fixes Crysis 1 -dx9 (Thanks Ronny145). From how I expect GTA4's engine to work, it also may fix the lights.
http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8869098#post8869098
Don't expect much from the sharpening pass. I just took some random sharpen shader and did not tune any parameters. You can experiment with own sharpening shaders if you can work with hlsl. Let me know if there is a good one.
beta version 8 notes
beta version 8! directx 9, directx 10, directx 11, x86 binaries only! may be incompatible with any other form of antialiasing! can be combined with downsampling!
Install:
If the game uses DirectX 9, put all files from the d3d9 directory into the directory containing the game executable.
If the game uses DirectX 10/11, put all files from the d3d10 directory into the directory containing the game executable.
Uninstall: Remove the files.
Notes:
Do not mix d3d9 and d3d10 the files.
Install the latest DirectX runtime.
A "log.log" file is created to log behaviour/ bugs.
If the "log.log" file is not created then you use the wrong "*.dll" or you put it into the wrong directory.
If the "log.log" is created but the game crashes or FXAA is disabled, look where the "log.log" is created. Usually the shader files go into that particular directory.
Try to put the files into different directories before saying it doesn't work.
In some games (e.g. Portal 1 or Halo 1) refuse to accept the alpha channel. A general workaround (lower quality) for those is to add the following line at the beginning of shader.fx :
#define FXAA_GREEN_AS_LUMA 1
There is a way to experiment with sharpening. I added an example. To activate additional sharpening filter change edit the line "//Replace this line with #include "Sharpen.h" to add a sharpening pass" in shader.fx.
Note that right now sharpening is only an example that it can be done. I more-or-less copypasted a random sharpen filter to show how my mod can be modded.
Keys:
Insert : Enable/Disable FXAA
Del : Screenshot
-
Hmm, thanks for posting, I'll try this out.
-
Gojng to see if this works.
-
I tested it, but only at native.
It has a slight AA effect on my game, but it's worth it for me, for the extra FPS.
Is there a way to enhance the effect a bit more though? I'm kinda satisfied with it right now, just curious.
-
Hey glad it is helping. Well there is lots of stuff you can tweak but most would require you to really look closer into the shader file, but it's well explained/ commented inside, if that one seemed a bit too toned down to you and you don't want to edit the settings manually you can test his beta 2 with the additional updated shader file he provided a few post later (based on feedback he toned it down).
http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8862388#post8862388 beta2 (outdated, but may be usefull for quick tests as mentioned above; but only use combined with the file from the link below)
http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8862432#post8862432
-
Hey glad it is helping. Well there is lots of stuff you can tweak but most would require you to really look closer into the shader file, but it's well explained/ commented inside, if that one seemed a bit too toned down to you and you don't want to edit the settings manually you can test his beta 2 with the additional updated shader file he provided a few post later (based on feedback he toned it down).
Oh. Well I'm happy with this effect, I can run the game without 4XAA and it doesn't look like total garbage. 8-)
-
Some comparison screenshots in 1920x1080 resolution beta3 (only AA disabled and FXAAhook). :wink:
http://www.abload.de/gallery.php?key=84RiiTWU
visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot91078jsm.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot933758xi.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot108257873.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot11045cjly.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot128133kzo.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot13350yjqq.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot143681kvu.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot14668yk8z.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot16315v8jh.png) visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot16679ok65.png)
-
ME2 in 1920x1080 resolution
visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot20027c5fu.png)
AA disabled
visitors can't see pics , please register or login
(http://www.abload.de/image.php?img=screenshot198147w8r.png)
FXAA_hook_beta3
-
Feedback anyone else? If you like and plan to use this, feedback helps to get it even further and make it better.
If not u can't expect as much or it even could die out quickly (if it's dev loses interest due lack of feedback or get's the impression no one's interested).
So plz don't just sit in the dark and hope this keeps going all by itself.
-
Looked nice, but unfortunately while my fps was nearly untouched by enabling it, I started getting some "jitters" on a few maps which made it unusable.
-
Looked nice, but unfortunately while my fps was nearly untouched by enabling it, I started getting some "jitters" on a few maps which made it unusable.
What are your system specs?
-
Don't trust--probably witchcraft.
-
Looks great but the potential issues with anti-cheat programs are what keeps me away from it.
Otherwise would love to use it really, the edges looks MUCH better.
-
Looked nice, but unfortunately while my fps was nearly untouched by enabling it, I started getting some "jitters" on a few maps which made it unusable.
Just noticed this too after some more testing, maybe it's related to vsync or well playing without vsync, not sure really. Gonna try a few things but also already reported it.
Looks great but the potential issues with anti-cheat programs are what keeps me away from it.
Yep understandable, but as mentioned before if you don't play on a Warband server with VAC enabled (there don't really seem to be many if any at all) it should be safe to use.
-
Warband dosnt support VAC.
-
It does, although sloppily. I don't know of any cRPG server that runs it.
-
It does, although sloppily. I don't know of any cRPG server that runs it.
Yep. As mentioned maybe because of the not exactly easily controllable enviroment with all it's mods (might be prone to false positives).
Fourth beta has been released btw, so far only tested it on smaller cRPG maps and couldn't notice any jitters:
http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8865493#post8865493
-
Beta 5, now with even more awesome, namely,... wait for it,... DX10 support
so far confirmed to work in Bioshock 1 and Unigine Heaven 2.5 DX10. How cool is that!
He also fixed some DX9 stuff, so give it a try.
http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8866336#post8866336
-
Impressive. Good job!
Too bad i'm an fps whore that played doom and quake 2 too much, back in the day. So i'm used to pixels and jagged edges. I like em.
And i'm a complete 'framerate hypochondriac'. I want, nay, i need to know i have a stable 120+ fps. :wink:
-
Hehe I prefectly understand, back in the old days I was playing Quake 3 like crazy competitive, I specially tweaked it to look like shite to get more frames out of it, nowadays this borders on cheating in modern titles with scripts and shader stuff (not this tho) and I lost interest and now just play for fun and epic battles ;D
But you might want to take a look anyway, cause depending on your hardware in some cases it has almost zero performance impact and might just be in a 3-5 fps range.
-
I'll be keeping an eye on this thread. Thanks for the heads up, Delusianne!
-
Just tried the dx9 version with warband and crpg. It rocks! It looks great and seems to have no impact on performance. No problems with steam either. Thanks for sharing!
-
Heya glad u find it usefull. Personally, besides warband,... just in Bioshock 1 and ME2 alone for me it's really,.. just priceless awesome.
The last few days I mentioned this neat hook ingame, while we know the chat is a bloody minefield most of the time, it's especially bad when some kids run amok when no Admin is on, anyway,..
I got a few "dude I didn't see any difference, it's useless", well there is no way to say this nicely but in that case someone is either blind, did place the files in the wrong folder or pressed the wrong key for activation thus not actually activating anything (laptops often have less key and thus some fuctions are double assigned to one key with a different key to switch between both, so this could have been one potential issue on the user end). So if it ain't working please read this thread more carefully before giving it up, otherwise it's your loss really.
Ok so here are some updates:
Some more feedback on these bugs: http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8866916#post8866916 (http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8866916#post8866916) [solved]
Can confirm [apparently some remained and just now got fixed with beta 8] solves the darkening problem [of a few Unreal 3 Engine Games]. Thanks for your effort and please relay my thanks to the developer. I'll keep using it to see if any other issues arise. Thanks again.
info on how to get certain games to work with it at the bottom of this post.
Beta 6, 7 and 8 have been released, since 6 there even is experimental DX11 support:
[some dude]
Minor changes in d3d9 mode, no changes in d3d10 (due to no bugreports with small demos and my lack of d3d11 hardware).
Additionally I gave Anarki_Hunter's suggestion some attention.
Beta 7 gives you the possibility to add a sharpening pass [you don't have to bother with this at all for now- delu] in DirectX 9 prior to fxaa execution.
The readme contains how.
[some dude][beta8]
Sorry guys, I tried to consider all the different game engines I encountered so far and sometimes a new version creates and breaks compatibilities at the same time. [talking about the 1 pack for 3 renderpath hook approach for lots of games]
However, I think to have found a good solution for the "darkness" problem which also fixes Crysis 1 -dx9 (Thanks Ronny145). From how I expect GTA4's engine to work, it also may fix the lights.
http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8869098#post8869098 (http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8869098#post8869098)
Don't expect much from the sharpening pass. I just took some random sharpen shader and did not tune any parameters. You can experiment with own sharpening shaders if you can work with hlsl. Let me know if there is a good one.
beta version 8 notes
beta version 8! directx 9, directx 10, directx 11, x86 binaries only! may be incompatible with any other form of antialiasing! can be combined with downsampling!
Install:
If the game uses DirectX 9, put all files from the d3d9 directory into the directory containing the game executable.
If the game uses DirectX 10/11, put all files from the d3d10 directory into the directory containing the game executable.
Uninstall: Remove the files.
Notes:
Do not mix d3d9 and d3d10 the files.
Install the latest DirectX runtime.
A "log.log" file is created to log behaviour/ bugs.
If the "log.log" file is not created then you use the wrong "*.dll" or you put it into the wrong directory.
If the "log.log" is created but the game crashes or FXAA is disabled, look where the "log.log" is created. Usually the shader files go into that particular directory.
Try to put the files into different directories before saying it doesn't work.
In some games (e.g. Portal 1 or Halo 1) refuse to accept the alpha channel. A general workaround (lower quality) for those is to add the following line at the beginning of shader.fx :
#define FXAA_GREEN_AS_LUMA 1
There is a way to experiment with sharpening. I added an example. To activate additional sharpening filter change edit the line "//Replace this line with #include "Sharpen.h" to add a sharpening pass" in shader.fx.
Note that right now sharpening is only an example that it can be done. I more-or-less copypasted a random sharpen filter to show how my mod can be modded.
Keys:
Insert : Enable/Disable FXAA
Del : Screenshot
-
I have a problem, when i use DX10 or DX11 my resolusion gets raped and is forced into a 1280x720, this happens with every game that dosnt run in DX9.I have a 5970 though so i dunno wats the problem.
-
I have a problem, when i use DX10 or DX11 my resolusion gets raped and is forced into a 1280x720, this happens with every game that dosnt run in DX9.I have a 5970 though so i dunno wats the problem.
Odd one indeed, not sure what's going on either, reported it and we'll see if someone else is having this. Try to make sure you don't use it combined with other (forced through the driver, or ingame enabled) Antialiasing (AA) methods and are not using anything else "forced" through the drivers control panel.