Jump to content

FXAA Post Process Injection


JimmiG

Recommended Posts

Tried this out after seeing a thread at the AVSIM video card forum.

It's basically an alternative to Super Sampling FSAA which is needed in FSX because traditional multi-sample AA isn't effective on autogen trees, fences and other objects that use partially transparent textures. The drawback with SSAA is that it comes with a pretty big performance hit, and it has a tendency to blur cockpit detail and text.

FXAA does not cause this blurring of detail, and is supposed to be faster. You can download the tool from here:

http://www.assembla....ject/documents#

Installation is pretty straight forward - just drop the contents of the DirectX9 folder into your FSX folder (take note of the file names and back up any files before replacing). You should disable all anti-aliasing in FSX, Nvidia Control Panel and Nvidia Inspector (or the equivalent settings if using a Radeon card).

As a bonus, the FXAA injector comes with a set of post-processing effects similar to ENB Series. If you're going to use the post-processing effects, also disable Bloom in FSX. It should also be possible to use it together with ENB Series, if you disable all post-processing (Bloom, Tonemap etc.) in injFX_Settings.h and use the proxy section of the enberies.ini file:

[PROXY]EnableProxyLibrary=1InitProxyFunctions=1ProxyLibrary=your renamed fxaa.dll file

The actual quality of the anti-aliasing is not as good as 8xS, but it does seem faster and the image retains much more sharpness. I've been playing around with the settings, and here are my injFX_Settings.h as of now (they're by no means optimal, just a starting point if you don't like the defaults)

/*======================================================================================     						"USER" ADJUSTABLE SETTINGS======================================================================================*/ // TODO: Normalize values to be on a human range scale, whole numbers prefered, decimals usable for micro adjustments// These values should have min/max limit checks included in their functions, so that the end user doesn't get crazy results /*------------------------------------------------------------------------------                        SHADER SELECTION------------------------------------------------------------------------------*/// To disable / enable effects// 0 = Disable  | 1 = Enable#define USE_ANTI_ALIASING 1#define USE_PRE_SHARPEN 1// HDR NOT COMPLETED!!!#define USE_HDR 0#define USE_BLOOM 1#define USE_TECHNICOLOR 1#define USE_TONEMAP 1#define USE_SEPIA 0#define USE_VIGNETTE 0// For use with Anaglyphic 3D glasses!!!#define USE_ANAGLYPH 0#define USE_POST_SHARPEN 1#define USE_FINAL_LIMITER 0 /*------------------------------------------------------------------------------                        FXAA QUALITY SELECTION------------------------------------------------------------------------------*/// Set from 1 to 9 to balance between performance and quality// Performance [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Quality#define FXAA_QUALITY__PRESET 7 /*------------------------------------------------------------------------------                        FXAA SHADER------------------------------------------------------------------------------*/// Set from 1 to 9 to balance between minimum and maximum amount of anti aliasing blur// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximumfloat fxaaQualitySubpix = 6; // Set from 1 to 9 to balance between performance and strenght, affects AA processing based on contrast// Performance [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Strenghtfloat fxaaQualityEdgeThreshold = 7; // Set from 1 to 9 to balance between performance and strenght, affects AA processing on dark edges// Performance [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Strenghtfloat fxaaQualityEdgeThresholdMin = 7; /*------------------------------------------------------------------------------                        PRE_SHARPEN------------------------------------------------------------------------------*///For higher precision in the calculation of the edge contours, requires a tiny bit more processing power// 0 = Disable  | 1 = Enablebool highQualitySharpen = 1; // Set values to calculate the amount of  bluer produced by AA to consider for the sharpening pass// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximum#define AverageBlur 3#define CoefficientsBlur 3.25 // Set values of the sharpening amounts// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximum#define SharpenEdge 2#define SharpenContour 1 /*------------------------------------------------------------------------------                        BLOOM------------------------------------------------------------------------------*/// Set from 1 to 9 to select a bloom preset// NOTE: Preset value 1 to 9 takes control over the next 3 settings!// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximumfloat BloomPreset = 8; // Set from 1 to 9 to set the min. level at which the effect starts// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximumfloat BloomThreshold = 1;// Set from 1 to 9 to set the width of the effect// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximumfloat BloomWidth = 1;// Set from 1 to 9 to set the power of the effect// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximumfloat BloomPower = 1; /*------------------------------------------------------------------------------                        TECHNICOLOR------------------------------------------------------------------------------*/#define TechniAmount 0.08 // 1.00 = Max#define TechniPower 4.0 // lower values = whitening // lower values = stronger channel#define redNegativeAmount 1.0 // 1.00 = Max#define greenNegativeAmount 1.0 // 1.00 = Max#define blueNegativeAmount 1.0 // 1.00 = Max /*------------------------------------------------------------------------------                        TONEMAP------------------------------------------------------------------------------*/#define Gamma 1.05#define Exposure 0.02#define Saturation 0.00 // use negative values for less saturation.#define BlueShift 0.10 // Higher = more blue in image.#define Bleach 0.04 // Bleach bypass, higher = stronger effect#define Defog 0.000 // Strength of Lens Colors.#define FogColor float4(0.00, 0.00, 0.00, 0.0) //Lens-style color filters for Blue, Red, Yellow, White. /*------------------------------------------------------------------------------                        SEPIA------------------------------------------------------------------------------*/#define Khaki // Color Tone, available tones can be seen in ColorTones.PNG (Do not use spaces in the name!)// Set from 1 to 9 to balance between minimum and maximum amount of above chosen color tone to blend in// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximum#define SepiaPower 1// Set from 1 to 9 to balance between minimum and maximum amount of grey color to blend in// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximum#define GreyPower 1 /*------------------------------------------------------------------------------                        VIGNETTE------------------------------------------------------------------------------*/// Vignette effect, process by which there is loss in clarity towards the corners and sides of the image, like a picture frame#define VignetteCenter float2(0.500, 0.500) // Center of screen for effect.#define VignetteRadius 1.00 // lower values = stronger radial effect from center#define VignetteAmount -0.70 // Strength of black. -2.00 = Max Black, 1.00 = Max White. /*------------------------------------------------------------------------------                        ANAGLYPH------------------------------------------------------------------------------*/// Anaglyph 3D,  Set from 1 to 9 to balance between minimum and maximum seperation// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximum#define AnaglyphSeperation 9 // Anaglyph Colors,  Set from 1 to 9 to balance between minimum and maximum to match the color of your glasses//AnaglyphRed goes to the right, AnaglyphGreen and AnaglyphBlue are mixed to the left// Minimum [ 1 < 2 - 3 - 4 - 5 - 6 - 7 - 8 > 9 ] Maximum#define AnaglyphRed 1#define AnaglyphGreen 1#define AnaglyphBlue 1 /*------------------------------------------------------------------------------                        POST_SHARPEN------------------------------------------------------------------------------*/// Controls additional sharpening applied after previous processing. Strength should be max 0.25!float Sharpen = 0.04; /*------------------------------------------------------------------------------                        FINAL_LIMITER------------------------------------------------------------------------------*/// Controls the strenght of the limiter. 1.000 for default settingint LimiterStrenght = 1.000;
Link to comment
Share on other sites

  • Replies 96
  • Created
  • Last Reply

Coincidentally I have been playing around with this right now

Im using HDE sky textures atm because I seem to have picked up purple.ish skïes which I cant get rid of

Heres some ss and all I have done is drop everything in the main folder untweaked. Visibilty at 30 miles

Thanks Jimmi I"ll try your tweak

Posted Image

Posted Image

Posted Image

Link to comment
Share on other sites

So one might intuitively think that incresing the AA edge settings to 9, and reducing blur setting might improve detail.

Not quite sure this will be equivalent to adequate AA and texture filtering, but it might be a performance compromise.

Not being keen on reinstalling FSX, I shall leave the dabbling to others.

Link to comment
Share on other sites

So I decided to give this a whirl (begging for an excuse to start over with fsx install's lol), and I honestly can't believe the difference on even my system...The sheer amount of performance increase is amazing! At first I noticed that it took a lot less time to load up FSX at any given airport I usually fly out of. Then I decided to go ahead and venture over to my sliders and just test the waters of maxing everything out to see how it would fair. I must say that I am now able to run everything maxed out (not sure if this is suppose to happen or not, but I love it!). I can't believe how much faster my little quad core system seems to load up these scenery textures and actually do a better job at keeping up with what I throw at it.. Thanks for posting this! - I really don't know if this is suppose to be what this dose, but I am thoroughly impressed with what it has done with my overall experience.. I really can't believe it! I'm shocked at how many improvements I'm seeing with this now. I'll try to post some screen shots from what I was seeing to what I'm getting now.

Link to comment
Share on other sites

Tried this out after seeing a thread at the AVSIM video card forum.

It's basically an alternative to Super Sampling FSAA which is needed in FSX because traditional multi-sample AA isn't effective on autogen trees, fences and other objects that use partially transparent textures. The drawback with SSAA is that it comes with a pretty big performance hit, and it has a tendency to blur cockpit detail and text.

Tried it and it's a keeper ! BIG improvement, my wife noticed it while I was flying over Seattle on my 737 ng. A great find indeed. Only drawnack: I had just finsihed my weekly FSX image backup and now I'll have to start over again :-)

Just 1 question: how do I configure things to run antilag (fps limiter) as well, since it ahs its own d3d9.dll?

Tnx

Andrea

Link to comment
Share on other sites

So I decided to give this a whirl (begging for an excuse to start over with fsx install's lol), and I honestly can't believe the difference on even my system...The sheer amount of performance increase is amazing! At first I noticed that it took a lot less time to load up FSX at any given airport I usually fly out of. Then I decided to go ahead and venture over to my sliders and just test the waters of maxing everything out to see how it would fair. I must say that I am now able to run everything maxed out (not sure if this is suppose to happen or not, but I love it!). I can't believe how much faster my little quad core system seems to load up these scenery textures and actually do a better job at keeping up with what I throw at it.. Thanks for posting this! - I really don't know if this is suppose to be what this dose, but I am thoroughly impressed with what it has done with my overall experience.. I really can't believe it! I'm shocked at how many improvements I'm seeing with this now. I'll try to post some screen shots from what I was seeing to what I'm getting now.

Charlie, what about AA? Does it work well? No shimmering trees and fences?

Link to comment
Share on other sites

This is pretty interesting, I'll definitely have to check it out when I get home today. I've been using SSAA since I got the NGX because the cockpit textures (tiny details like labels) are unreadable with MSAA because they aren't anti-aliased. SSAA performance isn't as bad as I thought it would be, as in it doesn't slow FSX to a complete crawl, but I would love more performance so hopefully this will be a nice alternative.

Cheers,

Mike

Link to comment
Share on other sites

Tobobu, I can't really tell exactly what it has done in terms of specific's and all. I just know that I've seen general loading times be cut in half and a decent increase fps in areas I never thought I'd see one in. I don't by any means consider this to be a "wonder-fix" in any sense of the word, but am rather glad I decided to give it a try, now that I'm able to run fsx while having almost all of my sliders to the right (with just leaving auto gen at "very dense"). I find this impressive personally considering my running all of this on my weak little quad-core@ 2.4. For those that may be wondering about what I have done to my cfg: nothing besides the usual "texture max load 4096" and LOD @ 8.50000(not sure if that's all the zero's or not lol). While this may not be "for everyone", I am grateful to have come across this nifty little find.

Link to comment
Share on other sites

Tobobu, I can't really tell exactly what it has done in terms of specific's and all. I just know that I've seen general loading times be cut in half and a decent increase fps in areas I never thought I'd see one in. I don't by any means consider this to be a "wonder-fix" in any sense of the word, but am rather glad I decided to give it a try, now that I'm able to run fsx while having almost all of my sliders to the right (with just leaving auto gen at "very dense"). I find this impressive personally considering my running all of this on my weak little quad-core@ 2.4. For those that may be wondering about what I have done to my cfg: nothing besides the usual "texture max load 4096" and LOD @ 8.50000(not sure if that's all the zero's or not lol). While this may not be "for everyone", I am grateful to have come across this nifty little find.

LOD at 8.5?! Jesus, That would brig my rig to its knees ....

Link to comment
Share on other sites

I did a quick test in the NGX, and while the frame rate did improve slightly the quality isn't anywhere near supersamping. If I got a significant-enough jump in FPS I would use it but the difference isn't big enough to justify the loss of quality. I'll go back to my old settings for the time being. Interesting all the same, and it is better than just multisampling.

Cheers,

Mike

Link to comment
Share on other sites

I tried it with default settings as suggested, and disabled AA in nvidia cp. I may try it again as Wolter did. Charlie P.'s results are intriguing.

BUT, after I removed the files and reset nvidia, I started getting very wierd graphical problems and had to restart and reboot FSX several times. Got it working again, and it could be just a weird coincidence. Is there anything in the d3d.dll that would change or bugger up FSX after it's removed?

Link to comment
Share on other sites

Wolter, you have a serious case of aircraft fickleness!!! :-)

These pics look good. When I tried it yesterday, after disabling AA in nvidia, I noticed that the texture borders (say the edge of snow in the mountains) were very jagged once I got close (basically square shaped, so kind of stair-stepped edges). Have you gotten close to textures with your settings to see how they look? I'm a little reluctant to try it again after the graphical weirdness of yesterday.

Link to comment
Share on other sites

Hi Griphos,

must say that with the settings in nVI, Anisotropic enabled and AA disabled in fsX it works pretty well, still need to do some more testing, but so far it looks quite OK to me.

maybe of influence some settings I've used in fsX:

LOD_radius 7,5

textures 4096

mesh 5m

Water 2x.Mid

AG Very Dense

the rest maxxed out

REX 2+OD and FSWC

Real Weather

FPS limited to 30

Link to comment
Share on other sites

The Clash said "Should I stay or should I go", Tempted to give it a go as Wolter is making great testing progress, or maybe I'll wait, if it's a case of dropping a file into FSX root and tinkering with NV settings then... wait can it really be that simple?

Link to comment
Share on other sites

Well, this is pretty frustrating! I haven't tried it again yet. FSX isn't working anymore. I've tried starting it about a dozen times today, and except for one of those times, it's unplayable with strange graphical problems as soon as it loads, like flickering terrain, no autogen, black sky, no cockpit. Arggghhhh!!!!

This happened as soon as I took the FXAA files out of the root folder yesterday, but after a couple of restarts, it went away. Today it's back. This hasn't ever happened before.

I tried re-installing my nvidia drivers. No joy. MAN! I REALLY don't want to reinstall everything. With the number of addons I have, that's a multi-day task!

Be very careful about using this stuff!

Link to comment
Share on other sites

No, I compared my current config to backup configs from before I installed FXAA. There were no changes made. That's not the problem. But I think I'm on to something. If I change the aircraft from the one I have saved as default, it doesn't seem to happen. If I just change the airport, it does. I think I'll delete my default flight and test some more.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...