PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Alles rund um FXAA


Seiten : 1 2 [3] 4 5

Superheld
2011-08-08, 13:05:20
Afaik ist MSAA inkompatibel zu FXAA. Also entweder oder...

..also funztes nicht zusammen, ist ja schice:(

Ronny145
2011-08-08, 13:07:33
..also funztes nicht zusammen, ist ja schice:(


Kommt aufs Spiel an. Shift geht nicht mit MSAA und FXAA zusammen, Dirt 2 und Metro dagegen schon.

dargo
2011-08-08, 13:08:22
..also funztes nicht zusammen, ist ja schice:(
Liest eigentlich irgendeiner die Readme von dude? :freak:
beta version 9! directx 9, directx 10, directx 11, x86 binaries only! may be incompatible with any other form of antialiasing! can be combined with downsampling!

Edit:
Ok... er schreibt möglicherweise.

BeetleatWar1977
2011-08-08, 13:12:57
Hangt davon ab ob das Bild im Framebuffer bereits geglättet ist, nehme ich mal stark an. Wenn ich FXAA in ein Spiel direkt einbaue (z.B. Shift) funktionert es zwar, wird aber MSAA eingeschaltet gibts Abtastartefakte ohne ende.
http://www.abload.de/img/zwischenablage028fv8.jpg

Superheld
2011-08-08, 13:13:33
Liest eigentlich irgendeiner die Readme von dude? :freak:


achja habse gefunden:biggrin:

dargo
2011-08-08, 13:19:55
achja habse gefunden:biggrin:
Sehr schön. ;)

@Beetle
Meinst du dagegen kann man was tun?
do not use this tool while playing on anti cheat enabled servers (may be detected as a cheating measure)!
Es wäre echt blöd wenn man auf FXAA im MP verzichten müsste. ;(

Gast
2011-08-08, 13:23:11
[some dude]
@Ronny145: Here is how sharpen can be used in d3d10 mode:
Content of shader.hlsl:

#define FXAA_PC 1
#define FXAA_HLSL_4 1
#define FXAA_QUALITY__PRESET 39
//#define FXAA_QUALITY__PRESET 12

#include "Fxaa3_11.h"

Texture2D gScreenTexture : register( t0 );
Texture2D gLumaTexture : register( t1 );
SamplerState screenSampler : register( s0 );

//Difinitions: BUFFER_WIDTH, BUFFER_HEIGHT, BUFFER_RCP_WIDTH, BUFFER_RCP_HEIGHT

struct PS_INPUT
{
float2 vTexcoord : TEXCOORD0;
};
struct VS_Output
{
float4 Pos : SV_POSITION;
float2 Tex : TEXCOORD0;
};
struct VS_Input
{
float4 Pos : POSITION;
float2 Tex : TEXCOORD0;
};

VS_Output VSMain( VS_Input Input )
{
VS_Output Output;
Output.Pos = Input.Pos;
Output.Tex = Input.Tex;
return Output;
}

#include "Sharpen.h"

float4 LumaShader( VS_Output Input ) : SV_TARGET
{
#ifdef USE_ADDITIONAL_SHADER
float4 c0 = main(Input.Tex);
#else
float4 c0 = gScreenTexture.SampleLevel( screenSampler, Input.Tex, 0 );
#endif
c0.w = dot(c0.xyz,float3(0.299, 0.587, 0.114)); //store luma in alpha
//c0.w = sqrt(dot(c0.xyz,float3(0.299, 0.587, 0.114))); //store luma in alpha
return c0;
}
float4 MyShader( VS_Output Input ) : SV_TARGET
{
FxaaTex t = { screenSampler, gLumaTexture };
float4 c0 = FxaaPixelShader(
Input.Tex, //pos
0, //fxaaConsolePosPos (?)
t, //tex
t, //fxaaConsole360TexExpBiasNegOne
t, //fxaaConsole360TexExpBiasNegTwo
float2(BUFFER_RCP_WIDTH, BUFFER_RCP_HEIGHT), //fxaaQualityRcpFrame
float4(-0.5*BUFFER_RCP_WIDTH,-0.5*BUFFER_RCP_HEIGHT,0.5*BUFFER_RCP_WIDTH,0.5*BUFFER_RCP_HEIGHT), //fxaaConsoleRcpFrameOpt
float4(-2.0*BUFFER_RCP_WIDTH,-2.0*BUFFER_RCP_HEIGHT,2.0*BUFFER_RCP_WIDTH,2.0*BUFFER_RCP_HEIGHT), //fxaaConsoleRcpFrameOpt2
float4(8.0*BUFFER_RCP_WIDTH,8.0*BUFFER_RCP_HEIGHT,-4.0*BUFFER_RCP_WIDTH,-4.0*BUFFER_RCP_HEIGHT), //fxaaConsole360RcpFrameOpt2
0.50, //fxaaQualitySubpix (default: 0.75)
0.166, //fxaaQualityEdgeThreshold
0.0833, //fxaaQualityEdgeThresholdMin
8.0, //fxaaConsoleEdgeSharpness
0.125, //fxaaConsoleEdgeThreshold
0.05, //fxaaConsoleEdgeThresholdMin
0 //fxaaConsole360ConstDir
);
c0.w = 1;
return c0;
}

Content of Sharpen.h:
#define USE_ADDITIONAL_SHADER 1
//myTex2D: use it instead of tex2D to sample the original screen
#define myTex2D(s, p) gScreenTexture.SampleLevel( s, p, 0 )
//My redefinitions
#define s0 screenSampler
#define width BUFFER_WIDTH
#define height BUFFER_HEIGHT
#define px BUFFER_RCP_WIDTH
#define py BUFFER_RCP_HEIGHT

/* Modified Sharpen complex v2 from Media Player Classic Home Cinema */
/* Parameters */

// pour le calcul du flou
#define moyenne 0.6
#define dx (moyenne*px)
#define dy (moyenne*py)

#define CoefFlou 2
#define CoefOri (1+ CoefFlou)

// pour le sharpen
#define SharpenEdge 0.2
#define Sharpen_val0 2
#define Sharpen_val1 ((Sharpen_val0-1) / 8.0)

float4 main( float2 tex ) {

// recup du pixel original
float4 ori = myTex2D(s0, tex);

// calcul image floue (filtre gaussien)
float4 c1 = myTex2D(s0, tex + float2(-dx,-dy));
float4 c2 = myTex2D(s0, tex + float2(0,-dy));
float4 c3 = myTex2D(s0, tex + float2(dx,-dy));
float4 c4 = myTex2D(s0, tex + float2(-dx,0));
float4 c5 = myTex2D(s0, tex + float2(dx,0));
float4 c6 = myTex2D(s0, tex + float2(-dx,dy));
float4 c7 = myTex2D(s0, tex + float2(0,dy));
float4 c8 = myTex2D(s0, tex + float2(dx,dy));

// filtre gaussien
// [ 1, 2 , 1 ]
// [ 2, 4 , 2 ]
// [ 1, 2 , 1 ]
// pour normaliser les valeurs, il faut diviser par la somme des coef
// 1 / (1+2+1+2+4+2+1+2+1) = 1 / 16 = .0625
float4 flou = (c1+c3+c6+c8 + 2*(c2+c4+c5+c7)+ 4*ori)*0.0625;

// soustraction de l'image flou à l'image originale
float4 cori = CoefOri*ori - CoefFlou*flou;

// détection des contours
// récuppération des 9 voisins
// [ c1, c2 , c3 ]
// [ c4,ori , c5 ]
// [ c6, c7 , c8 ]
c1 = myTex2D(s0, tex + float2(-px,-py));
c2 = myTex2D(s0, tex + float2(0,-py));
c3 = myTex2D(s0, tex + float2(px,-py));
c4 = myTex2D(s0, tex + float2(-px,0));
c5 = myTex2D(s0, tex + float2(px,0));
c6 = myTex2D(s0, tex + float2(-px,py));
c7 = myTex2D(s0, tex + float2(0,py));
c8 = myTex2D(s0, tex + float2(px,py));

// par filtre de sobel
// Gradient horizontal
// [ -1, 0 ,1 ]
// [ -2, 0, 2 ]
// [ -1, 0 ,1 ]
float delta1 = (c3 + 2*c5 + c8)-(c1 + 2*c4 + c6);

// Gradient vertical
// [ -1,- 2,-1 ]
// [ 0, 0, 0 ]
// [ 1, 2, 1 ]
float delta2 = (c6 + 2*c7 + c8)-(c1 + 2*c2 + c3);

// calcul
if (sqrt( mul(delta1,delta1) + mul(delta2,delta2)) > SharpenEdge) {
// si contour, sharpen
//return float4(1,0,0,0);
return ori*Sharpen_val0 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 ) * Sharpen_val1;
} else {
// sinon, image corrigée
return cori;
}
}

Superheld
2011-08-08, 13:34:16
@dargo
bei Crysis funzt beides zusammen;)
, nochmal genauer hingesehen, r_useedgeaa = 0

no FXAA/MSAA
http://www.abload.de/thumb/noaafxaaikaz.jpg (http://www.abload.de/img/noaafxaaikaz.jpg)

only FXAA
http://www.abload.de/thumb/fxaaveap.jpg (http://www.abload.de/img/fxaaveap.jpg)

FXAA + 4xMSAA
http://www.abload.de/thumb/fxaamsaased4.jpg (http://www.abload.de/img/fxaamsaased4.jpg)

die Bäume sind immer noch geglättet..

dargo@work
2011-08-08, 15:07:05
@dargo
bei Crysis funzt beides zusammen;)
, nochmal genauer hingesehen, r_useedgeaa = 0

no FXAA/MSAA
http://www.abload.de/thumb/noaafxaaikaz.jpg (http://www.abload.de/img/noaafxaaikaz.jpg)

only FXAA
http://www.abload.de/thumb/fxaaveap.jpg (http://www.abload.de/img/fxaaveap.jpg)

FXAA + 4xMSAA
http://www.abload.de/thumb/fxaamsaased4.jpg (http://www.abload.de/img/fxaamsaased4.jpg)

die Bäume sind immer noch geglättet..
Ist doch schön. :-) Das Problem bei Crysis ist, dass MSAA extrem teuer ist. Sieht man bei dir nicht weil deine Szene scheinbar im starken CPU-Limit liegt. Außerdem sieht mir die Qualität von only FXAA bei deinem Screen ziemlich schlecht aus. Welche Version war das? Falls noch nicht geschehen versuche mal die von beetle.

Superheld
2011-08-08, 15:31:11
Ist doch schön. :-) Das Problem bei Crysis ist, dass MSAA extrem teuer ist. Sieht man bei dir nicht weil deine Szene scheinbar im starken CPU-Limit liegt. Außerdem sieht mir die Qualität von only FXAA bei deinem Screen ziemlich schlecht aus. Welche Version war das? Falls noch nicht geschehen versuche mal die von beetle.

das war injectFxaa_by_some_dude_9.


hab die InjectFXXAA Beta9 + PP V3 with Sharpening von Beetle auch gezogen und Dateien ersetzt, da ist aber nur ne d3d9.dll drin, damit startet Crysis nicht in dx9 .

_/VeRtigo
2011-08-08, 15:35:47
@some dude: could you possibly make an OpenGl version? I know it's already possible on nvidia cards but I own an ATI and want to use FXAA on RIDDICK Dark Athena + SSAO ;) .

@Ronny: Welche Artefakte sind dir denn aufgefallen in Mafia 2? Werde auch mal den Luma Sting verwenden und suche nach unterschieden.

@Mod: Danke fürs aufräumen ^^.

Banshee18
2011-08-08, 15:36:00
Könnt ihr den Gast, bei dem es sich sowieso um einen -wie man hier sieht zu Recht- gesperrten User handelt, nicht einfach ignorieren?

BeetleatWar1977
2011-08-08, 15:52:38
das war injectFxaa_by_some_dude_9.


hab die InjectFXXAA Beta9 + PP V3 with Sharpening von Beetle auch gezogen und Dateien ersetzt, da ist aber nur ne d3d9.dll drin, damit startet Crysis nicht in dx9 .
Ich bin über DX10 - sollte heute abend fertig werden.


@Banshee18:
Danke und Sorry - ich bin mom. irgendwie eine Dynamitstange mit brennender Lunte

dargo@work
2011-08-08, 16:06:01
@Banshee18:
Danke und Sorry - ich bin mom. irgendwie eine Dynamitstange mit brennender Lunte
Dito.^^

@Banshee18
Auch von mir vielen Dank fürs Putzen.

@Superheld
Versuche C1 einfach unter DX9. Mit DX10 sieht das bei dir imo ohne AF beim POM eh mies aus.

BeetleatWar1977
2011-08-08, 16:24:04
das war injectFxaa_by_some_dude_9.


hab die InjectFXXAA Beta9 + PP V3 with Sharpening von Beetle auch gezogen und Dateien ersetzt, da ist aber nur ne d3d9.dll drin, damit startet Crysis nicht in dx9 .
Bitteschön - das einzige was nicht geht ist der Limiter.

DLL hab ich jetzt nicht nochmal extra beigelegt


Download gelöscht - File fehlt

Gast
2011-08-08, 17:24:04
Alright news from Blizzard on use of the FXAA inject/ hook in World of Warcraft:

Well at least they got back to me but it hardly sounds as if the guy did understand completly, so not sure if you can use this as "hell yeah Blizzard said I can use this", in any case it doesn't really matter so far, you don't have to try, as I did and like a guest reported earlier it "doesn't seem to work" in World Of Wacraft (WoW) maybe a shader folder would be somewhere in said "data.MPQ" but as we know they wouldn't want anyone to mess with that. Also the log file of the hook says:

redirecting CreateDXGIFactory1
redirecting IDXGIFactory1->CreateSwapChain
pDevice->CreateDeferredContext failed [what exactly does this mean and why is this?]

I know [some dude] said it means it can't work and he can't do nothing about it, but what does that log entry actually mean? Really no way around it [some dude]? ;(
I wouldn't hesitate to use it on WoW, since it in no way alters the original game files, all it does is adding some additional passes to the rendering, which doesn't happen on your file system.
The Blizzard employee that answered back to you is just quite doesn't understand it.

Superheld
2011-08-08, 17:32:17
Bitteschön - das einzige was nicht geht ist der Limiter.

DLL hab ich jetzt nicht nochmal extra beigelegt

also die dlls tun sich nicht verändern ? hauptsache man nimmmt die richtige für dx9/10 ?

na jedenfalls startet Crysis mit dein Dateien nicht mehr, dx9 und dx10 getestet:confused:

mal andere Spiele angucken..

BeetleatWar1977
2011-08-08, 17:45:47
also bei mir läufts mit Crysis in DX10

brauchst aber unbedingt alle 3 4 Dateien.

Wenn poste mal das logfile

Äh, damnit, File vergessen sekunde!


So ists besser.


Edit: du musst mit den Files die für DX10 nehmen

Crux
2011-08-08, 17:58:50
I wouldn't hesitate to use it on WoW, since it in no way alters the original game files, all it does is adding some additional passes to the rendering, which doesn't happen on your file system.
The Blizzard employee that answered back to you is just quite doesn't understand it.

Yeah I got that, it doesn't matter anyway because the hook is not working in World of Warcraft, which is a shame really as at least on my system normal MSAA has issues since Cataclysm came out, so I can't use any AA at all (also Ambient Occlusion is basically unusable as well, Nvidia would have to update/ change their compatibility bits as apparently these haven't been adjusted/ adapted to changes in WoW's Engine).

Also it wouldn't be safe in general, (and ppl might want to think twice before risking a ban on a long standing account) while it doesn't alter game files on a deeper lvl it does "inject" use of one additional .dll (if it would actually work in this case) and cheat injects/ hooks can do this as well so that might be detected as a false positive (even tho at closer inspection it would be obvious it just adds an FXAA antialiasing shader and is not a cheat). Also it could be possible they define something like this in their TOS as a general "don't" no matter if it's a cheat or not).

Gast
2011-08-08, 18:00:32
[dkt70]

BeetleatWar1977, and some_dude, Both of you are doing some top work, many thanks.

Beetle, I have been unable to get any bloom to work in gtaiv, like racerx, it just brightens the image a tiny bit at any setting. I am not too worried since I will stick to using GTAIV's own bloom, especially since it is controllable and can be switched off at any time via the timecyc.dat.

@ some_dude, any chance of allowing a sub-directory for the pics to go in ?
perhaps \pics or \injectpics ? It's just that the root folder of the game can fill up pretty quick with PNG images.

racerX
2011-08-08, 18:10:11
nice idea about folder for pics DKT70 :)

i using a folder for Shaders too, keeping a cleaner root folder

and with a config.ini we can set what folder we wanna for pics :D

Superheld
2011-08-08, 18:11:05
@Beetle

geht jetzt, das Bild wird jetzt aber schärfer usw..aber ist auch egal, die Version von Dude hat ja gefunzt:)

..ja OK, wolltse aber schön glatt wie ein Baby Popo=)

BeetleatWar1977
2011-08-08, 18:16:21
@Beetle

geht jetzt, das Bild wird jetzt aber schärfer usw..aber ist auch egal, die Version von Dude hat ja gefunzt:)
naja -was halt eingestellt wird ;)

Crux
2011-08-08, 18:16:24
[some dude]
@Crux: The line "pDevice->CreateDeferredContext failed" means that the game while using a DirectX 11 rendering path (with a DirectX 10/11 device feature level) it disables one of its core features (CreateDeferredContext). The funny thing is - in our multicore era it optimizes the engine for single threaded use. Additionally Microsoft removed StateBlocks from DirectX 11 (which are used in DirectX 9/10 rendering paths) and I need one of those features.

@[some dude] Thx for the additional informations on that!
But isn't say "Steam" basically injecting it's interface/ overlay as well somehow, to work on top of games, it also works in DX10/11 so isn't there any alternate way/ route doing this?

http://msdn.microsoft.com/en-us/library/ff476505%28v=vs.85%29.aspx ?

Ronny145
2011-08-08, 18:19:51
also bei mir läufts mit Crysis in DX10

brauchst aber unbedingt alle 3 4 Dateien.

Wenn poste mal das logfile

Äh, damnit, File vergessen sekunde!


So ists besser.


Edit: du musst mit den Files die für DX10 nehmen


Einfach nur viel zu scharf, da habe ich noch mehr Aliasing an den Palmen als komplett ohne der Mod. Das kann nicht Sinn der Sache sein.


@Ronny: Welche Artefakte sind dir denn aufgefallen in Mafia 2? Werde auch mal den Luma Sting verwenden und suche nach unterschieden.



Ich hatte Bilder verlinkt.

Crux
2011-08-08, 18:23:34
Könnt ihr den Gast, bei dem es sich sowieso um einen -wie man hier sieht zu Recht- gesperrten User handelt, nicht einfach ignorieren?

Hab ja selbst Jahre als Gast hier gepostet und hätte nicht gedacht das ich das mal sage aber der Gast, ohne zu wissen welcher User es ist, nervt wirklich und wirft ein schlechtes Licht auf Gäste an sich (siehe Dargos post), dabei ist es dann ja wohl ein ehemaliger User (sicher kein Einzelfall nach emotionalen Streitereien oder persönlichem angefeinde) aber gerade dieser Thread hat gezeigt was Gäste hier im positiven für die Spiele/tweaking- Gemeinde bewegen können. Also auch an die Mods und Mit-regs, sowas bitte nicht vergessen und voreilig alle Gäste über einen Kamm scheren! :ucoffee:

Nicht zuletzt dürfte dem Forenbetreiber das ja auch gelegen kommen, also die internationale Aufmerksamkeit, wenn auch viele nen adblocker nutzen, ein wenig dürfte das doch helfen bei 30.183 Hits oder? :uponder:

Crux
2011-08-08, 21:35:11
Just noticed these: http://www.youtube.com/watch?v=ehF3gSGWVJk
http://www.youtube.com/watch?v=y_CLdGFrjOM
http://youtu.be/V_lLTG8iwR4

so apparently EBN works in WoW, so there must be some way to hook/ inject. :confused:

Gast
2011-08-08, 21:58:02
Also it wouldn't be safe in general, (and ppl might want to think twice before risking a ban on a long standing account) while it doesn't alter game files on a deeper lvl it does "inject" use of one additional .dll (if it would actually work in this case) and cheat injects/ hooks can do this as well so that might be detected as a false positive (even tho at closer inspection it would be obvious it just adds an FXAA antialiasing shader and is not a cheat). Also it could be possible they define something like this in their TOS as a general "don't" no matter if it's a cheat or not).
The same can be said for LUA addons, there are a few which would be considered to be against the EULA.
I don't understand how MMAA isn't working for you thou, I had no problems having it working on 5870, GTX260 and GTX460, didn't try with my current GTX580 thou.

Gast
2011-08-08, 22:18:23
I have stumbled into a little problem. The tonemapping-pass can push the colorvalues beyond 1.0 - which lead to unexpected results. Im on it.
I did some tests with only pre sharpen and bloom, it still can go wrong if the value is set to low OR to high.
So I looked a bit around and tested some things out.
Could you please test this edited Dx9 version out?
http://www13.zippyshare.com/v/36950352/file.html

Violator
2011-08-08, 22:21:46
I did some tests with only pre sharpen and bloom, it still can go wrong if the value is set to low OR to high.
So I looked a bit around and tested some things out.
Could you please test this edited Dx9 version out?
http://www13.zippyshare.com/v/36950352/file.html
I think I exceeded the time allowed to be afk on 3D Center :biggrin:
So had it posted as "Gast" instead.

_/VeRtigo
2011-08-08, 22:29:31
@Ronny145: Habs gefunden, hatte aber selber keine solchen Artefakte.

@Beetle: Nice, funkt alles mit deiner neuen beta, muss jetzt nur noch ein spiel finden in dem ich FXAA unter DX10+ anwenden könnte und es was bringt. Das einzige das ich habe ist Call of Pripyat und das hat mit FXAA weniger FPS als mit MSAA 4x im DX10.1 modus. Außerdem glättet das ingame AA auch die stromleitungen, FXAA versagt hier.

@Some Dude: Sry if I'm annoying with the same question but could you do a OpenGL version? ^^

DrFreaK666
2011-08-08, 22:30:10
Just noticed these: http://www.youtube.com/watch?v=ehF3gSGWVJk
http://www.youtube.com/watch?v=y_CLdGFrjOM
http://youtu.be/V_lLTG8iwR4

so apparently EBN works in WoW, so there must be some way to hook/ inject. :confused:

enb funzt(e) mit WOW. Kanns bestätigen.
Ist halt schon einige Jahre her (Radeon 4870).

Gast
2011-08-08, 23:12:50
FXAA is working fine in World of Warcraft for me.

Gast
2011-08-08, 23:20:03
FXAA is working fine in World of Warcraft for me.

Must be DX9 Mode because in DX11 it doesn't work.

Violator
2011-08-08, 23:51:12
Must be DX9 Mode because in DX11 it doesn't work.
Of course it is in DirectX9 mode, since FXAA isn't fully functional for DirectX11 yet.

Hübie
2011-08-09, 01:44:58
Also irgendwas mach ich doch falsch. Ich bekomm kein FXAA in GTA 4 (1.0.7.0) nur die anderen Effekte. Im Screenshot-thread seh ich aber Bilder wo es offenbar geht.
Kann das mal einer für dämliche wie mich erklären? Mit welcher Taste aktivier ich das denn nun? Lese erst was von Einfg dann Pause:confused:

=Floi=
2011-08-09, 06:06:07
SGSSAA ist leider nicht in jedem Game vorhanden und verursacht nicht selten Grafikfehler wie zb. in Shift 2.

das ist käse! SGSSAA funktioniert mittlerweile quasi überall und die BQ ist noch immer ungeschlagen gut.
die spiele bei denen es wirklich gar nicht funktioniert kann man mittlerweile an einer hand abzählen. :rolleyes:


edit
um was genau geht es hier im thread mittlerweile eigentlich? kann man das fxaa einfach über den neuen treiber aktivieren oder nur über irgendwelche datenen, die man irgendwohin kopieren muß?

Scoty
2011-08-09, 08:00:24
Was muss ich bei Need for Speed: Hot Pursuit 2010 machen damit man FXAA hat? Würde das gerne mal testen aber so ganz sehe ich mich nicht aus was man nun braucht. Vielleicht kann man denn Start Post mal so anpassen damit man sich auskennt.

Scoty
2011-08-09, 09:20:40
Ok danke, werde ich am Abend dann mal testen.

dargo
2011-08-09, 10:30:05
das ist käse! SGSSAA funktioniert mittlerweile quasi überall und die BQ ist noch immer ungeschlagen gut.

Was ist Käse? Zeig mir dann mal die SGSSAA-Bits für Shift 2 welche bei Nachtfahrten keine Grafikfehler verursachen. Zumal SGSSAA in Shift 2 extrem blurt. Ich rede von Shift 2 du sagst mir SGSSAA funktioniert quasi überall. Wo ist der Zusammenhang? :facepalm:


edit
um was genau geht es hier im thread mittlerweile eigentlich? kann man das fxaa einfach über den neuen treiber aktivieren oder nur über irgendwelche datenen, die man irgendwohin kopieren muß?
Wie wärs wenn du mal den Thread lesen würdest?

Tom Yum 72
2011-08-09, 13:23:49
Hat das mal irgendwer von euch mit crysis 2 probiert? Bei mir geht,wie auch bei crysis 1 , NUR dx9. Nehme ich die dx10 dateien(vorher natürlich alles sauber vom dx9 ordner entfernt) ,starten c1 und c2 nicht mehr.
Habe es mit beta 9 und Beetles versionen versucht.
Wie gesagt,dx9 geht bei beiden anstandslos.

BeetleatWar1977
2011-08-09, 13:26:17
C1 mit DX10 geht hier problemlos - k.A.

Tom Yum 72
2011-08-09, 13:34:09
Versteh das nicht,ich bekomm immer ne fehlermeldung beim start. "dx10renderer.....". Ich werd das nochmal versuchen. Wie sind denn deine sharpen Einstellungen und wo hast du // gesetzt bei Crysis,Beetle?

BeetleatWar1977
2011-08-09, 13:35:34
Boah - hab bloß mal getestet. Ich würde sagen nur die erste Funktion an, alles andere aus.

Tom Yum 72
2011-08-09, 13:54:44
Boah....danke,werde das mal testen :smile:

Blaire
2011-08-09, 16:49:13
Was ist Käse? Zeig mir dann mal die SGSSAA-Bits für Shift 2 welche bei Nachtfahrten keine Grafikfehler verursachen. Zumal SGSSAA in Shift 2 extrem blurt. Ich rede von Shift 2 du sagst mir SGSSAA funktioniert quasi überall. Wo ist der Zusammenhang? :facepalm:

In Shift2 liegts an den AA Bits, das kann nur EA selber bereinigen. Man kriegt aber Shift2 auch blurfrei hin mit den richtigen AA Bits, aber da diese wie die anderen auch diese Fehler bei Nachtfahrten fabrizieren, hab ich diese nicht gepostet. Wie gut funktioniert denn FXAA in Shift2? :)

phoenix887
2011-08-09, 16:52:07
dumme Frage wo finde ich den Download für die FXAA Files?

Ronny145
2011-08-09, 17:49:40
dumme Frage wo finde ich den Download für die FXAA Files?

Beitrag #361 auf Seite 19. Vielleicht kann der Threadstarter oder ein Moderator den Link auf Seite 1 verfrachten.



Tropico 4 unterstützt übrigens FXAA (http://forum.kalypsomedia.com/showthread.php?tid=10215). Dafür gibt es kein normales MSAA mehr wie im Vorgänger.

Außerdem unterstützt Tropico 4 auf beiden Plattformen NVIDIA's FXAA Technologie für bessere Anti-Aliasing-Einstellungen bei leicht höheren Systemanforderungen.

Tropico 4 will also support NVIDIA's FXAA technology on both console and Windows PC, which offers advanced anti-aliasing features with a minimal effect on system performance.

AA Settings im Spiel: http://www.abload.de/img/tropico4-demofxaasettifr4s.png

Es gibt eine Demo, ich wollte mal sehen wie das im Vergleich aussieht.

AA Off
http://www.abload.de/img/tropico4aaoff2on8.png
http://www.abload.de/img/aus9pd0.png

AA Weich
http://www.abload.de/img/tropico4aasoftcrdc.png
http://www.abload.de/img/weichakm4.png

AA Scharf
http://www.abload.de/img/tropicop4aascharfiji3.png
http://www.abload.de/img/scharf9juj.png

FXAA Beta9
http://www.abload.de/img/tropico4aaofffxaabeta9f82q.png
http://www.abload.de/img/beta98j1l.png

FXAA Beta9 Custom+Sharpen
http://www.abload.de/img/tropico4fxaabeta9custotjv2.png
http://www.abload.de/img/beta9customrjjn.png

dargo@work
2011-08-09, 17:55:52
In Shift2 liegts an den AA Bits, das kann nur EA selber bereinigen. Man kriegt aber Shift2 auch blurfrei hin mit den richtigen AA Bits, aber da diese wie die anderen auch diese Fehler bei Nachtfahrten fabrizieren, hab ich diese nicht gepostet. Wie gut funktioniert denn FXAA in Shift2? :)
http://www.forum-3dcenter.org/vbulletin/showpost.php?p=8871309&postcount=366
http://www.forum-3dcenter.org/vbulletin/showpost.php?p=8871316&postcount=367

Das war noch wenn mich nicht alles täuscht mit beta 9, sprich ohne "sharpen" wie mit der Version von Beetle.

Violator
2011-08-09, 19:00:44
FXAA D3D9 Rearanged v.0.2

http://www8.zippyshare.com/v/49357152/file.html

I separated the filters and moved them into their own folder.
All settings except for the FXAA shader (still working on this) are now available in Settings.h

Gast
2011-08-09, 19:09:11
cool Violator,

now someone can create a UI for settings :)


any progress news some dude ?

dargo@work
2011-08-09, 19:20:57
@Beetle

Mir ist gestern aufgefallen, dass bei deiner Version die Pause-Taste für den Wechsel zwischen noAA/FXAA oftmals nicht funktioniert. Ich muss sehr oft auf die draufdonnern bis sich was tut. Bei der Version von dude ging das immer sofort. Hast du da was diesbezüglich verändert?

Hübie
2011-08-09, 19:24:26
Moment mal. Nun arbeiten schon 3 Personen an einer Sache mit 3 Ergebnissen? Leute das wird nix :tongue: Setzt euch zusammen.

LG Hübie

Violator
2011-08-09, 20:13:56
Moment mal. Nun arbeiten schon 3 Personen an einer Sache mit 3 Ergebnissen? Leute das wird nix :tongue: Setzt euch zusammen.

LG Hübie

Schade, dass es kein OpenSVN mehr gibt. :(

***************************************
New version that includes the 3 most important adjustable settings for the AA amount in Settings.h
EDIT: Corrected a mistake in the pass order and added Vignette as separate effect.

http://www43.zippyshare.com/v/92569536/file.html

I think a neat game overlay written in C++ would be nice for controlling this.

Just tried V

Ronny145
2011-08-09, 20:53:36
http://www43.zippyshare.com/v/92569536/file.html



Arcania doesn't start with this.

Violator
2011-08-09, 21:25:20
redirecting CreateDevice
D3DXCreateEffectFromFile failed
C:\Program Files (x86)\JoWooD Entertainment AG\ArcaniA - Gothic 4 Demo\shader.fx(11,10): error X1507: failed to open source file: 'fxaad3d9\Fxaa3_11.h'
Did you paste the folder so that you have 8 files in the fxaad3d9 folder?
"C:\Program Files (x86)\JoWooD Entertainment AG\ArcaniA - Gothic 4 Demo\fxaad3d9\" 8 files here*

Violator
2011-08-10, 00:25:03
oh - by the way:

Part of the new Bloom code, should speed it up a little if im finished (and make it true circular)
Cool, I played a bit with it, seems good and somewhat faster.
Maybe attaching a time logger to the processes could be something while developing, at least that gives us a clearer idea of how much faster/slower the process change is.

I noticed something that I need to change :D
int 2 float for now, will try to make something with whole numbers since all the decimals are a bit for nerdy for average folks.
/*------------------------------------------------------------------------------
FXAA SHADER
------------------------------------------------------------------------------*/
// Set values to calculate the amount of Anti Aliasing applied
float fxaaQualitySubpix = 0.60; // Default: 0.75 Raise to increase amount of blur
float fxaaQualityEdgeThreshold = 0.133; // Lower the value for more smoothing
float fxaaQualityEdgeThresholdMin = 0.0633; // Lower the value for more smoothing
I tested with to large values on these, where int works ok, but for smaller adjustments it doesn't do much with the current code.

Scoty
2011-08-10, 09:30:36
Also bei mir funktioniert das nicht bei NFS Hot Pursit. Habe die Dateien in denn Ordner rein kopiert wo auch die exe ist aber sehe keinen Unterschied. Muss ich im Treiber selber auch noch was umstellen?

[Anarki_Hunter]
2011-08-10, 13:43:20
Wow so many developments, since I requested a sharpening filter.

Now, apart from stock FXAA wrapper from [Some_body] with beta9...which is the best setting for Divinity 2.

Both FXAA with a bit of sharpening.

Many Thanks,

Gast
2011-08-10, 13:50:42
[some dude] give up ? :(

Ronny145
2011-08-10, 14:08:02
;8878988']Wow so many developments, since I requested a sharpening filter.

Now, apart from stock FXAA wrapper from [Some_body] with beta9...which is the best setting for Divinity 2.

Both FXAA with a bit of sharpening.

Many Thanks,

Sharpen.h from some dude should be the best. Use it with #include "Sharpen.h" in Shader.fx and look for the following values in the Sharpen.h

#define moyenne 0.0
#define SharpenEdge 0.0
#define Sharpen_val0 1.3

If you want it sharper, increase Sharpen_val0 or for smoother decrease it. With the Sharpen.h you might increase the subpix to 0.80 or so.

Gast
2011-08-10, 17:55:56
[some dude] give up ? :(

Probably considering everyone else moved in and took over his project.

[Anarki_Hunter]
2011-08-10, 18:44:23
[some dude] give up ? :(

hey...Sorry my post was misunderstanding ( my english is bad "-_- )

I meant what settings to tweak, from the default values from your Beta 9 files. Because many have already checked it up on all the games and I am tuning for each game.

(I still haven checked the other stuff, because its just too overloading to add everything..since most of the new games always have them..bloom, tone mapping, etc..just needed FXAA)

Also different games needs different settings a bit, so that why.

[Anarki_Hunter]
2011-08-10, 18:56:21
Sharpen.h from some dude should be the best. Use it with #include "Sharpen.h" in Shader.fx and look for the following values in the Sharpen.h

#define moyenne 0.0
#define SharpenEdge 0.0
#define Sharpen_val0 1.3

If you want it sharper, increase Sharpen_val0 or for smoother decrease it. With the Sharpen.h you might increase the subpix to 0.80 or so.

I never tried setting Moyenne and sharpenedge to 0.0, as I thought it didn't make sense to keep it at zero.

BUT..

Wow, O.O....it worked...totally minimal bluring but with good FXAA...even at distances short + long.

TY..

(I didn't check out the other modifications, as a just a glance at the posts..they have too many parameters + extra processing + extra material. I just need FXAA + a bit of sharpening)

TY again...

Gast
2011-08-10, 19:00:32
;8879499']hey...Sorry my post was misunderstanding ( my english is bad "-_- )

I meant what settings to tweak, from the default values from your Beta 9 files. Because many have already checked it up on all the games and I am tuning for each game.

(I still haven checked the other stuff, because its just too overloading to add everything..since most of the new games always have them..bloom, tone mapping, etc..just needed FXAA)

Also different games needs different settings a bit, so that why.
understood

but some new features like call another d3d9.dll (chained), config file to setting keys (some games pause when hit toggle key, or mac that doesnt has this key, for example) or screenshot folder... are greats requests :(

ok shaders can be done and keep walking by community but the base of plugin is only [some dude] ;)

Ronny145
2011-08-10, 19:00:59
;8879531']I never tried setting Moyenne and sharpenedge to 0.0, as I thought it didn't make sense to keep it at zero.

It makes no sense, trust me. Totally useless and costs slightly more performance. Nice to hear it worked out for you. I'm with you, FXAA+Sharpen is enough for me, don't need anything more. Was just trying the float sharpen but it's not as good. Have you increased the subpix? With sharpen active it's better to increase it I think.

Ronny145
2011-08-10, 19:27:55
Bad Company 2 does work in DX9 and DX10 mode but doesn't work in DX11 mode. Also tried the LUMA string but no chance. ;(

Log file:

redirecting CreateDXGIFactory
redirecting CreateDXGIFactory
redirecting IDXGIFactory->CreateSwapChain
pDevice->CreateDeferredContext failed

Gast
2011-08-10, 19:28:49
is this useful?

http://pcsx2.googlecode.com/svn-history/r4828/trunk/plugins/GSdx/res/fxaa.fx

Gast
2011-08-10, 19:31:33
Maaaaan....no new development concerning FXAA since beta 9....its a shame...:(

[Anarki_Hunter]
2011-08-10, 19:55:11
Maaaaan....no new development concerning FXAA since beta 9....its a shame...:(

Er, [Some_body] has already mentioned that he doesn't have DX11 hardware..so its hard for him to code without on the fly or fast results with changes.

Also no new changes for FXAA code has been mentioned by TIMOTHY LOTTES himself (the one who wrote the document about FXAA and one who has written all the versions of FXAA code). His blog - http://timothylottes.blogspot.com/

So until [Some_body] gets DX11 hardware or Timothy Lottes updates his code in public..there will be no new code.

Because the FXAA Beta 9 DLL wrappers by [Some_Body] already works on almost ALLL the games which checks for either "d3d9.dll" or "dxgi.dll" in the game directory itself. No need for futher updates, as there is no issue with the DLL wrappers themselves (apart from the above, DX11 hardware with coder or Timothy Lottes updates the code)

If the game checks for the corresponding DLL in only the windows system folder, Then it CANNOT be helped..at all. This is another complexity, its hard to explain..as you will need a 3rd party process which will wrap the original DLL request by the game which goes to the windows system folder.

Gast
2011-08-10, 19:57:25
;8879686']Er, [Some_body] has already mentioned that he doesn't have DX11 hardware..so its hard for him to code without on the fly or fast results with changes.

Also no new changes for FXAA code has been mentioned by TIMOTHY LOTTES himself (the one who wrote the document about FXAA and one who has written all the versions of FXAA code). His blog - http://timothylottes.blogspot.com/

So until [Some_body] gets DX11 hardware or Timothy Lottes updates his code in public..there will be no new code.

You don't even know what your talking about, please stop stating nonsense.

[Anarki_Hunter]
2011-08-10, 19:58:24
You don't even know what your talking about, please stop stating nonsense.

Which part is nonsense!.****

Gast
2011-08-10, 20:07:17
[some dude] [some body] [some boy] :D :D :D

[Anarki_Hunter]
2011-08-10, 20:08:48
Changed my mind, 3Dcenter forums are..too complex.

Won't be coming here, bye.

Gast
2011-08-10, 20:29:37
;8879717']Changed my mind, 3Dcenter forums are..too complex.

Won't be coming here, bye.

Reisende soll man nicht aufhalten.

DrFreaK666
2011-08-10, 21:39:54
Hat nun ein Gast einen anderen Gast verjagt?? :freak:

Welche versionen gibt es denn nun? Und wie unterscheiden sich diese?

Ronny145
2011-08-10, 22:16:50
Dungeon Siege III and Empire Total War Demo doesn't work. Tried all folders and LUMA string, disabled Ingame AA. No log file created in Dungeon Siege III. When I start Empire Total War FXAA is enabled in main menu. Once I start a game FXAA deactivates.

Log File Empire Total War:

redirecting CreateDevice
redirecting CreateDevice
d3ddevice->StretchRect failed 6733
d3ddevice->StretchRect failed 6734
d3ddevice->StretchRect failed 6735
d3ddevice->StretchRect failed 6736
d3ddevice->StretchRect failed 6737
d3ddevice->StretchRect failed 6738
d3ddevice->StretchRect failed 6739
d3ddevice->StretchRect failed 6740
d3ddevice->StretchRect failed 6741
d3ddevice->StretchRect failed 6742
d3ddevice->StretchRect failed 6743
d3ddevice->StretchRect failed 6744
d3ddevice->StretchRect failed 6745
d3ddevice->StretchRect failed 6746
d3ddevice->StretchRect failed 6747
d3ddevice->StretchRect failed 6748
d3ddevice->StretchRect failed 6749
d3ddevice->StretchRect failed 6750
d3ddevice->StretchRect failed 6751
d3ddevice->StretchRect failed 6752
d3ddevice->StretchRect failed 6753
d3ddevice->StretchRect failed 6754
d3ddevice->StretchRect failed 6755
d3ddevice->StretchRect failed 6756
d3ddevice->StretchRect failed 6757
d3ddevice->StretchRect failed 6758
d3ddevice->StretchRect failed 6759
d3ddevice->StretchRect failed 6760
d3ddevice->StretchRect failed 6761
d3ddevice->StretchRect failed 6762
d3ddevice->StretchRect failed 6763
d3ddevice->StretchRect failed 6764
d3ddevice->StretchRect failed 6765
d3ddevice->StretchRect failed 6766
d3ddevice->StretchRect failed 6767
d3ddevice->StretchRect failed 6768
d3ddevice->StretchRect failed 6769
d3ddevice->StretchRect failed 6770
d3ddevice->StretchRect failed 6771
d3ddevice->StretchRect failed 6772
d3ddevice->StretchRect failed 6773
d3ddevice->StretchRect failed 6774
d3ddevice->StretchRect failed 6775
d3ddevice->StretchRect failed 6776
d3ddevice->StretchRect failed 6777
d3ddevice->StretchRect failed 6778
d3ddevice->StretchRect failed 6779
d3ddevice->StretchRect failed 6780
d3ddevice->StretchRect failed 6781
d3ddevice->StretchRect failed 6782
d3ddevice->StretchRect failed 6783
d3ddevice->StretchRect failed 6784
d3ddevice->StretchRect failed 6785
d3ddevice->StretchRect failed 6786
d3ddevice->StretchRect failed 6787
d3ddevice->StretchRect failed 6788
d3ddevice->StretchRect failed 6789
d3ddevice->StretchRect failed 6790
d3ddevice->StretchRect failed 6791
d3ddevice->StretchRect failed 6792
d3ddevice->StretchRect failed 6793
d3ddevice->StretchRect failed 6794
d3ddevice->StretchRect failed 6795
d3ddevice->StretchRect failed 6796
d3ddevice->StretchRect failed 6797
d3ddevice->StretchRect failed 6798
d3ddevice->StretchRect failed 6799
d3ddevice->StretchRect failed 6800
d3ddevice->StretchRect failed 6801
d3ddevice->StretchRect failed 6802
d3ddevice->StretchRect failed 6803
d3ddevice->StretchRect failed 6804
d3ddevice->StretchRect failed 6805
d3ddevice->StretchRect failed 6806
d3ddevice->StretchRect failed 6807
d3ddevice->StretchRect failed 6808
d3ddevice->StretchRect failed 6809
d3ddevice->StretchRect failed 6810
d3ddevice->StretchRect failed 6811
d3ddevice->StretchRect failed 6812
d3ddevice->StretchRect failed 6813
d3ddevice->StretchRect failed 6814
d3ddevice->StretchRect failed 6815
d3ddevice->StretchRect failed 6816
d3ddevice->StretchRect failed 6817
d3ddevice->StretchRect failed 6818
d3ddevice->StretchRect failed 6819
d3ddevice->StretchRect failed 6820
d3ddevice->StretchRect failed 6821
d3ddevice->StretchRect failed 6822
d3ddevice->StretchRect failed 6823
d3ddevice->StretchRect failed 6824
d3ddevice->StretchRect failed 6825
d3ddevice->StretchRect failed 6826
d3ddevice->StretchRect failed 6827
d3ddevice->StretchRect failed 6828
d3ddevice->StretchRect failed 6829
d3ddevice->StretchRect failed 6830
d3ddevice->StretchRect failed 6831
d3ddevice->StretchRect failed 6832
d3ddevice->StretchRect failed 6833
d3ddevice->StretchRect failed 6834
d3ddevice->StretchRect failed 6835
d3ddevice->StretchRect failed 6836
d3ddevice->StretchRect failed 6837
d3ddevice->StretchRect failed 6838
d3ddevice->StretchRect failed 6839
d3ddevice->StretchRect failed 6840
d3ddevice->StretchRect failed 6841
d3ddevice->StretchRect failed 6842
d3ddevice->StretchRect failed 6843
d3ddevice->StretchRect failed 6844
d3ddevice->StretchRect failed 6845
d3ddevice->StretchRect failed 6846
d3ddevice->StretchRect failed 6847
d3ddevice->StretchRect failed 6848
d3ddevice->StretchRect failed 6849
d3ddevice->StretchRect failed 6850
d3ddevice->StretchRect failed 6851
d3ddevice->StretchRect failed 6852
d3ddevice->StretchRect failed 6853
d3ddevice->StretchRect failed 6854
d3ddevice->StretchRect failed 6855
d3ddevice->StretchRect failed 6856
d3ddevice->StretchRect failed 6857
d3ddevice->StretchRect failed 6858
d3ddevice->StretchRect failed 6859
d3ddevice->StretchRect failed 6860
d3ddevice->StretchRect failed 6861
d3ddevice->StretchRect failed 6862
d3ddevice->StretchRect failed 6863
d3ddevice->StretchRect failed 6864
d3ddevice->StretchRect failed 6865
d3ddevice->StretchRect failed 6866
d3ddevice->StretchRect failed 6867
d3ddevice->StretchRect failed 6868
d3ddevice->StretchRect failed 6869
d3ddevice->StretchRect failed 6870
d3ddevice->StretchRect failed 6871
d3ddevice->StretchRect failed 6872
d3ddevice->StretchRect failed 6873
d3ddevice->StretchRect failed 6874
d3ddevice->StretchRect failed 6875
d3ddevice->StretchRect failed 6876
d3ddevice->StretchRect failed 6877
d3ddevice->StretchRect failed 6878
d3ddevice->StretchRect failed 6879
d3ddevice->StretchRect failed 6880
d3ddevice->StretchRect failed 6881
d3ddevice->StretchRect failed 6882
d3ddevice->StretchRect failed 6883
d3ddevice->StretchRect failed 6884
d3ddevice->StretchRect failed 6885
d3ddevice->StretchRect failed 6886
d3ddevice->StretchRect failed 6887
d3ddevice->StretchRect failed 6888
d3ddevice->StretchRect failed 6889
d3ddevice->StretchRect failed 6890
d3ddevice->StretchRect failed 6891
d3ddevice->StretchRect failed 6892
d3ddevice->StretchRect failed 6893
d3ddevice->StretchRect failed 6894
d3ddevice->StretchRect failed 6895
d3ddevice->StretchRect failed 6896
d3ddevice->StretchRect failed 6897
d3ddevice->StretchRect failed 6898
d3ddevice->StretchRect failed 6899
d3ddevice->StretchRect failed 6900
d3ddevice->StretchRect failed 6901
d3ddevice->StretchRect failed 6902
d3ddevice->StretchRect failed 6903
d3ddevice->StretchRect failed 6904
d3ddevice->StretchRect failed 6905
d3ddevice->StretchRect failed 6906
d3ddevice->StretchRect failed 6907
d3ddevice->StretchRect failed 6908
d3ddevice->StretchRect failed 6909
d3ddevice->StretchRect failed 6910
d3ddevice->StretchRect failed 6911
d3ddevice->StretchRect failed 6912
d3ddevice->StretchRect failed 6913
d3ddevice->StretchRect failed 6914
d3ddevice->StretchRect failed 6915
d3ddevice->StretchRect failed 6916
d3ddevice->StretchRect failed 6917
d3ddevice->StretchRect failed 6918
d3ddevice->StretchRect failed 6919
d3ddevice->StretchRect failed 6920
d3ddevice->StretchRect failed 6921
d3ddevice->StretchRect failed 6922
d3ddevice->StretchRect failed 6923
d3ddevice->StretchRect failed 6924
d3ddevice->StretchRect failed 6925
d3ddevice->StretchRect failed 6926
d3ddevice->StretchRect failed 6927
d3ddevice->StretchRect failed 6928
d3ddevice->StretchRect failed 6929
d3ddevice->StretchRect failed 6930
d3ddevice->StretchRect failed 6931
d3ddevice->StretchRect failed 6932
d3ddevice->StretchRect failed 6933
d3ddevice->StretchRect failed 6934
d3ddevice->StretchRect failed 6935
d3ddevice->StretchRect failed 6936
d3ddevice->StretchRect failed 6937
d3ddevice->StretchRect failed 6938
d3ddevice->StretchRect failed 6939
d3ddevice->StretchRect failed 6940
d3ddevice->StretchRect failed 6941
d3ddevice->StretchRect failed 6942
d3ddevice->StretchRect failed 6943
d3ddevice->StretchRect failed 6944
d3ddevice->StretchRect failed 6945
d3ddevice->StretchRect failed 6946
d3ddevice->StretchRect failed 6947
d3ddevice->StretchRect failed 6948
d3ddevice->StretchRect failed 6949
d3ddevice->StretchRect failed 6950
d3ddevice->StretchRect failed 6951
d3ddevice->StretchRect failed 6952
d3ddevice->StretchRect failed 6953
d3ddevice->StretchRect failed 6954
d3ddevice->StretchRect failed 6955
d3ddevice->StretchRect failed 6956
d3ddevice->StretchRect failed 6957
d3ddevice->StretchRect failed 6958
d3ddevice->StretchRect failed 6959
d3ddevice->StretchRect failed 6960
d3ddevice->StretchRect failed 6961
d3ddevice->StretchRect failed 6962
d3ddevice->StretchRect failed 6963
d3ddevice->StretchRect failed 6964
d3ddevice->StretchRect failed 6965
d3ddevice->StretchRect failed 6966
d3ddevice->StretchRect failed 6967
d3ddevice->StretchRect failed 6968
d3ddevice->StretchRect failed 6969
d3ddevice->StretchRect failed 6970
d3ddevice->StretchRect failed 6971
d3ddevice->StretchRect failed 6972
d3ddevice->StretchRect failed 6973
d3ddevice->StretchRect failed 6974
d3ddevice->StretchRect failed 6975
d3ddevice->StretchRect failed 6976
d3ddevice->StretchRect failed 6977
d3ddevice->StretchRect failed 6978
d3ddevice->StretchRect failed 6979
d3ddevice->StretchRect failed 6980
d3ddevice->StretchRect failed 6981
d3ddevice->StretchRect failed 6982
d3ddevice->StretchRect failed 6983
d3ddevice->StretchRect failed 6984
d3ddevice->StretchRect failed 6985
d3ddevice->StretchRect failed 6986
d3ddevice->StretchRect failed 6987
d3ddevice->StretchRect failed 6988
d3ddevice->StretchRect failed 6989
d3ddevice->StretchRect failed 6990
d3ddevice->StretchRect failed 6991
d3ddevice->StretchRect failed 6992
d3ddevice->StretchRect failed 6993
d3ddevice->StretchRect failed 6994
d3ddevice->StretchRect failed 6995
d3ddevice->StretchRect failed 6996
d3ddevice->StretchRect failed 6997
d3ddevice->StretchRect failed 6998
d3ddevice->StretchRect failed 6999
d3ddevice->StretchRect failed 7000
d3ddevice->StretchRect failed 7001
d3ddevice->StretchRect failed 7002
d3ddevice->StretchRect failed 7003
d3ddevice->StretchRect failed 7004
d3ddevice->StretchRect failed 7005
d3ddevice->StretchRect failed 7006
d3ddevice->StretchRect failed 7007
d3ddevice->StretchRect failed 7008
d3ddevice->StretchRect failed 7009
d3ddevice->StretchRect failed 7010
d3ddevice->StretchRect failed 7011
d3ddevice->StretchRect failed 7012
d3ddevice->StretchRect failed 7013
d3ddevice->StretchRect failed 7014
d3ddevice->StretchRect failed 7015
d3ddevice->StretchRect failed 7016
d3ddevice->StretchRect failed 7017
d3ddevice->StretchRect failed 7018
d3ddevice->StretchRect failed 7019
d3ddevice->StretchRect failed 7020
d3ddevice->StretchRect failed 7021
d3ddevice->StretchRect failed 7022
d3ddevice->StretchRect failed 7023
d3ddevice->StretchRect failed 7024
d3ddevice->StretchRect failed 7025
d3ddevice->StretchRect failed 7026
d3ddevice->StretchRect failed 7027
d3ddevice->StretchRect failed 7028
d3ddevice->StretchRect failed 7029
d3ddevice->StretchRect failed 7030
d3ddevice->StretchRect failed 7031
d3ddevice->StretchRect failed 7032
d3ddevice->StretchRect failed 7033
d3ddevice->StretchRect failed 7034
d3ddevice->StretchRect failed 7035
d3ddevice->StretchRect failed 7036
d3ddevice->StretchRect failed 7037
d3ddevice->StretchRect failed 7038
d3ddevice->StretchRect failed 7039
d3ddevice->StretchRect failed 7040
d3ddevice->StretchRect failed 7041
d3ddevice->StretchRect failed 7042
d3ddevice->StretchRect failed 7043
d3ddevice->StretchRect failed 7044
d3ddevice->StretchRect failed 7045
d3ddevice->StretchRect failed 7046
d3ddevice->StretchRect failed 7047
d3ddevice->StretchRect failed 7048
d3ddevice->StretchRect failed 7049
d3ddevice->StretchRect failed 7050
d3ddevice->StretchRect failed 7051
d3ddevice->StretchRect failed 7052
d3ddevice->StretchRect failed 7053
d3ddevice->StretchRect failed 7054
d3ddevice->StretchRect failed 7055
d3ddevice->StretchRect failed 7056
d3ddevice->StretchRect failed 7057
d3ddevice->StretchRect failed 7058
d3ddevice->StretchRect failed 7059
d3ddevice->StretchRect failed 7060
d3ddevice->StretchRect failed 7061
d3ddevice->StretchRect failed 7062
d3ddevice->StretchRect failed 7063
d3ddevice->StretchRect failed 7064
d3ddevice->StretchRect failed 7065
d3ddevice->StretchRect failed 7066
d3ddevice->StretchRect failed 7067
d3ddevice->StretchRect failed 7068
d3ddevice->StretchRect failed 7069
d3ddevice->StretchRect failed 7070
d3ddevice->StretchRect failed 7071
d3ddevice->StretchRect failed 7072
d3ddevice->StretchRect failed 7073
d3ddevice->StretchRect failed 7074
d3ddevice->StretchRect failed 7075
d3ddevice->StretchRect failed 7076
d3ddevice->StretchRect failed 7077
d3ddevice->StretchRect failed 7078
d3ddevice->StretchRect failed 7079
d3ddevice->StretchRect failed 7080
d3ddevice->StretchRect failed 7081
d3ddevice->StretchRect failed 7082
d3ddevice->StretchRect failed 7083
d3ddevice->StretchRect failed 7084
d3ddevice->StretchRect failed 7085
d3ddevice->StretchRect failed 7086
d3ddevice->StretchRect failed 7087
d3ddevice->StretchRect failed 7088
d3ddevice->StretchRect failed 7089
d3ddevice->StretchRect failed 7090
d3ddevice->StretchRect failed 7091
d3ddevice->StretchRect failed 7092
d3ddevice->StretchRect failed 7093
d3ddevice->StretchRect failed 7094
d3ddevice->StretchRect failed 7095
d3ddevice->StretchRect failed 7096
d3ddevice->StretchRect failed 7097
d3ddevice->StretchRect failed 7098
d3ddevice->StretchRect failed 7099
d3ddevice->StretchRect failed 7100
d3ddevice->StretchRect failed 7101
d3ddevice->StretchRect failed 7102
d3ddevice->StretchRect failed 7103
d3ddevice->StretchRect failed 7104
d3ddevice->StretchRect failed 7105
d3ddevice->StretchRect failed 7106
d3ddevice->StretchRect failed 7107
d3ddevice->StretchRect failed 7108
d3ddevice->StretchRect failed 7109
d3ddevice->StretchRect failed 7110
d3ddevice->StretchRect failed 7111
d3ddevice->StretchRect failed 7112
d3ddevice->StretchRect failed 7113
d3ddevice->StretchRect failed 7114
d3ddevice->StretchRect failed 7115
d3ddevice->StretchRect failed 7116
d3ddevice->StretchRect failed 7117
d3ddevice->StretchRect failed 7118
d3ddevice->StretchRect failed 7119
d3ddevice->StretchRect failed 7120
d3ddevice->StretchRect failed 7121
d3ddevice->StretchRect failed 7122
d3ddevice->StretchRect failed 7123
d3ddevice->StretchRect failed 7124
d3ddevice->StretchRect failed 7125
d3ddevice->StretchRect failed 7126
d3ddevice->StretchRect failed 7127
d3ddevice->StretchRect failed 7128
d3ddevice->StretchRect failed 7129
d3ddevice->StretchRect failed 7130
d3ddevice->StretchRect failed 7131
d3ddevice->StretchRect failed 7132
d3ddevice->StretchRect failed 7133
d3ddevice->StretchRect failed 7134
d3ddevice->StretchRect failed 7135
d3ddevice->StretchRect failed 7136
d3ddevice->StretchRect failed 7137
d3ddevice->StretchRect failed 7138
d3ddevice->StretchRect failed 7139
d3ddevice->StretchRect failed 7140
d3ddevice->StretchRect failed 7141
d3ddevice->StretchRect failed 7142
d3ddevice->StretchRect failed 7143
d3ddevice->StretchRect failed 7144
d3ddevice->StretchRect failed 7145
d3ddevice->StretchRect failed 7146
d3ddevice->StretchRect failed 7147
d3ddevice->StretchRect failed 7148
d3ddevice->StretchRect failed 7149
d3ddevice->StretchRect failed 7150
d3ddevice->StretchRect failed 7151
d3ddevice->StretchRect failed 7152
d3ddevice->StretchRect failed 7153
d3ddevice->StretchRect failed 7154
d3ddevice->StretchRect failed 7155
d3ddevice->StretchRect failed 7156
d3ddevice->StretchRect failed 7157
d3ddevice->StretchRect failed 7158
d3ddevice->StretchRect failed 7159
d3ddevice->StretchRect failed 7160
d3ddevice->StretchRect failed 7161
d3ddevice->StretchRect failed 7162
d3ddevice->StretchRect failed 7163
d3ddevice->StretchRect failed 7164
d3ddevice->StretchRect failed 7165
d3ddevice->StretchRect failed 7166
d3ddevice->StretchRect failed 7167
d3ddevice->StretchRect failed 7168
d3ddevice->StretchRect failed 7169
d3ddevice->StretchRect failed 7170
d3ddevice->StretchRect failed 7171
d3ddevice->StretchRect failed 7172
d3ddevice->StretchRect failed 7173
d3ddevice->StretchRect failed 7174
d3ddevice->StretchRect failed 7175
d3ddevice->StretchRect failed 7176
d3ddevice->StretchRect failed 7177
redirecting device->Reset
device->GetBackBuffer failed

BeetleatWar1977
2011-08-10, 22:19:45
Bad Company 2 does work in DX9 and DX10 mode but doesn't work in DX11 mode. Also tried the LUMA string but no chance. ;(

Log file:

redirecting CreateDXGIFactory
redirecting CreateDXGIFactory
redirecting IDXGIFactory->CreateSwapChain
pDevice->CreateDeferredContext failed

Have you tried to change:

from:
#define FXAA_HLSL_4 1

to:

#define FXAA_HLSL_5 1


maybe this help.....

Ronny145
2011-08-10, 22:25:28
Have you tried to change:

from:
#define FXAA_HLSL_4 1

to:

#define FXAA_HLSL_5 1


maybe this help.....


No luck, doesn't help either.

Gast
2011-08-11, 02:11:58
Guys be careful, I got banned(thankfully only for 3 days) for using the hook in MW2 on alterIWnet. While VAC and PB might not be as sensitive as aIW's anti-cheat is, you gotta be careful. I've played BFBC2 for half an hour, meybe more with the hook enabled and hasn't been kicked nor banned so far. Anybody using it daily in BC2?

Gast
2011-08-11, 02:19:59
banned from alterIWnet ? wtf lol

piracy banning the piracy/hack :D :D

Powerp1ay
2011-08-11, 07:31:33
Habe herausgefunden wenn man das Tommti SSAA tool mit z.B. BFBC2@DX11 anschmeißt funktioniert sofort FXAA bei BFBC2!!!
Genauso ist es mit F1 2010@DX11 das funktioniert normalerweise nicht zumindest nicht bei mir aber alle DX10 und DX11 spiele funktionieren mit FXAA wenn man das DS tool auch anwendet :D

spajdr
2011-08-11, 07:44:54
some_dude no longer improving(working on) its FXAA scripts?

Gast
2011-08-11, 09:04:27
some_dude/Tim-Lot no longer improving(working on) its FXAA scripts?

There no need to seen it "perfect" according to him

Gast
2011-08-11, 18:43:39
There no need to seen it "perfect" according to him
sad :( well back to ENB Series

BeetleatWar1977
2011-08-12, 17:56:37
Somewhere in the DNF-Thread is a post with the updated FXAA-Shader

The Guest
2011-08-12, 18:48:05
please some_dude !!!

DLL-chaining
http://msdn.microsoft.com/en-us/library/aa363266(v=vs.85).aspx

i really need it to load another d3d9.dll :(

Violator
2011-08-12, 19:14:55
please some_dude !!!

DLL-chaining
http://msdn.microsoft.com/en-us/library/aa363266(v=vs.85).aspx

i really need it to load another d3d9.dll :(
Why are you linking to DHCP?
You can't use a multiple dll injector like winject or alike?

Violator
2011-08-12, 19:20:46
sorry, i think u dont understanding

if i turn on AA for a game, this dll is usefull, dont load/work.

so if we can change shader.fx sequence to not depend the fxaa for work, will be amazing.
This will be the best game enhancer ! Independent if we using AA or FXAA

but thanks anyway, an extra option always is welcome :)
The injection is all about using FXAA 3.11, we can't skip that since then nothing would work...

Gipsel
2011-08-12, 19:26:31
There is now a new thread (http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8883174#post8883174) for injecting other postprocessing effects beside FXAA. Some posts were moved to that thread.

Ronny145
2011-08-12, 23:36:10
Tropico 4 unterstützt übrigens FXAA (http://forum.kalypsomedia.com/showthread.php?tid=10215). Dafür gibt es kein normales MSAA mehr wie im Vorgänger.



NVIDIA FXAA III.8 by TIMOTHY LOTTES

Tropico 4 nutzt FXAA III in Version 8. Das steht so in der Shaders.hpk von Tropico 4. Müsste das erste PC Spiel mit FXAA III Support sein.

Döner-Ente
2011-08-13, 18:54:43
Probiere das grad in Stalker:CoP mal aus...das kann was: Sieht besser aus bei mehr Fps als das spielinterne 2xAA.

Hübie
2011-08-13, 19:19:09
Auch in D3D11? Mach mal bitte screenshots :)

Döner-Ente
2011-08-13, 21:50:51
Auch in D3D11? Mach mal bitte screenshots :)

Siehe meinen letzten Post im Screenshot-Thread. Ein paar Shots sind noch von den letzten Tagen und mit ingame-AA, insbesondere die aus Pripyat und dem Weg dahin sind mit FXAA.

Edit: Irgendwie finde ich das gerade die beste Erfindung seit geschnittenem Brot. Habe nun halt Call of Pripyat und eben Mafia II damit probiert; beides Spiele, bei denen spielinternes (Cop) oder treiberforciertes (Mafia II) MSAA richtig fies Leistung frisst und damit bei mir teilweise die Sorglos-Fps-Grenze unterschreitet, zumal die Steuerung bei beiden Spielen recht schwammig/ruckelig wird, wenn man eine gewisse Fps-Grenze unterschreitet.
Beispiel: Mafia II, Chapter: In loving Memory of...-Start: Mit treiberforciertem 4xAA (mit 0x000D02C4-Bits)=30-40 Fps, mit FXAA=50-60 Fps. Bei Cop ähnliches Bild...FXAA hebt die Fps raus aus den Bereichen, wo es sich schon nicht mehr so schön anfühlt.
In Anbetracht dessen kann ich sehr gut damit leben, dass FXAA evtl. nicht so schön glättet, das Gröbste an Kanten bügelt es allemal weg.
Klar, wenn man die Hardware hat, um auch Leistungseinbussen von 50-100% durch MSAA/SSAA locker verschmerzen zu können, bleibt man dabei, FXAA ist imho aber für Spiele, wo das eben je nach persönlicher Hardwareconfig nicht mehr gegeben ist, eine feine Lösung :).

Gast
2011-08-13, 22:34:02
[some dude]
About Empire: Total War - Demo: Thanks again, Ronny145, you found another tricky game engine which has it's own ways. I needed some time to defeat this one and hope the fix won't break other games. Proof:
http://www.abload.de/thumb/screenshot2134o8vh.png (http://www.abload.de/image.php?img=screenshot2134o8vh.png) http://www.abload.de/thumb/screenshot2173m8bv.png (http://www.abload.de/image.php?img=screenshot2173m8bv.png)

In beta 10 there are some changes in d3d9 mode to fix the mentioned game (maybe others as well). No changes in d3d10 mode.
http://hotfile.com/dl/126721760/6694e76/injectFxaa_by_some_dude_10.7z.html

Now some thoughts about previous posts.
It's quite ironical how correct [Anarki_Hunter] was in the statement about FXAA and my dlls before he was offended and left.
There are, of course, several ways to deal with the current "pDevice->CreateDeferredContext failed" issue, however I have no resources to do this properly. I also assume it would come with some mayor performance issues, since one would need to emulate disabled features by hand.
Additionally, I want to point out that I never said that the current version is "perfect", I just have no possibility to really improve it right now. Also, I suppose ENB Series has a different internal structure due to completely different compatibility and features (though the d3d9.dlls might look the same, there are different ways to make things work). My approach relies on a very thin interface layer between fxaa and the game engines, that is why most of the features which are supposed to be build in already are. It should do one thing and do it well. Also, I doubt that I'd do OpenGL; maybe some other dude will.

Döner-Ente
2011-08-13, 23:33:34
[some dude]


I just noticed something curious:
In some games (e.g. Crysis 2, Two Worlds II) triple buffering won´t work for me out of the box when playing them in DX 10/11 instead of DX9 and i have to force triple-buffering with d3doverrider.
While trying out your FXAA-Files i noticed that Stalker: Call of Pripyat(DX 11) uses triple buffering with the ingame-AA, but not when injecting FXAA.
No problem since one can force triple buffering with d3doverrider, but do you have any clue how these two things might be related ?

Ronny145
2011-08-14, 00:43:51
Great news that another game repaired successfully. Just tried Dungeon Siege III but no luck. There is no log file created, what does it mean (tried all folders including the exe main directory)? There is a Demo on Steam which I used: http://store.steampowered.com/app/901638/

Another thing that was already noted in posting #582. I told BC2 won't run in DX11 mode, interestingly with the SSAA Tool (http://www.tommti-systems.de/temp/SSAA_Tool.rar) APIHook enabled FXAA runs fine in BC2 DX11 mode. The same with Dirt 3 DX11 I heard.

Gast
2011-08-14, 13:56:28
[some dude]
About Dungeon Siege III: I analyzed the behaviour of the demo and, since the logfile is not created, my d3d9.dll is not loaded by the game. Though using the same directory as the game executable would be correct, this particular game explicitly looks only into the system directory. I patched a few bytes in the demo removing the sysdir focus just to see whether the game would be compatible or not. The game behaved well and allowed to use fxaa. Proof:
http://www.abload.de/thumb/screenshot271nuws.png (http://www.abload.de/image.php?img=screenshot271nuws.png) http://www.abload.de/thumb/screenshot303wui9.png (http://www.abload.de/image.php?img=screenshot303wui9.png)

Admittedly, me patching some demos doesn't change anything for you. I just wanted to make clear that neither you nor me aren't doing anything wrong and it is the game which refuses to load the dlls.
There are ways to forcefully hammer my dlls with a loader into this game without patching the binary. I don't think I'd do this for just one or two games.

About SSAA Tool: Good to hear that there is a workaround, it seems to get much deeper than my approach (maybe even on the driver level) and obviously forces the games to use features which they do not use.

About triple buffering: I do not recommend to force triple buffering when the game engine decides to disable it with fxaa enabled. I do not disable triple buffering in my code and but I also do not know why games disable it.

Gast
2011-08-14, 16:32:35
Triple Buffering call is probably last, before queuing front buffer frames to display port. Might this be the cause!

Following could be helpful.

BackBufferCount = 2 <- to enable triple buffering (easy on Nvidia cards, render ahead frames has similar behavior)

http://msdn.microsoft.com/en-us/library/ee419011(v=vs.85).aspx

http://msdn.microsoft.com/en-us/library/ff570099(v=vs.85).aspx

Gast
2011-08-14, 16:48:25
Is is possible to take "GetDepthStencilSurface( &pZBuffer )" via hook, apply more value of FXAA over geometry edges and only little value over full screen! (leaving geometry, but applying on shader+lighting!).

Gast
2011-08-14, 20:13:19
BackBufferCount = 2 <- to enable triple buffering (easy on Nvidia cards, render ahead frames has similar behavior)

Maximum pre-rendered frames as it's referred to in the NVIDIA driver is the amount of frames pre-processed by the CPU, not the GPU.

Gast
2011-08-15, 08:42:36
Great to have you back [some dude] with another version of FXAA =)

Gast
2011-08-15, 14:26:00
Hey, great work!

Any chance for Jimenez' MLAA integration as a toggle in addition to FXAA? ( https://github.com/iryoku/jimenez-mlaa )

Quite curious to see how the two compare, Jimenez' MLAA supposedly has the edge over FXAA in quality.

Gast
2011-08-15, 16:02:47
Anybody play The Sims 3 and get it to function with FXAA?

QuadReaktor
2011-08-15, 16:15:48
Kann mir jemand sagen wo ich die InjectFXAA Dateien in X-Men Origins Wolverine stecken muss ?

Ronny145
2011-08-15, 16:29:26
Anybody play The Sims 3 and get it to function with FXAA?

Doesn't work? Any messages in the log file? Have you tried the LUMA line?

Kann mir jemand sagen wo ich die InjectFXAA Dateien in X-Men Origins Wolverine stecken muss ?

Zuerst im Ordner der .exe probieren. Falls es einen Ordner mit anderen dlls gibt, würde ich die dll dorthin kopieren und die anderen Files in den exe Ordner. Erkennst Du am log file.

QuadReaktor
2011-08-15, 16:45:56
THX hat funktioniert :)

fulgore1101
2011-08-15, 17:10:47
Funktioniert FXAA mit GTAIV? Wenn ja was genau muss ich tun? Die Datei von der ersten Seite laden, und den Inhalt des DX9 Ordners ins Hauptverzeichnis des Spiels kopieren? Fertig? Zusätzliches Bloom oder sowas brauche ich nicht. FXAA und vielleicht etwas Schärfe würden mir reichen. Welche Werte muss ich dazu anpassen? Könnte jemand das ganze vielleicht etwas zusammenfassen?

Violator
2011-08-15, 20:47:41
Hey, great work!

Any chance for Jimenez' MLAA integration as a toggle in addition to FXAA? ( https://github.com/iryoku/jimenez-mlaa )

Quite curious to see how the two compare, Jimenez' MLAA supposedly has the edge over FXAA in quality.
http://www.eurogamer.dk/videos/teste-1-fxaa-vs-jimenez-mlaa
FXAA FTW

Hübie
2011-08-15, 21:20:51
Uuuuh. This is an epic fail for MLAA. It looks like 1xAA in some places. But its not so blurry like normalwise on AMD-Systems.
Anyway: FXAA is a nice option in combination with DS (or hires like 2560x1600) - anything else is crap.

bye Hübie

Döner-Ente
2011-08-15, 22:23:01
Hab das nun mal mit Mafia II, Shift 2 und Stalker: CoP (DX11) ausprobiert und muss sagen, gefällt mir sehr.
Nachdem MSAA/SSAA in immer mehr Spielen reichlich Performance fressen (selbst 2xAA frisst in Cop schon ordentlich) oder spielinterne Lösungen recht mau sind (Shift 2), kommt das hier gerade recht und in Anbetracht der Tatsache, dass es kaum Leistung frisst und die CPU-Auslastung auch geringer ist, finde ich die Optik sehr ordentlich.
Klar, wenn ordentlich MSAA/SSAA für mich noch mit guter Performance drin ist, bleibe ich dabei, aber für die Fälle, wo das nicht so ist, ist FXAA ein Segen.

Ronny145
2011-08-15, 23:19:44
Funktioniert FXAA mit GTAIV? Wenn ja was genau muss ich tun? Die Datei von der ersten Seite laden, und den Inhalt des DX9 Ordners ins Hauptverzeichnis des Spiels kopieren? Fertig? Zusätzliches Bloom oder sowas brauche ich nicht. FXAA und vielleicht etwas Schärfe würden mir reichen. Welche Werte muss ich dazu anpassen? Könnte jemand das ganze vielleicht etwas zusammenfassen?


Ja funktioniert. Die D3d9 Files einfach in den Hauptordner kopieren. Für GTA4 habe ich gerade ein bisschen ausprobiert. Ohne jetzt alles einzeln aufzudröseln poste ich die Bilder und darunter die fertigen Files zum Download. Version 1 ist etwas schärfer als Version 2.

NoAA
http://www.abload.de/img/gtaivnoaa_18f7a.png
http://www.abload.de/img/gtaivnoaa_2pfvw.png

Inject FXAA Default
http://www.abload.de/img/gtaivbeta9_1tfll.png
http://www.abload.de/img/gtaivbeta9_25f0q.png

Inject Custom Version_1
http://www.abload.de/img/gtaivversion1_1kf0b.png
http://www.abload.de/img/gtaivversion1_20etr.png

Inject Custom Version_2
http://www.abload.de/img/gtaivversion2_16ckn.png
http://www.abload.de/img/gtaivversion2_2vdsg.png

MLAA
http://www.abload.de/img/gtaivmlaa_10cf7.png
http://www.abload.de/img/gtaivmlaa_2qeii.png


http://www.file-upload.net/download-3665734/inject-Beta10_custom_shader_sharpen.zip.html

dhwang
2011-08-16, 06:06:03
some dude:

Thank you for the great utility. Is it possible to let users exclude some colors for FXAA so that text won't be blurred?

Gast
2011-08-16, 08:29:50
@[Some_Body]

Is it possible to implemented MLAA too! just by replacing the code!

Source -> http://www.iryoku.com/mlaa/

-> https://github.com/iryoku/jimenez-mlaa/zipball/v1.5 <-

Gast
2011-08-16, 12:01:02
[some dude]
About Jimenez's MLAA: I also played with the thought wheter to try out Jimenez's MLAA or not. That is why I alrady did some test myself (you can use the precompiled demo at http://www.iryoku.com/mlaa/ to apply Jimenez's MLAA to any picture). The average results were worse that FXAA and I assume this is the case, since MLAA is supposed to work with depth information and not luma.

About excluding colors: I am not the developer of FXAA itself, so I cannot answer technical questions with absolute certainty. I would say, one can exclude colors with some shader code, but it leads to worse results. To quickly try it out I added a few lines to float4 MyShader( float2 Tex : TEXCOORD0 ).
The lines are:
float3 excludeColor = float3(1,1,1); //exclude white
float3 maxDistance = 0.01; //exclude color interval width
float4 originalColor = tex2D(lumaSampler,Tex);
float3 distance = abs(originalColor.xyz-excludeColor);
if (all(distance <= maxDistance)) { originalColor.w = 1; return originalColor; }
With different color constants for text I got these results (left to right: NOAA, FXAA, FXAA with an excluded color):
http://www.abload.de/thumb/screenshot1179_noaabod3.png (http://www.abload.de/image.php?img=screenshot1179_noaabod3.png) http://www.abload.de/thumb/screenshot887_fxaaiqsh.png (http://www.abload.de/image.php?img=screenshot887_fxaaiqsh.png) http://www.abload.de/thumb/screenshot1304_fxaa_exxpo8.png (http://www.abload.de/image.php?img=screenshot1304_fxaa_exxpo8.png)
There is a different thread about modding the shader, so ask there for a tuned solution.

About GetDepthStencilSurface: I alredy commented on this multiple times.

spajdr
2011-08-16, 13:00:14
Uuuuh. This is an epic fail for MLAA. It looks like 1xAA in some places. But its not so blurry like normalwise on AMD-Systems.
Anyway: FXAA is a nice option in combination with DS (or hires like 2560x1600) - anything else is crap.

bye Hübie

Well from what i seen at that video, MLAA filters noticeably better (for example first game, when dude climbing up the ship on left side its noticeably better with MLAA, but at cost of speed i guess).

It would be better if they make a uncompressed pictures where default picture would be with FXAA and with mouse cursor on picture with MLAA.

Legacyy
2011-08-16, 13:14:28
@Ronny145
ist das eine FXAA Version speziell für GTA IV? Sieht nämlich sehr gut aus :D

Ronny145
2011-08-16, 13:17:49
[some dude]
About Jimenez's MLAA: I also played with the thought wheter to try out Jimenez's MLAA or not. That is why I alrady did some test myself (you can use the precompiled demo at http://www.iryoku.com/mlaa/ to apply Jimenez's MLAA to any picture). The average results were worse that FXAA and I assume this is the case, since MLAA is supposed to work with depth information and not luma.


I tried the DX10 Demo. It works different to AMDs driver MLAA. There is no blurriness at all or only minor Blur. I prefer Jimenez MLAA because AMDs MLAA looks too blurry. But how is it working in motion, this remains unclear.

NoAA
http://www.abload.de/img/noaav5bx.png

Jimenez MLAA
http://www.abload.de/img/jimenezmlaaj0jp.png

AMD MLAA
http://www.abload.de/img/amdmlaan65p.png

FXAA Beta 10
http://www.abload.de/img/beta10n1ss.png

/corrected AMDs screenshot and added FXAA


@Ronny145
ist das eine FXAA Version speziell für GTA IV? Sieht nämlich sehr gut aus :D


Sollte überall funktionieren. Es ist nur so, dass einige Spiele etwas andere settings vertragen weil es weniger blurrt oder mehr blurrt.

Ginger
2011-08-16, 13:20:26
@spajdr:
http://www.hardocp.com/article/2011/07/18/nvidias_new_fxaa_antialiasing_technology/4

Its a FXAA v1 vs ATI MLAA comparison. Unknown if Jimenez's MLAA (the one you/guest refer to) is different to ATI MLAA, so iam not sure if this comparison is a match buy maybe helpful. The full article is very interesting by the way.

*edit*
Ronny´s test did show that ATI MLAA is worse then Jimenez's MLAA. Thanks!
@Ronny145: Can you run this demo with FXAA too? Would be great to compare if possible.

Ronny145
2011-08-16, 14:51:53
Anybody play The Sims 3 and get it to function with FXAA?


I tried Sims 3 and noticed it works. You have to disable Edge Smoothing. It is one of the games which is incompatible with Ingame AA.

NoAA
http://www.abload.de/img/ts3noaa0c50.png

FXAA
http://www.abload.de/img/ts3fxaa1f8l.png

dhwang
2011-08-16, 18:49:10
some dude:

Thank you for reply. But your code seems to replace similar colors with
desired excluded color. That's not what I want. Please see my post in the
following thread. Thanks!

http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8888868#post8888868

Gast
2011-08-17, 00:19:41
@dude, another approach by Dmitry Andreev: DLAA (Directionally Localized Anti-Aliasing)

Video: http://www.youtube.com/watch?v=5MkwyjORy-w
Source Code: http://and.intercon.ru/downloads/dlaa_gdc2011_demo.zip
Website: http://and.intercon.ru/releases/talks/dlaagdc2011/

Gast
2011-08-17, 12:43:01
[some dude]
About DLAA: Thank you, that is one I heard of but couldn't experiment with. Now with the gdc demo I finally see what it produces. Unfortunately it blurs text more than FXAA.
I made a quick comparison (left to right: NOAA, FXAA, DLAA):
http://www.abload.de/thumb/screenshot1179_noaasj72.png (http://www.abload.de/image.php?img=screenshot1179_noaasj72.png) http://www.abload.de/thumb/screenshot1304_fxaa_exz8ia.png (http://www.abload.de/image.php?img=screenshot1304_fxaa_exz8ia.png) http://www.abload.de/thumb/screenshot1179_dlaau8wu.png (http://www.abload.de/image.php?img=screenshot1179_dlaau8wu.png)
Just compare the text at the bottom af the pictures.

Ronny145
2011-08-17, 12:55:05
Not only the text, the whole picture is more blurred similar to AMDs MLAA. How is it in motion? The video suggests it could be better than MLAA.

There are a lot of Post process techniques in the wild.


- AMD MLAA
- Jimenez MLAA
- FXAA
- SRAA
- DLAA

Gast
2011-08-17, 14:21:28
DLAA is loosing details are the edges where it blurs the image, might be good for screens which are placed FAR away and on geometry where there are no details on the edges. But the dithering effect can be easily seen if the screen is nearby (lets say, about the distance of your stretched hand..a Yard), check the details of the rocks and the tree's loosing details and looks like the depth in the screen is lost(the screen appears a bit flat).

The game starwars force unleashed II (2) doesn't have much details near the geometrical edges, so DLAA will work. But in other games, the effect will be bad!!. Need to check with mid level game or do a Post Process using vannila non-AA image from a game.

I bet in 3Dvision DLAA will be bad to look at, blurred (dithered kinda effect emulated to showcase SSAA!) in 3D depth..

Still FXAA looks better.

4Fighting
2011-08-18, 10:07:20
Moin!

Hat jemand ne Idee wie ich das Ganze in Crysis 2 Dx11 ein bisschen noch schärfen kann ? Die Bank und der Mülleimer im 2ten Bild wären z.B. sowas wo es imo noch ein Ticken schärfer sein könnte. Leider blicke ich hier nicht mehr wirklich durch :)

http://www.abload.de/thumb/crysis22011-08-1809-45wu9v.png (http://www.abload.de/image.php?img=crysis22011-08-1809-45wu9v.png)http://www.abload.de/thumb/crysis22011-08-1809-45vur7.png (http://www.abload.de/image.php?img=crysis22011-08-1809-45vur7.png)http://www.abload.de/thumb/crysis22011-08-1809-459u4g.png (http://www.abload.de/image.php?img=crysis22011-08-1809-459u4g.png)http://www.abload.de/thumb/crysis22011-08-1809-456ukp.png (http://www.abload.de/image.php?img=crysis22011-08-1809-456ukp.png)

Ronny145
2011-08-18, 10:10:48
Moin!

Hat jemand ne Idee wie ich das Ganze in Crysis 2 Dx11 ein bisschen noch schärfen kann ? Die Bank und der Mülleimer im 2ten Bild wären z.B. sowas wo es imo noch ein Ticken schärfer sein könnte. Leider blicke ich hier nicht mehr wirklich durch :)



Welche Einstellungen verwendest Du?

http://www.file-upload.net/download-3665734/inject-Beta10_custom_shader_sharpen.zip.html

Versuchs am besten mit Version 1 meiner Version.

4Fighting
2011-08-18, 11:11:47
Welche Einstellungen verwendest Du?

http://www.file-upload.net/download-3665734/inject-Beta10_custom_shader_sharpen.zip.html

Versuchs am besten mit Version 1 meiner Version.

Danke!

sieht schon deutlich angenehmer aus

Gast
2011-08-18, 21:49:05
Danke!

sieht schon deutlich angenehmer aus

Anyone have any luck running this with Deus Ex: Invisible War, or Thief: Deadly Shadows?

I've put the files in every conceivable place, to no effect. log.log doesn't get generated, its like they aren't there.

I would really like to see this work, as it'll be the first time anyone's ever run the game with both AA AND Bloom simultaneously...

Ronny145
2011-08-18, 22:00:09
Anyone have any luck running this with Deus Ex: Invisible War, or Thief: Deadly Shadows?

I've put the files in every conceivable place, to no effect. log.log doesn't get generated, its like they aren't there.

I would really like to see this work, as it'll be the first time anyone's ever run the game with both AA AND Bloom simultaneously...


Are you sure this games are based on DX9?

BeetleatWar1977
2011-08-18, 22:05:54
beides UE2-Engine oder?

Gast
2011-08-18, 23:02:48
Are you sure this games are based on DX9?

http://en.wikipedia.org/wiki/Thief:_Deadly_Shadows

Short answer: Yes. A "Heavily tweaked and modified" Unreal Engine 2 game, requiring DirectX 9.0b at a minimum.

Ronny145
2011-08-18, 23:32:52
I'm not sure, does need FXAA minimum SM3.0 Hardware?


Demo not big in size.

http://www.4players.de//4players.php/download_info/PC-CDROM/Download/6650.html

Gast
2011-08-19, 13:21:25
[some dude]
About Thief: Deadly Shadows: I don't know why it requires DirectX 9.0b but the demo uses DirectX 8.
About hardware: Yes, SM3.0 is required.

Gast
2011-08-19, 18:51:19
[some dude]
About Thief: Deadly Shadows: I don't know why it requires DirectX 9.0b but the demo uses DirectX 8.
About hardware: Yes, SM3.0 is required.

Well. I guess that explains that. Thanks for looking into it, I really appreciate it.

Gast
2011-08-19, 23:18:51
I have run into an odd problem after reinstalling Windows 7.

Whichever game I apply the DX10 DLL for reverts to DX9 mode. If it can't, then the game simply won't launch. DX9 DLL works fine. Both worked fine before reformat.

Do these DLL's require any other redistributables than DirectX to work? Because I was getting an error about Visual C++ runtime when trying to use the DLL with Bioshock 2 DX10. The game still launched but reverted to DX9 as usual. There's no error launching the game without the DLL.

dargo
2011-08-21, 00:58:07
Kann mir einer sagen warum FXAA bei mir nicht in Crysis 1 funktionieren will? Die DX9.dll kopiere ich nach Bin32, den Rest ins Hauptverzeichnis. Funktioniert leider nicht. :(

Maorga
2011-08-21, 01:10:48
wenn dann schon alles in den Bin32

Gast
2011-08-21, 01:28:43
Would it be possible to use this to force an ICC color profile into fullscreen 3D games?

dargo
2011-08-21, 08:09:12
wenn dann schon alles in den Bin32

Geht auch nicht.

BeetleatWar1977
2011-08-21, 08:14:40
Geht auch nicht.
also DX10 ging, hatte ich getestet. Ich probier nachher mal DX9

dargo
2011-08-21, 08:50:32
also DX10 ging, hatte ich getestet.
Wohin hast du die einzelnen Dateien von some dude kopiert?

BeetleatWar1977
2011-08-21, 09:41:01
Wohin hast du die einzelnen Dateien von some dude kopiert?
die DLL nach bin32 und den rest in die root

dargo
2011-08-21, 09:47:15
die DLL nach bin32 und den rest in die root
Hmm... auch schon probiert. Geht bei mir nicht. :( Kann das was mit Mstr Config zu tun haben?

BeetleatWar1977
2011-08-21, 09:48:03
Hmm... auch schon probiert. Geht bei mir nicht. :( Kann das was mit Mstr Config zu tun haben?
evtl - MSAA hast du aber ausgeschalten oder? ;)

DrFreaK666
2011-08-21, 09:56:43
Also gestern hatte ich auch Probleme mit FXAA in Verbindung mit ingame-AA bei Prototype.
Des Rätsels Lösung:
- ingame AA aus
- per nvinspector erzwingen (Antialiasing- Behavior Flags "None")

Wenn man nur die Spiele-einstellung erweitert dann ging FXAA auch nicht

dargo
2011-08-21, 10:01:38
evtl - MSAA hast du aber ausgeschalten oder? ;)
Klar... ist aus.

Edit:
Aber wieso eigentlich die dll nach Bin32? Ich nutze ein 64Bit OS. Nimmt Crysis nicht die Crysis.exe aus Bin64?

BeetleatWar1977
2011-08-21, 10:08:05
Klar... ist aus.

Edit:
Aber wieso eigentlich die dll nach Bin32? Ich nutze ein 64Bit OS. Nimmt Crysis nicht die Crysis.exe aus Bin64?
argh - dann na klar ;D bin64

dargo
2011-08-21, 10:14:17
argh - dann na klar ;D bin64
Geht auch nicht. :mad:

Also:
d3d9dll nach Crysis/Bin64
die anderen 3 Files nach Crysis

funktioniert nicht.

BeetleatWar1977
2011-08-21, 10:15:57
Geht auch nicht. :mad:

Also:
d3d9dll nach Crysis/Bin64
die anderen 3 Files nach Crysis

funktioniert nicht.
starte mal die 32bit exe :D

dargo
2011-08-21, 10:26:18
starte mal die 32bit exe :D
Boah... endlich. :ucrazy4:

d3d9dll nach Crysis/Bin32
die anderen 3 Files nach Crysis

Da war doch was mit 64Bit geht nicht in der Readme von some dude. :uhammer: :D

Ronny145
2011-08-21, 10:27:59
Crysis 1 hatten wir schon öfter, Suchfunktion hätte geholfen.

teezaken
2011-08-21, 11:59:50
ich hoffe wir bekommen FXAA im Treiber noch vor der 300er Treiberfamilie^^

http://www.abload.de/image.php?img=unbenanntuumw.png

fulgore1101
2011-08-24, 18:34:46
Ja funktioniert. Die D3d9 Files einfach in den Hauptordner kopieren. Für GTA4 habe ich gerade ein bisschen ausprobiert. Ohne jetzt alles einzeln aufzudröseln poste ich die Bilder und darunter die fertigen Files zum Download. Version 1 ist etwas schärfer als Version 2.



Danke, aber leider funktioniert das bei mir nicht. Das Spiel flimmert immer noch genauso wie vorher. Muss ich FXAA erst aktivieren oder woran kann das liegen?

GTA IV Retail 1.0.7.0. mit Xliveless
Gtx 460 mit Treiber 280.26
Win 7 64bit

Ronny145
2011-08-24, 19:06:33
Danke, aber leider funktioniert das bei mir nicht. Das Spiel flimmert immer noch genauso wie vorher. Muss ich FXAA erst aktivieren oder woran kann das liegen?



Ich weiß nicht was Du meinst oder ob das nun aktiviert ist oder nicht. In Bewegung hilft FXAA bekanntlich nicht viel.

fulgore1101
2011-08-24, 19:21:56
Ich weiß nicht was Du meinst oder ob das nun aktiviert ist oder nicht. In Bewegung hilft FXAA bekanntlich nicht viel.

Höh? Wozu isses dann da? :confused:

Ronny145
2011-08-24, 19:23:57
Also funktioniert es bei dir nehme ich an, dann wäre das ja geklärt.

fulgore1101
2011-08-24, 19:40:26
Also funktioniert es bei dir nehme ich an, dann wäre das ja geklärt.

Du sprichst in Rätseln.

Grindcore
2011-08-25, 10:13:07
Es ist absolut einfach festzustellen, ob AA aktiv ist oder nicht, einfach eine Diagonale suchen (Möglichst Geometrie und nicht Alphatests), die sich stark kontrastierend vom Hintergrund abhebt und schauen, ob die einzelnen Treppenstufen weichgezeichnet werden. Das ist eigentlich nicht zu übersehen.

Dass Antialiasing nicht unter allen Umständen jegliches Flimmern eliminiert, sollte eigentlich bekannt sein. Selbst mit 8*SGSSAA werden bestimmte Teilbereiche und hochfrequente Shader noch flimmern.

boxleitnerb
2011-08-25, 18:24:51
Welche Einstellungen sind denn mit beta 10 zu empfehlen oder kann man das so wie es ist verwenden?

teezaken
2011-08-25, 21:42:21
Welche Einstellungen sind denn mit beta 10 zu empfehlen oder kann man das so wie es ist verwenden?

bestenfalls je nach spiel anpassen aber ich muss zugeben das ich die werte von beta 10 unverändert für meine games verwende und mit dem ergebnis zufrieden bin zusammen mit DS sieht es ganz schick aus

boxleitnerb
2011-08-25, 22:14:30
Thx. Noch eine Frage:
Ist der Schärfefilter automatisch aktiv? Wie krieg ich das Bild schärfer, so richtig knackig?

Gast
2011-08-26, 04:47:27
Out of curiosity, has anyone tried this with the SW:TOR beta?

teezaken
2011-08-26, 12:13:06
Thx. Noch eine Frage:
Ist der Schärfefilter automatisch aktiv? Wie krieg ich das Bild schärfer, so richtig knackig?

ist nicht automatisch aktiv schärfer bekommste es mit DS oder indem du in der shader.fx datei die Zeile //Replace this line with #include "Sharpen.h" to add a sharpening pass zu #include "Sharpen.h" änderst jedoch kann ich dir nicht verscihern ob wirklich so geht schließlich benutze ich den filter net

boxleitnerb
2011-08-26, 21:04:09
ist nicht automatisch aktiv schärfer bekommste es mit DS oder indem du in der shader.fx datei die Zeile //Replace this line with #include "Sharpen.h" to add a sharpening pass zu #include "Sharpen.h" änderst jedoch kann ich dir nicht verscihern ob wirklich so geht schließlich benutze ich den filter net

Danke :)

Und weil es so schön war :D
Klappt das auch in Crysis 2 DX11 mit dem FXAA? Das glättet bei mir praktisch gar nix. In der Autoexec.cfg ist r_postmsaa=0 drin, die dxgi.dll ist in bin32 und die drei anderen im Crysis 2 Hauptverzeichnis. Pause-Taste macht manche Kanten etwas verwaschener, aber das wars auch schon.

teezaken
2011-08-27, 09:59:39
Danke :)

Und weil es so schön war :D
Klappt das auch in Crysis 2 DX11 mit dem FXAA? Das glättet bei mir praktisch gar nix. In der Autoexec.cfg ist r_postmsaa=0 drin, die dxgi.dll ist in bin32 und die drei anderen im Crysis 2 Hauptverzeichnis. Pause-Taste macht manche Kanten etwas verwaschener, aber das wars auch schon.

leider hab ich kein Crysis 2 von daher kp sry

boxleitnerb
2011-08-27, 10:04:48
Habs zwar zum Laufen gekriegt, aber es bringt so gut wie gar nix. Auch unter DX9 flimmert es munter vor sich her. Auf Screenshots mag es ganz ok aussehen, aber in Bewegung versagt es dann doch häufig. Habs auch in Mafia 2 ausprobiert...gruselig!

OC_Burner
2011-08-27, 12:05:56
Und hier auch nochmal. Auf Standbildern hui, in Bewegung pfui.

Click to play
http://www.oc-burner.de/ftp/Videos/AntiAlias/MLAA/test/thumb___FXAA_MSAA_flickercompare_YV12.jpg (http://www.oc-burner.de/ftp/Videos/AntiAlias/MLAA/test/FXAA_MSAA_flickercompare_YV12.html)

fulgore1101
2011-08-27, 19:15:16
Es ist absolut einfach festzustellen, ob AA aktiv ist oder nicht, einfach eine Diagonale suchen (Möglichst Geometrie und nicht Alphatests), die sich stark kontrastierend vom Hintergrund abhebt und schauen, ob die einzelnen Treppenstufen weichgezeichnet werden. Das ist eigentlich nicht zu übersehen.

Dass Antialiasing nicht unter allen Umständen jegliches Flimmern eliminiert, sollte eigentlich bekannt sein. Selbst mit 8*SGSSAA werden bestimmte Teilbereiche und hochfrequente Shader noch flimmern.

Wie gesagt, GTA IV flimmert noch genauso wie vorher und die FPS sind auch noch wie vorher. Deshalb ja auch meine Verwunderung.

Wozu ist FXAA gut, wenns in Bewegung nichts bringt? Ronny145 will oder kann mir darauf ja keine Antwort geben.

dargo
2011-08-27, 19:27:57
Wozu ist FXAA gut, wenns in Bewegung nichts bringt?
Das ist doch Quatsch. Natürlich bringt FXAA auch in Bewegung was. Ich frage mich was einige hier von FXAA erwarten? Das Wunder-AA fast kostenlos? :| Es ist eine nette Ergänzung zu MSAA (wenns funktioniert) oder zu DS. Nicht mehr und nicht weniger.

Ronny145
2011-08-27, 19:46:37
Und hier auch nochmal. Auf Standbildern hui, in Bewegung pfui.

Click to play
http://www.oc-burner.de/ftp/Videos/AntiAlias/MLAA/test/thumb___FXAA_MSAA_flickercompare_YV12.jpg (http://www.oc-burner.de/ftp/Videos/AntiAlias/MLAA/test/FXAA_MSAA_flickercompare_YV12.html)


Auf dem mülligen Notebook LCD kann ich das nicht so genau beurteilen. Scheint aber so zu sein wie ich dachte. Zu 2xMSAA kann es ein Ersatz sein, ab 4xMSAA ist dieses zu bevorzugen. Es kommt natürlich stark aufs Spiel an. Gegen eine Flimmerhölle wie Arcania bringt es quasi in Bewegung nichts. In langsameren Spielen (Adventures, Strategie) hat es größere Vorteile. Vor allem bei etwas älteren. Tropico 4 wäre ein aktuelles Strategie-Beispiel. Bei Dirt 2 ist es so, dass das Fahrzeug auch während der Fahrt ziemlich sauber aussieht. Ein allgemeines "bringt nichts" ist nicht korrekt. Selbst bei GTA4 nicht. Indoor wirkt um einiges ruhiger und sauberer.

Madcom
2011-08-27, 20:25:39
Hallo

Gibt es auch die möglichkeit unter OGL nach zu schärfen?
Lese hier immer nur DX9 und DX10.


mfg

fulgore1101
2011-08-28, 12:04:29
Das ist doch Quatsch. Natürlich bringt FXAA auch in Bewegung was.

Die Aussage stammt nicht von mir, sondern von Ronny145. Deshalb ja auch meine Frage. Aber wie gesagt, in GTA IV kann ich keinen Unterschied feststellen. Entweder es läuft bei mir nicht, oder es bringt bei diesem Spiel keine Besserung. :uponder:

dargo
2011-08-28, 12:25:32
Die Aussage stammt nicht von mir, sondern von Ronny145. Deshalb ja auch meine Frage. Aber wie gesagt, in GTA IV kann ich keinen Unterschied feststellen. Entweder es läuft bei mir nicht, oder es bringt bei diesem Spiel keine Besserung. :uponder:
Zu GTA IV kann ich nichts sagen, noch nicht getestet. Ich kann mich nicht überwinden das Spiel nochmal anzufassen. Hab mich damals vom Hype mitreißen lassen und jetzt liegt es in der Ecke rum obwohl ich noch nicht mal die Hälfte durch habe. :ugly: Vielleicht liegts ja auch nur an der Jahreszeit, irgendwie keine Lust momentan zu spielen. Aber ich kanns ja bei Gelegenheit mal antesten.

Gast
2011-08-28, 12:54:38
Die Aussage stammt nicht von mir, sondern von Ronny145. Deshalb ja auch meine Frage. Aber wie gesagt, in GTA IV kann ich keinen Unterschied feststellen. Entweder es läuft bei mir nicht, oder es bringt bei diesem Spiel keine Besserung. :uponder:

Dann läuft es nicht, ist einer der Spiels wo es sofort ins Auge fällt, drück doch mal die Drucktaste ob im Gameverzeichniß ein png liegt.

fulgore1101
2011-08-28, 19:27:51
Zu GTA IV kann ich nichts sagen, noch nicht getestet. Ich kann mich nicht überwinden das Spiel nochmal anzufassen. Hab mich damals vom Hype mitreißen lassen und jetzt liegt es in der Ecke rum obwohl ich noch nicht mal die Hälfte durch habe. :ugly: Vielleicht liegts ja auch nur an der Jahreszeit, irgendwie keine Lust momentan zu spielen. Aber ich kanns ja bei Gelegenheit mal antesten.

Ich habs bisher nichtmal 2 Stunden ausgehalten. Ich bin nicht sonderlich empfindlich was Aliasing angeht, aber GTA IV ist zu viel des "Guten"!

Dann läuft es nicht, ist einer der Spiels wo es sofort ins Auge fällt, drück doch mal die Drucktaste ob im Gameverzeichniß ein png liegt.

Getan, aber es ist keine png im Hauptordner. Was bedeutet das jetzt?

BeetleatWar1977
2011-08-28, 19:29:19
Getan, aber es ist keine png im Hauptordner. Was bedeutet das jetzt?

das es nicht läuft ;)

fulgore1101
2011-08-28, 19:49:40
das es nicht läuft ;)

Hmm...ist was verkehrt oder lässt sich FXAA in verschiedenen Stufen einstellen?

#define FXAA_PC 1
#define FXAA_HLSL_3 1
//#define FXAA_GREEN_AS_LUMA 1
#define FXAA_QUALITY__PRESET 39
//#define FXAA_QUALITY__PRESET 12

#include "Fxaa3_11.h"
uniform extern texture gScreenTexture;
uniform extern texture gLumaTexture;

//Difinitions: BUFFER_WIDTH, BUFFER_HEIGHT, BUFFER_RCP_WIDTH, BUFFER_RCP_HEIGHT

sampler screenSampler = sampler_state
{
Texture = <gScreenTexture>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = POINT;
AddressU = BORDER;
AddressV = BORDER;
SRGBTexture = FALSE;
};
sampler lumaSampler = sampler_state
{
Texture = <gLumaTexture>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = BORDER;
AddressV = BORDER;
SRGBTexture = FALSE;
};

#include "Sharpen.h"

float4 LumaShader( float2 Tex : TEXCOORD0 ) : COLOR0
{
#ifdef USE_ADDITIONAL_SHADER
float4 c0 = main(Tex);
#else
float4 c0 = tex2D(screenSampler,Tex);
#endif
//c0.w = dot(c0.xyz,float3(0.299, 0.587, 0.114)); //store luma in alpha
c0.w = sqrt(dot(c0.xyz,float3(0.150, 0.296, 0.228))); //store luma in alpha
return c0;
}

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 c0 = FxaaPixelShader(
Tex, //pos
0, //fxaaConsolePosPos (?)
lumaSampler, //tex
lumaSampler, //fxaaConsole360TexExpBiasNegOne
lumaSampler, //fxaaConsole360TexExpBiasNegTwo
float2(BUFFER_RCP_WIDTH, BUFFER_RCP_HEIGHT), //fxaaQualityRcpFrame
float4(-0.5*BUFFER_RCP_WIDTH,-0.5*BUFFER_RCP_HEIGHT,0.5*BUFFER_RCP_WIDTH,0.5*BUFFER_RCP_HEIGHT), //fxaaConsoleRcpFrameOpt
float4(-2.0*BUFFER_RCP_WIDTH,-2.0*BUFFER_RCP_HEIGHT,2.0*BUFFER_RCP_WIDTH,2.0*BUFFER_RCP_HEIGHT), //fxaaConsoleRcpFrameOpt2
float4(8.0*BUFFER_RCP_WIDTH,8.0*BUFFER_RCP_HEIGHT,-4.0*BUFFER_RCP_WIDTH,-4.0*BUFFER_RCP_HEIGHT), //fxaaConsole360RcpFrameOpt2
0.75, //fxaaQualitySubpix (default: 0.75)
0.080, //fxaaQualityEdgeThreshold
0.0725, //fxaaQualityEdgeThresholdMin
8.0, //fxaaConsoleEdgeSharpness
0.125, //fxaaConsoleEdgeThreshold
0.05, //fxaaConsoleEdgeThresholdMin
0 //fxaaConsole360ConstDir
);
c0.w = 1;

Ronny145
2011-08-28, 20:01:25
Hmm...ist was verkehrt oder lässt sich FXAA in verschiedenen Stufen einstellen?



Das ist eine meiner Configs mit Shader und Sharpen. Mir leuchtet ein wo das Problem liegt. Dir fehlt wahrscheinlich die d3d9.dll und Fxaa3_11.h aus der Beta10.

fulgore1101
2011-08-28, 20:05:25
Das ist eine meiner Configs mit Shader und Sharpen. Mir leuchtet ein wo das Problem liegt. Dir fehlt wahrscheinlich die d3d9.dll und Fxaa3_11.h aus der Beta10.

Ja, die Config stammt von dir. Du hattest mir ein Paket geschnürt. Für DX9 waren 2 Datein enthalten: shader.fx und Sharpen.h. Benötige ich noch mehr Datein? Könntest du mir die noch hochladen?

Ronny145
2011-08-28, 20:11:17
Ja, die Config stammt von dir. Du hattest mir ein Paket geschnürt. Für DX9 waren 2 Datein enthalten: shader.fx und Sharpen.h. Benötige ich noch mehr Datein? Könntest du mir die noch hochladen?


Auf Seite 1 gibt es die Beta10. Mein Paket enthält die beiden relevanten Config Dateien, mehr soll es auch nicht sein. Die dll und Fxaa3 aus der letzten Beta ist doch immer die gleiche.

fulgore1101
2011-08-28, 20:35:52
Auf Seite 1 gibt es die Beta10. Mein Paket enthält die beiden relevanten Config Dateien, mehr soll es auch nicht sein. Die dll und Fxaa3 aus der letzten Beta ist doch immer die gleiche.

Ah danke, jetzt funzt es. Wenn du mir jetzt noch verrätst, ob und wie sich FXAA in verschiedenen Stufen regeln lässt, bin ich zufrieden. :)

Ronny145
2011-08-28, 20:49:34
Was stellst Du dir darunter vor? Mir ist nicht klar was genau Du regeln willst.

fulgore1101
2011-08-28, 21:16:27
Was stellst Du dir darunter vor? Mir ist nicht klar was genau Du regeln willst.

Ich meine ob es möglich ist, FXAA in verschiedenen Stufen einzustellen wie man es z.B. mit MSAA kann. 2x, 4x usw... Oder gibts bei FXAA einfach nur aktiviert bzw. deaktiviert?

Ronny145
2011-08-28, 21:27:17
Ich meine ob es möglich ist, FXAA in verschiedenen Stufen einzustellen wie man es z.B. mit MSAA kann. 2x, 4x usw... Oder gibts bei FXAA einfach nur aktiviert bzw. deaktiviert?


Es gibt nur an oder aus. Natürlich kann man die Qualität senken mit den Presets, nur macht das normalerweise kein Sinn. Höchstens für Intel IGPs. Preset 39 ist Standard eingestellt und bietet die höchste Qualität. Preset 10 die geringste.

v00d00m4n
2011-09-04, 16:37:11
I would like to request Some_dude to fix both DX10 and DX9 injectors to make them compatible with Xfire overlay hook, so millions of X-fire users could use this injector and still chat in game, make screenshots and record videos.

At the moment whenever Xfire tries to hook its xfire_toucan_44507.dll to launched game, its collides with fake d3d9.dll or d3d10.dll hookers and causing any game to crash to desktop.

There is another tool like this Raptr, it may have same type of crash.

Some_dude please investigate this issue and try both tools from xfire.com and raptr.com with your hook.

Another fix i would like to discuss and request:
Why postfx shaders should be applied to whole scene, including 2d huds and overlays?
Cant you simply rewrite you dll a little, to let it apply post fx only on 3d geometry, but not on 2d overlays? Im sure there are dozens of methods how to inject shaders before game engines starts to render 2d overlay over 3d geometry.

They way to fix text blur via shader itself seems pretty dull, this shader is not designed to be applied over whole rendered scene, its only designed for 3d geometry.

Well im not saying you need to replace current technique completely, but you can at least add alternate experimental technique which will try to apply shader before 2d overlays drawn, with ability to switch back to old method of whole screen post-fx.

thank you!

Gast
2011-09-05, 15:45:56
Another fix i would like to discuss and request:
Why postfx shaders should be applied to whole scene, including 2d huds and overlays?

Cant you simply rewrite you dll a little, to let it apply post fx only on 3d geometry, but not on 2d overlays? Im sure there are dozens of methods how to inject shaders before game engines starts to render 2d overlay over 3d geometry.

They way to fix text blur via shader itself seems pretty dull, this shader is not designed to be applied over whole rendered scene, its only designed for 3d geometry.

Well im not saying you need to replace current technique completely, but you can at least add alternate experimental technique which will try to apply shader before 2d overlays drawn, with ability to switch back to old method of whole screen post-fx.
thank you!

not possible.

Its called Post Processing for a reason.

Swartz
2011-09-07, 01:43:49
First of all, I apologize for English.

I have successfully created my own injector/wrapper DLL and was curious how you went about implementing the addition of new shaders as well as FXAA.

If you would be willing to point me to some tutorials, share some of your code (I would not distribute it, it would be for my own usage), or any other advice you'd be willing to give me I would be extremely grateful.

My email is jketiynu@yahoo.com

Thank you for your time.

Gast
2011-09-08, 13:24:42
First of all, I apologize for English.

I have successfully created my own injector/wrapper DLL and was curious how you went about implementing the addition of new shaders as well as FXAA.

If you would be willing to point me to some tutorials, share some of your code (I would not distribute it, it would be for my own usage), or any other advice you'd be willing to give me I would be extremely grateful.

My email is jketiynu@yahoo.com

Thank you for your time.

Wow so you're asking for help but not share any of your work or at least infos on it? :facepalm:

Swartz
2011-09-08, 21:04:03
Wow so you're asking for help but not share any of your work or at least infos on it? :facepalm:

I'm willing to give you the entire source code. I never implied otherwise.

In terms of what I am doing, my goal is to have the injector display a shader from a directory and overlay it on the screen. I've seen examples of doing this when making a program from scratch or adding to a project, but I'm unaware of how to do this with an injector/wrapper. That's where I was hoping for a little help.

I apologize for not being more clear in my original post.

Gast
2011-09-22, 13:53:56
@some dude:


Have you tried SMAA? (Enhanced Subpixel Morphological Antialiasing)

http://www.iryoku.com/smaa/

Source code is available.

http://s1.directupload.net/images/110922/wt2aex6w.png

spajdr
2011-09-23, 13:07:27
That SMAA looks interesting, is it possible by someone to make it work in similar way as FXAA Inject works?

bais
2011-09-25, 00:28:28
@some dude

Tried your injector and it works fine but...

I'm using a laptop with optimus, and unfortunately the DirectX9 version of the injector causes a bug. The game ALWAYS launches with Integrated graphics, no matter what settings I set in the Nvidia Control Panel. When I delete the injector files, game works with Nvidia video card.

Apparently the d3d9.dll of your injector messes up with Optimus, I tried the DX10 one and it works fine for the few Direct X 10 games that exists.


So, is it possible to fix this issue somehow?

Thank you for your awesome job!


PS: Sorry if my english isn't good

Gast
2011-09-25, 17:06:42
I heared that SMAA (Enhanced Subpixel Morphological Antialiasing) is the best post process AA in oblivion, because it fixes some problems of MLAA, it just needs more memory bandwidth, but it should still have a good Performance with good Quality maybe someone could try it or post some screens of oblivion with it

Ronny145
2011-09-25, 17:12:49
Here the PDF with some samples: http://www.iryoku.com/smaa/downloads/SMAA-Enhanced-Subpixel-Morphological-Antialiasing.pdf

Looks interesting. Can you look into it some dude?

dargo
2011-10-02, 15:20:06
Hat schon jemand es geschafft FXAA in Verbindung mit der BF3 Beta zum Laufen zu bringen? Bei mir funktioniert es leider nicht. :(

Ronny145
2011-10-02, 22:47:52
Inwiefern geht nicht? Kein log file?

dargo
2011-10-02, 23:27:25
Inwiefern geht nicht? Kein log file?
Naja... es greift halt kein Antialiasing. Zum Logfile müsstest du mir mehr Angaben geben. So genau kenne ich mich mit FXAA nun auch nicht aus. Ich weiß nur, dass man die Files da reinkopieren soll wo die Exe liegt.

sapito
2011-10-03, 00:55:27
Ich weiß nur, dass man die Files da reinkopieren soll wo die Exe liegt.

falls es greift, ist da ein log file drin.

Döner-Ente
2011-10-03, 16:21:55
@Dargo:

1. Nochmal nachschauen, ob du die richtigen Files (DX9 vs. DX10/11) kopiert hast,
2. Manche Spiele brauchen die Shader-Files in einem anderen Ordner. Erstmal alles in den Ordner kopieren, wo die Exe liegt, Spiel starten+beenden und dann schauen, ob in dem Ordner eine log.log-Datei ist. Falls nein, den gesamten BF3-Ordner nach der Datei durchsuchen und mal die Shader-Files (also alle außer der DLL) in den Ordner verschieben, wo die log.log gefunden wurde.

Ronny145
2011-10-03, 17:08:32
http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8880382#post8880382


In BC2, um FXAA unter DX11 zu aktivieren, musste man das Downsampling Tool anwerfen. Vielleicht hilft das in BF3.

Gast
2011-10-03, 18:09:14
Ist eigentlich bekannt ob das in Bad Company 2 probleme macht im Zusammenhang mit punkbuster? Bekanntlich sind dll hooks ja bannbar.

dargo
2011-10-03, 19:25:26
@Dargo:

1. Nochmal nachschauen, ob du die richtigen Files (DX9 vs. DX10/11) kopiert hast,
2. Manche Spiele brauchen die Shader-Files in einem anderen Ordner. Erstmal alles in den Ordner kopieren, wo die Exe liegt, Spiel starten+beenden und dann schauen, ob in dem Ordner eine log.log-Datei ist. Falls nein, den gesamten BF3-Ordner nach der Datei durchsuchen und mal die Shader-Files (also alle außer der DLL) in den Ordner verschieben, wo die log.log gefunden wurde.
Danke...

habe alle Files von some dude (d3d10) in den Hauptordner kopiert. Spiel gestartet und wieder beendet. Die log.log liegt ebenfalls im Hauptordner.
redirecting CreateDXGIFactory1
redirecting IDXGIFactory1->CreateSwapChain
redirecting CreateDXGIFactory
redirecting IDXGIFactory->CreateSwapChain
redirecting IDXGIFactory1->CreateSwapChain
redirecting CreateDXGIFactory1
redirecting IDXGIFactory->CreateSwapChain
redirecting IDXGIFactory1->CreateSwapChain
redirecting IDXGIFactory->CreateSwapChain
redirecting IDXGIFactory1->CreateSwapChain

Was sagt mir das jetzt? :confused:

Gast
2011-10-04, 20:42:07
bekommt es einer unter Dungeon Siege 3 zum laufen?

Ronny145
2011-10-04, 20:43:49
bekommt es einer unter Dungeon Siege 3 zum laufen?


Nichts zu machen.

http://www.forum-3dcenter.org/vbulletin/showpost.php?p=8885501&postcount=598

boxleitnerb
2011-10-04, 20:44:33
Gibts eigentlich Hoffnung, dass eine überall funktionierende Version im NV-Treiber kommt?

Blaire
2011-10-04, 20:59:51
Gibts eigentlich Hoffnung, dass eine überall funktionierende Version im NV-Treiber kommt?

Jo kommt.
http://forums.nvidia.com/index.php?showtopic=211130&view=findpost&p=1303005

Gast
2011-10-04, 21:01:05
Gibts eigentlich Hoffnung, dass eine überall funktionierende Version im NV-Treiber kommt?Weißt doch, wie das mit NV ist: Wenn genug Nachfrage demonstriert wird, dann setzen sie es auf ihre Angebotsliste.

Haben ja genug Bildqualitäts-Lobbyisten unter uns, die schon mehrfach erfolgreich waren.
Nur ob man die auch für sowas doch eher halbgares wie FXAA ausreichend motiviert bekommt, das wäre ne andere Frage.
Andererseits, FXAA als günstiger Qualitätsbooster für teures Downsampling, damit dürfte sich genügend Aufmerksamkeit generieren lassen...
...und zwar für beides!!! :uup:

boxleitnerb
2011-10-04, 21:49:20
Weißt doch, wie das mit NV ist: Wenn genug Nachfrage demonstriert wird, dann setzen sie es auf ihre Angebotsliste.

Haben ja genug Bildqualitäts-Lobbyisten unter uns, die schon mehrfach erfolgreich waren.
Nur ob man die auch für sowas doch eher halbgares wie FXAA ausreichend motiviert bekommt, das wäre ne andere Frage.
Andererseits, FXAA als günstiger Qualitätsbooster für teures Downsampling, damit dürfte sich genügend Aufmerksamkeit generieren lassen...
...und zwar für beides!!! :uup:

Exakt. Downsampling alleine ist oft nicht ausreichend. FXAA alleine ist natürlich auch Mist. Aber zusammen ist es dann erträglich, wenn schon kein SGSSAA geht.

thx@Blaire. Hat auch lang genug gedauert :)

Hübie
2011-10-04, 23:07:23
Wie ändere ich die Tastenbelegung und wie deaktiviere ich diese screenshot-Funktion??? Die Pause-Taste zu wählen war mMn nicht sehr weise.

Raff
2011-10-11, 20:54:41
Gibt's mittlerweile eine funktionierende Möglichkeit für Arghania? =)

MfG,
Raff

Ronny145
2011-10-11, 21:12:04
Gibt's mittlerweile eine funktionierende Möglichkeit für Arghania? =)

MfG,
Raff


Schon lange. Beta 10 ist kompatibel. Eine Anpassung wäre noch empfehlenswert damit es nicht ganz so blurrt.

http://www.forum-3dcenter.org/vbulletin/showthread.php?p=8887790#post8887790

Zwei fertige Configs mit Sharpen Filter. Arcania als Flimmerhölle ist für FXAA in Bewegung too much, könnte dafür mit Downsampling gut harmonieren.

Raff
2011-10-11, 23:40:00
Schaut aber deutlich besser aus als "nackig". Besten Dank. =)

MfG,
Raff

Blaire
2011-10-12, 00:00:38
Im Zusammenspiel mit scharfen Treiber-Downsampling ist es vieleicht sogar empfehlenswert, den Schärfefilter wegzulassen, gerade bei 3840x2160 das Bild wirkt dann etwas zu scharf in Gothic: Arcania. Nur so als Tip vieleicht. :wink:

Ronny145
2011-10-12, 05:25:17
Ich habe das immer ohne Downsampling getestet, kann natürlich sein das es mit DS kein sharpen braucht. Wobei ich das sharpen schon eher dezent eingestellt habe.

Gast
2011-10-15, 14:00:16
Hat sich mal einer an Rage versucht?

Gast
2011-10-15, 14:16:06
Hat sich mal einer an Rage versucht?


Inject FXAA geht nicht mit OpenGL.

Raff
2011-10-15, 14:16:39
Guter Punkt – FXAA lässt sich für OGL doch einfach im Nvidia Inspector einschalten (http://www.pcgameshardware.de/aid,832856/FXAA-fuer-Geforce-Grafikkarten-So-aktivieren-Sie-den-neuen-AA-Modus-schon-jetzt/Grafikkarte/Test/).

MfG,
Raff

Gast
2011-10-15, 15:12:50
Danke sehr some dude ;) amazing work.

Gast
2011-10-15, 23:07:13
Guter Punkt – FXAA lässt sich für OGL doch einfach im Nvidia Inspector einschalten (http://www.pcgameshardware.de/aid,832856/FXAA-fuer-Geforce-Grafikkarten-So-aktivieren-Sie-den-neuen-AA-Modus-schon-jetzt/Grafikkarte/Test/).

MfG,
Raff

ganz lustig das ganze, bei aktiv.erscheint links oben ein grüner Würfel...auf override erscheint inGame nur rechts oben ein Fenster zum im Bild sieht es so aus als wäre es über den ganzen Bildschirm.
http://www.abload.de/thumb/rage2011-10-1522-59-ov1pk0.png (http://www.abload.de/image.php?img=rage2011-10-1522-59-ov1pk0.png)

http://www.abload.de/thumb/rage2011-10-1523-04-encqt6.png (http://www.abload.de/image.php?img=rage2011-10-1523-04-encqt6.png)

QuadReaktor
2011-10-22, 09:11:38
Guter Punkt – FXAA lässt sich für OGL doch einfach im Nvidia Inspector einschalten (http://www.pcgameshardware.de/aid,832856/FXAA-fuer-Geforce-Grafikkarten-So-aktivieren-Sie-den-neuen-AA-Modus-schon-jetzt/Grafikkarte/Test/).

MfG,
Raff

Ich habe die Option garnicht in meinem Inspector !? Liegt das an meinem Treiber ??

http://saved.im/mtkxndixnmnh/0185681.jpg


Edit.

Ok lag am Treiber :) Aber der grüne Würfel nervt !! Wie bekommt man den weg ?

teezaken
2011-10-22, 13:31:11
Ok lag am Treiber :) Aber der grüne Würfel nervt !! Wie bekommt man den weg ?

Leider gar net soweit ich weiß.
hat sich schon jemand mal das hier genauer betrachtet oder lohnt es sich nicht im Vergleich zu FXAA?

http://www.iryoku.com/smaa/

QuadReaktor
2011-10-22, 15:50:51
Ich hab mir den Betatreiber geladen/installiert (285.38-desktop-win7-winvista-64bit-international-beta) aber mit dem Treiber hab ich bei Rage so eine komischen verzerrte Linie im Bild, hab ihn deshalb wieder deinstalliert.

Ronny145
2011-10-22, 15:53:44
Leider gar net soweit ich weiß.
hat sich schon jemand mal das hier genauer betrachtet oder lohnt es sich nicht im Vergleich zu FXAA?

http://www.iryoku.com/smaa/


Qualitativ soll es besser sein, in Oblivion kann man das austesten. Es müsste sich aber erstmal jemand finden, der so einen Injector schreiben kann.

DrFreaK666
2011-10-22, 17:56:55
Qualitativ soll es besser sein, in Oblivion kann man das austesten. Es müsste sich aber erstmal jemand finden, der so einen Injector schreiben kann.

Da das Thema leider so gut wie tot zu sein scheint, kann man wohl ewig drauf warten.
Ausser AMD/NV fügen es in die Treiber ein. Das wäre die Beste Lösung. Zum "normalen" MSAA/CSAA etc. noch alle möglichen PP-AAs einfügen :biggrin:
Von mir aus nur versteckt über den inspector verfügbar

Ronny145
2011-10-22, 18:00:05
Da das Thema leider so gut wie tot zu sein scheint, kann man wohl ewig drauf warten.

Es könnte ja auch sein, dass der Entwickler selber einen Injector schreibt.

DrFreaK666
2011-10-22, 18:43:04
Es könnte ja auch sein, dass der Entwickler selber einen Injector schreibt.

Wie realistisch ist das? Welcher Entwickler hat das bisher getan?
Möglicherweise wäre es über den Umweg enbseries möglich, kenne mich da aber zu wenig aus um das wirkolich beurteilen zu können.
BeetleatWar1977, bist du hier noch unterwegs?? ;)

Blaire
2011-10-22, 18:53:37
Ich hab mir den Betatreiber geladen/installiert (285.38-desktop-win7-winvista-64bit-international-beta) aber mit dem Treiber hab ich bei Rage so eine komischen verzerrte Linie im Bild, hab ihn deshalb wieder deinstalliert.

Du hättest das AF auf Application Controlled stellen sollen.

QuadReaktor
2011-10-22, 19:47:14
Was wäre dann gewesen ? Kein Bildfehler ? Das steht doch automatisch auf Application Controlled.

Blaire
2011-10-22, 19:50:48
Was wäre dann gewesen ? Kein Bildfehler ? Das steht doch automatisch auf Application Controlled.

Ok dann halt Vsync auf enabled und die Linie wäre verschwunden. :wink:

QuadReaktor
2011-10-22, 19:53:35
Hab ich versucht daran lag es auch nicht ! Die Linien haben auch nicht so ausgesehen als wären sie von der Vsync. Und die Linie war immer da, nicht nur während der Bewegung, und breiter war sie auch.

Blaire
2011-10-22, 19:58:17
Hab ich versucht daran lag es auch nicht ! Die Linien haben auch nicht so ausgesehen als wären sie von der Vsync.

Das Game hat dermaßen viele Bugs das könnte alles Mögliche sein. Ein Screenshot und/oder Savegame wäre ganz hilfreich gewesen.

QuadReaktor
2011-10-22, 20:02:47
Vielleicht werde ich es nochmal versuchen, aber der Würfel beim FXAA nervt und FXAA war eigentlich der einzige Grund warum ich den neuen Treiber installiert habe.

Blaire
2011-10-22, 20:11:05
Vielleicht werde ich es nochmal versuchen, aber der Würfel beim FXAA nervt und FXAA war eigentlich der einzige Grund warum ich den neuen Treiber installiert habe.

Da kommt dieses Jahr noch ein Treiber der FXAA offiziell ermöglicht, sicherlich dann ohne diesen Würfel (bei Brink nervte mich der auch, kann das gut nachvollziehn.)

OC_Burner
2011-10-22, 21:17:43
Leider gar net soweit ich weiß.
hat sich schon jemand mal das hier genauer betrachtet oder lohnt es sich nicht im Vergleich zu FXAA?

http://www.iryoku.com/smaa/

Lohnt sich sehr im Vergleich zu FXAA. Mit dem "SMAADepthEdgeDetectionPS"-Verfahren entsteht entsteht auch keine Unschärfe bei den Texturen.

Ist jemand so schlau und kann die SMAA.fx aus dem Unterordner "iryoku-smaa-14b0408\Demo\DX9\Shaders" so umschreiben das sie mit dem FXAAinjector funktioniert? Die Datei nach shader.fx umzubennen liefert zwar keine Fehlermeldungen in der log.log Datei aber es wird nichts geglättet

smaa.fx
/**
* Copyright (C) 2011 Jorge Jimenez (jorge@iryoku.com)
* Copyright (C) 2011 Belen Masia (bmasia@unizar.es)
* Copyright (C) 2011 Jose I. Echevarria (joseignacioechevarria@gmail.com)
* Copyright (C) 2011 Fernando Navarro (fernandn@microsoft.com)
* Copyright (C) 2011 Diego Gutierrez (diegog@unizar.es)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the following disclaimer
* in the documentation and/or other materials provided with the
* distribution:
*
* "Uses SMAA. Copyright (C) 2011 by Jorge Jimenez, Jose I. Echevarria,
* Belen Masia, Fernando Navarro and Diego Gutierrez."
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of the copyright holders.
*/


/**
* Setup mandatory defines. Use a real macro here for maximum performance!
*/
#ifndef SMAA_PIXEL_SIZE // It's actually set on runtime, this is for compilation time syntax checking.
#define SMAA_PIXEL_SIZE float2(1.0 / 1280.0, 1.0 / 720.0)
#endif

/**
* This can be ignored; its purpose is to support interactive custom parameter
* tweaking.
*/
float threshold;
float maxSearchSteps;
float maxSearchStepsDiag;

#ifdef SMAA_PRESET_CUSTOM
#define SMAA_THRESHOLD threshold
#define SMAA_MAX_SEARCH_STEPS maxSearchSteps
#define SMAA_MAX_SEARCH_STEPS_DIAG maxSearchStepsDiag
#define SMAA_FORCE_DIAGONALS 1
#endif

// Set the HLSL version:
#define SMAA_HLSL_3 1

// And include our header!
#include "SMAA.h"


/**
* Input vars and textures.
*/

texture2D colorTex2D;
texture2D depthTex2D;
texture2D edgesTex2D;
texture2D blendTex2D;
texture2D areaTex2D;
texture2D searchTex2D;


/**
* DX9 samplers.
*/
sampler2D colorTex {
Texture = <colorTex2D>;
AddressU = Clamp; AddressV = Clamp;
MipFilter = Point; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = true;
};

sampler2D colorTexG {
Texture = <colorTex2D>;
AddressU = Clamp; AddressV = Clamp;
MipFilter = Linear; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = false;
};

sampler2D depthTex {
Texture = <depthTex2D>;
AddressU = Clamp; AddressV = Clamp;
MipFilter = Linear; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = false;
};

sampler2D edgesTex {
Texture = <edgesTex2D>;
AddressU = Clamp; AddressV = Clamp;
MipFilter = Linear; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = false;
};

sampler2D blendTex {
Texture = <blendTex2D>;
AddressU = Clamp; AddressV = Clamp;
MipFilter = Linear; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = false;
};

sampler2D areaTex {
Texture = <areaTex2D>;
AddressU = Clamp; AddressV = Clamp; AddressW = Clamp;
MipFilter = Linear; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = false;
};

sampler2D searchTex {
Texture = <searchTex2D>;
AddressU = Clamp; AddressV = Clamp; AddressW = Clamp;
MipFilter = Point; MinFilter = Point; MagFilter = Point;
SRGBTexture = false;
};


/**
* Function wrappers
*/
void DX9_SMAAEdgeDetectionVS(inout float4 position : POSITION,
inout float2 texcoord : TEXCOORD0,
out float4 offset[2] : TEXCOORD1) {
SMAAEdgeDetectionVS(position, position, texcoord, offset);
}

void DX9_SMAABlendWeightCalculationVS(inout float4 position : POSITION,
inout float2 texcoord : TEXCOORD0,
out float2 pixcoord : TEXCOORD1,
out float4 offset[3] : TEXCOORD2) {
SMAABlendWeightCalculationVS(position, position, texcoord, pixcoord, offset);
}

void DX9_SMAANeighborhoodBlendingVS(inout float4 position : POSITION,
inout float2 texcoord : TEXCOORD0,
out float4 offset[2] : TEXCOORD1) {
SMAANeighborhoodBlendingVS(position, position, texcoord, offset);
}


float4 DX9_SMAALumaEdgeDetectionPS(float4 position : SV_POSITION,
float2 texcoord : TEXCOORD0,
float4 offset[2] : TEXCOORD1,
uniform SMAATexture2D colorGammaTex) : COLOR {
return SMAALumaEdgeDetectionPS(texcoord, offset, colorGammaTex);
}

float4 DX9_SMAAColorEdgeDetectionPS(float4 position : SV_POSITION,
float2 texcoord : TEXCOORD0,
float4 offset[2] : TEXCOORD1,
uniform SMAATexture2D colorGammaTex) : COLOR {
return SMAAColorEdgeDetectionPS(texcoord, offset, colorGammaTex);
}

float4 DX9_SMAADepthEdgeDetectionPS(float4 position : SV_POSITION,
float2 texcoord : TEXCOORD0,
float4 offset[2] : TEXCOORD1,
uniform SMAATexture2D depthTex) : COLOR {
return SMAADepthEdgeDetectionPS(texcoord, offset, depthTex);
}

float4 DX9_SMAABlendingWeightCalculationPS(float4 position : SV_POSITION,
float2 texcoord : TEXCOORD0,
float2 pixcoord : TEXCOORD1,
float4 offset[3] : TEXCOORD2,
uniform SMAATexture2D edgesTex,
uniform SMAATexture2D areaTex,
uniform SMAATexture2D searchTex) : COLOR {
return SMAABlendingWeightCalculationPS(texcoord, pixcoord, offset, edgesTex, areaTex, searchTex);
}

float4 DX9_SMAANeighborhoodBlendingPS(float4 position : SV_POSITION,
float2 texcoord : TEXCOORD0,
float4 offset[2] : TEXCOORD1,
uniform SMAATexture2D colorTex,
uniform SMAATexture2D blendTex) : COLOR {
return SMAANeighborhoodBlendingPS(texcoord, offset, colorTex, blendTex);
}


/**
* Time for some techniques!
*/
technique LumaEdgeDetection {
pass LumaEdgeDetection {
VertexShader = compile vs_3_0 DX9_SMAAEdgeDetectionVS();
PixelShader = compile ps_3_0 DX9_SMAALumaEdgeDetectionPS(colorTexG);
ZEnable = false;
SRGBWriteEnable = false;
AlphaBlendEnable = false;

// We will be creating the stencil buffer for later usage.
StencilEnable = true;
StencilPass = REPLACE;
StencilRef = 1;
}
}

technique ColorEdgeDetection {
pass ColorEdgeDetection {
VertexShader = compile vs_3_0 DX9_SMAAEdgeDetectionVS();
PixelShader = compile ps_3_0 DX9_SMAAColorEdgeDetectionPS(colorTexG);
ZEnable = false;
SRGBWriteEnable = false;
AlphaBlendEnable = false;

// We will be creating the stencil buffer for later usage.
StencilEnable = true;
StencilPass = REPLACE;
StencilRef = 1;
}
}

technique DepthEdgeDetection {
pass DepthEdgeDetection {
VertexShader = compile vs_3_0 DX9_SMAAEdgeDetectionVS();
PixelShader = compile ps_3_0 DX9_SMAADepthEdgeDetectionPS(depthTex);
ZEnable = false;
SRGBWriteEnable = false;
AlphaBlendEnable = false;

// We will be creating the stencil buffer for later usage.
StencilEnable = true;
StencilPass = REPLACE;
StencilRef = 1;
}
}

technique BlendWeightCalculation {
pass BlendWeightCalculation {
VertexShader = compile vs_3_0 DX9_SMAABlendWeightCalculationVS();
PixelShader = compile ps_3_0 DX9_SMAABlendingWeightCalculationPS(edgesTex, areaTex, searchTex);
ZEnable = false;
SRGBWriteEnable = false;
AlphaBlendEnable = false;

// Here we want to process only marked pixels.
StencilEnable = true;
StencilPass = KEEP;
StencilFunc = EQUAL;
StencilRef = 1;
}
}

technique NeighborhoodBlending {
pass NeighborhoodBlending {
VertexShader = compile vs_3_0 DX9_SMAANeighborhoodBlendingVS();
PixelShader = compile ps_3_0 DX9_SMAANeighborhoodBlendingPS(colorTex, blendTex);
ZEnable = false;
SRGBWriteEnable = true;
AlphaBlendEnable = false;

// Here we want to process all the pixels.
StencilEnable = false;
}
}


SMAA.h
/**
* Copyright (C) 2011 Jorge Jimenez (jorge@iryoku.com)
* Copyright (C) 2011 Belen Masia (bmasia@unizar.es)
* Copyright (C) 2011 Jose I. Echevarria (joseignacioechevarria@gmail.com)
* Copyright (C) 2011 Fernando Navarro (fernandn@microsoft.com)
* Copyright (C) 2011 Diego Gutierrez (diegog@unizar.es)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the following disclaimer
* in the documentation and/or other materials provided with the
* distribution:
*
* "Uses SMAA. Copyright (C) 2011 by Jorge Jimenez, Jose I. Echevarria,
* Belen Masia, Fernando Navarro and Diego Gutierrez."
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of the copyright holders.
*/


/**
* _______ ___ ___ ___ ___
* / || \/ | / \ / \
* | (---- | \ / | / ^ \ / ^ \
* \ \ | |\/| | / /_\ \ / /_\ \
* ----) | | | | | / _____ \ / _____ \
* |_______/ |__| |__| /__/ \__\ /__/ \__\
*
* E N H A N C E D
* S U B P I X E L M O R P H O L O G I C A L A N T I A L I A S I N G
*
* http://www.iryoku.com/smaa/
*
* Hi, welcome aboard!
*
* Here you'll find instructions to get the shader up and running as fast as
* possible.
*
* The shader has three passes, chained together as follows:
*
* |input|------------------·
* v |
* [ SMAA*EdgeDetection ] |
* v |
* |edgesTex| |
* v |
* [ SMAABlendingWeightCalculation ] |
* v |
* |blendTex| |
* v |
* [ SMAANeighborhoodBlending ] <------·
* v
* |output|
*
* Note that each [pass] has its own vertex and pixel shader.
*
* You've three edge detection methods to choose from: luma, color or depth.
* They represent different quality/performance and anti-aliasing/sharpness
* tradeoffs, so our recommendation is for you to choose the one that suits
* better your particular scenario:
*
* - Depth edge detection is usually the faster but it may miss some edges.
*
* - Luma edge detection is usually more expensive than depth edge detection,
* but catches visible edges that depth edge detection can miss.
*
* - Color edge detection is usually the most expensive one but catches
* chroma-only edges.
*
* For quickstarters: just use luma edge detection.
*
* Ok then, let's go!
*
* 1. The first step is to create two RGBA temporal framebuffers for holding
* |edgesTex| and |blendTex|. In DX10, you can use a RG framebuffer for the
* edges texture, but in our experience it yields worse performance.
*
* 2. Both temporal framebuffers |edgesTex| and |blendTex| must be cleared
* each frame. Do not forget to clear the alpha channel!
*
* 3. The next step is loading the two supporting precalculated textures,
* 'areaTex' and 'searchTex'. You'll find them in the 'Textures' folder as
* C++ headers, and also as regular DDS files. They'll be needed for the
* 'SMAABlendingWeightCalculation' pass.
*
* If you use the C++ headers, be sure to load them in the format specified
* inside of them.
*
* 4. In DX9, all samplers must be set to linear filtering and clamp, with the
* exception of 'searchTex', which must be set to point filtering.
*
* 5. All texture reads and buffer writes must be non-sRGB, with the exception
* of the input read and the output write of input in
* 'SMAANeighborhoodBlending' (and only in this pass!). If sRGB reads in
* this last pass are not possible, the technique will work anyways, but
* will perform antialiasing in gamma space.
*
* IMPORTANT: for best results the input read for the color/luma edge
* detection should *NOT* be sRGB.
*
* 6. Before including SMAA.h you'll have to setup the framebuffer pixel size,
* the target and any optional configuration defines. Optionally you can
* use a preset.
*
* You have three targets available:
* SMAA_HLSL_3
* SMAA_HLSL_4
* SMAA_HLSL_4_1
*
* And four presets:
* SMAA_PRESET_LOW (%60 of the quality)
* SMAA_PRESET_MEDIUM (%80 of the quality)
* SMAA_PRESET_HIGH (%95 of the quality)
* SMAA_PRESET_ULTRA (%99 of the quality)
*
* For example:
* #define SMAA_PIXEL_SIZE float2(1.0 / 1280.0, 1.0 / 720.0)
* #define SMAA_HLSL_4 1
* #define SMAA_PRESET_HIGH 1
* #include "SMAA.h"
*
* 7. Then, you'll have to setup the passes as indicated in the scheme above.
* You can take a look into SMAA.fx, to see how we did it for our demo.
* Checkout the function wrappers, you may want to copy-paste them!
*
* 8. It's recommended to validate the produced |edgesTex| and |blendTex|.
* It's advised to not continue with the implementation until both buffers
* are verified to produce identical results to our reference demo.
*
* 9. After you get the last pass to work, it's time to optimize. You'll have
* to initialize a stencil buffer in the first pass (discard is already in
* the code), then mask execution by using it the second pass. The last
* pass should be executed in all pixels.
*
* That is!
*/

//-----------------------------------------------------------------------------
// SMAA Presets

#if SMAA_PRESET_LOW == 1
#define SMAA_THRESHOLD 0.15
#define SMAA_MAX_SEARCH_STEPS 4
#define SMAA_MAX_SEARCH_STEPS_DIAG 0
#define SMAA_CORNER_ROUNDING 100
#elif SMAA_PRESET_MEDIUM == 1
#define SMAA_THRESHOLD 0.1
#define SMAA_MAX_SEARCH_STEPS 8
#define SMAA_MAX_SEARCH_STEPS_DIAG 0
#define SMAA_CORNER_ROUNDING 100
#elif SMAA_PRESET_HIGH == 1
#define SMAA_THRESHOLD 0.1
#define SMAA_MAX_SEARCH_STEPS 16
#define SMAA_MAX_SEARCH_STEPS_DIAG 8
#define SMAA_CORNER_ROUNDING 25
#elif SMAA_PRESET_ULTRA == 1
#define SMAA_THRESHOLD 0.05
#define SMAA_MAX_SEARCH_STEPS 32
#define SMAA_MAX_SEARCH_STEPS_DIAG 16
#define SMAA_CORNER_ROUNDING 25
#endif

//-----------------------------------------------------------------------------
// Configurable Defines

/**
* SMAA_THRESHOLD specifies the threshold or sensitivity to edges.
* Lowering this value you will be able to detect more edges at the expense of
* performance.
*
* Range: [0.0 .. 0.5]
* 0.1 is a reasonable value, and allows to catch most visible edges.
* 0.05 is a rather overkill value, that allows to catch 'em all.
*/
#ifndef SMAA_THRESHOLD
#define SMAA_THRESHOLD 0.1
#endif

/**
* SMAA_DEPTH_THRESHOLD specifies the threshold for depth edge detection.
*
* Range: depends on the depth range of the scene.
*/
#ifndef SMAA_DEPTH_THRESHOLD
#define SMAA_DEPTH_THRESHOLD (0.1 * SMAA_THRESHOLD)
#endif

/**
* SMAA_MAX_SEARCH_STEPS specifies the maximum steps performed in the
* horizontal/vertical pattern searches, at each side of the pixel.
*
* In number of pixels, it's actually the double. So the maximum line length
* perfectly handled by, for example 16, is 64 (by perfectly, we meant that
* longer lines won't look as good, but still antialiased).
*
* Range: [0 .. 98]
*/
#ifndef SMAA_MAX_SEARCH_STEPS
#define SMAA_MAX_SEARCH_STEPS 16
#endif

/**
* SMAA_MAX_SEARCH_STEPS_DIAG specifies the maximum steps performed in the
* diagonal pattern searchs, at each side of the pixel. In this case we jump
* one pixel at time, instead of two.
*
* Range: [0 .. 20]; set it to 0 to disable diagonal processing.
*
* On high-end machines it is cheap (between a 0.8x and 0.9x slower for 16
* steps), but it can have a significant impact on older machines.
*/
#ifndef SMAA_MAX_SEARCH_STEPS_DIAG
#define SMAA_MAX_SEARCH_STEPS_DIAG 8
#endif

/**
* SMAA_CORNER_ROUNDING specifies how much sharp corners will be rounded.
*
* Range: [0 .. 100]; set it to 100 to disable corner detection.
*/
#ifndef SMAA_CORNER_ROUNDING
#define SMAA_CORNER_ROUNDING 25
#endif

/**
* Predicated thresholding allows to better preserve texture details and to
* improve performance, by decreasing the number of detected edges using an
* additional buffer like the light accumulation buffer, object ids or even the
* depth buffer.
*
* It locally decreases the luma or color threshold if an edge is found in an
* additional buffer (so the global threshold can be higher).
*
* This method was developed by Playstation EDGE MLAA team, and used in
* Killzone 3, by using the light accumulation buffer. More information here:
* http://iryoku.com/aacourse/downloads/06-MLAA-on-PS3.pptx
*/
#ifndef SMAA_PREDICATION
#define SMAA_PREDICATION 0
#endif

/**
* Threshold to be used in the additional predication buffer.
*
* Range: depends on the input, so you'll have to find the magic number that
* works for you.
*/
#ifndef SMAA_PREDICATION_THRESHOLD
#define SMAA_PREDICATION_THRESHOLD 0.01
#endif

/**
* How much to scale the global threshold used for luma or color edge
* detection when using predication.
*
* Range: [1 .. 5]
*/
#ifndef SMAA_PREDICATION_SCALE
#define SMAA_PREDICATION_SCALE 2.0
#endif

/**
* How much to locally decrease the threshold.
*
* Range: [0 .. 1]
*/
#ifndef SMAA_PREDICATION_STRENGTH
#define SMAA_PREDICATION_STRENGTH 0.4
#endif

/**
* In the last pass we leverage bilinear filtering to avoid some lerps.
* However, bilinear filtering is done in gamma space in DX9, under DX9
* hardware (but not in DX9 code running on DX10 hardware), which gives
* inaccurate results.
*
* So, if you are in DX9, under DX9 hardware, and do you want accurate linear
* blending, you must set this flag to 1.
*
* It's ignored when using SMAA_HLSL_4, and of course, only has sense when
* using sRGB read and writes on the last pass.
*/
#ifndef SMAA_DIRECTX9_LINEAR_BLEND
#define SMAA_DIRECTX9_LINEAR_BLEND 0
#endif

//-----------------------------------------------------------------------------
// Non-Configurable Defines

#ifndef SMAA_AREATEX_MAX_DISTANCE
#define SMAA_AREATEX_MAX_DISTANCE 16
#endif
#ifndef SMAA_AREATEX_MAX_DISTANCE_DIAG
#define SMAA_AREATEX_MAX_DISTANCE_DIAG 20
#endif
#define SMAA_AREATEX_PIXEL_SIZE (1.0 / float2(160.0, 80.0))

//-----------------------------------------------------------------------------
// Porting Functions

#if SMAA_HLSL_3 == 1
#define SMAATexture2D sampler2D
#define SMAASampleLevelZero(tex, coord) tex2Dlod(tex, float4(coord, 0.0, 0.0))
#define SMAASampleLevelZeroPoint(tex, coord) tex2Dlod(tex, float4(coord, 0.0, 0.0))
#define SMAASample(tex, coord) tex2D(tex, coord)
#define SMAASampleLevelZeroOffset(tex, coord, off) tex2Dlod(tex, float4(coord + off * SMAA_PIXEL_SIZE, 0.0, 0.0))
#define SMAASampleOffset(tex, coord, off) tex2D(tex, coord + off * SMAA_PIXEL_SIZE)
#endif
#if SMAA_HLSL_4 == 1 || SMAA_HLSL_4_1 == 1
SamplerState LinearSampler {
Filter = MIN_MAG_LINEAR_MIP_POINT;
AddressU = Clamp;
AddressV = Clamp;
};
SamplerState PointSampler {
Filter = MIN_MAG_MIP_POINT;
AddressU = Clamp;
AddressV = Clamp;
};
#define SMAATexture2D Texture2D
#define SMAASampleLevelZero(tex, coord) tex.SampleLevel(LinearSampler, coord, 0)
#define SMAASampleLevelZeroPoint(tex, coord) tex.SampleLevel(PointSampler, coord, 0)
#define SMAASample(tex, coord) SMAASampleLevelZero(tex, coord)
#define SMAASampleLevelZeroOffset(tex, coord, off) tex.SampleLevel(LinearSampler, coord, 0, off)
#define SMAASampleOffset(tex, coord, off) SMAASampleLevelZeroOffset(tex, coord, off)
#endif
#if SMAA_HLSL_4_1 == 1
#define SMAAGather(tex, coord) tex.Gather(LinearSampler, coord, 0)
#endif

//-----------------------------------------------------------------------------
// Misc functions

/**
* Gathers current pixel, and the top-left neighbours.
*/
float3 SMAAGatherNeighbours(float2 texcoord,
float4 offset[2],
SMAATexture2D tex) {
#if SMAA_HLSL_4_1 == 1
return SMAAGather(tex, texcoord + SMAA_PIXEL_SIZE * float2(-0.5, -0.5)).grb;
#else
float P = SMAASample(tex, texcoord).r;
float Pleft = SMAASample(tex, offset[0].xy).r;
float Ptop = SMAASample(tex, offset[0].zw).r;
return float3(P, Pleft, Ptop);
#endif
}

/**
* Adjusts the threshold by means of predication.
*/
float2 SMAACalculatePredicatedThreshold(float2 texcoord,
float4 offset[2],
SMAATexture2D colorTex,
SMAATexture2D predicationTex) {
float3 neighbours = SMAAGatherNeighbours(texcoord, offset, predicationTex);
float2 delta = abs(neighbours.xx - float2(neighbours.y, neighbours.z));
float2 edges = step(SMAA_PREDICATION_THRESHOLD, delta);
return SMAA_PREDICATION_SCALE * SMAA_THRESHOLD * (1.0 - SMAA_PREDICATION_STRENGTH * edges);
}

//-----------------------------------------------------------------------------
// Vertex Shaders

/**
* Edge Detection Vertex Shader
*/
void SMAAEdgeDetectionVS(float4 position,
out float4 svPosition,
inout float2 texcoord,
out float4 offset[2]) {
svPosition = position;

offset[0] = texcoord.xyxy + SMAA_PIXEL_SIZE.xyxy * float4(-1.0, 0.0, 0.0, -1.0);
offset[1] = texcoord.xyxy + SMAA_PIXEL_SIZE.xyxy * float4( 1.0, 0.0, 0.0, 1.0);
}

/**
* Blend Weight Calculation Vertex Shader
*/
void SMAABlendWeightCalculationVS(float4 position,
out float4 svPosition,
inout float2 texcoord,
out float2 pixcoord,
out float4 offset[3]) {
svPosition = position;

pixcoord = texcoord / SMAA_PIXEL_SIZE;

// We will use these offsets for the searchs later on (see @PSEUDO_GATHER4):
offset[0] = texcoord.xyxy + SMAA_PIXEL_SIZE.xyxy * float4(-0.25, -0.125, 1.25, -0.125);
offset[1] = texcoord.xyxy + SMAA_PIXEL_SIZE.xyxy * float4(-0.125, -0.25, -0.125, 1.25);

// And these for the searchs, they indicate the ends of the loops:
offset[2] = float4(offset[0].xz, offset[1].yw) +
float4(-2.0, 2.0, -2.0, 2.0) *
SMAA_PIXEL_SIZE.xxyy * SMAA_MAX_SEARCH_STEPS;
}

/**
* Neighborhood Blending Vertex Shader
*/
void SMAANeighborhoodBlendingVS(float4 position,
out float4 svPosition,
inout float2 texcoord,
out float4 offset[2]) {
svPosition = position;

offset[0] = texcoord.xyxy + SMAA_PIXEL_SIZE.xyxy * float4(-1.0, 0.0, 0.0, -1.0);
offset[1] = texcoord.xyxy + SMAA_PIXEL_SIZE.xyxy * float4( 1.0, 0.0, 0.0, 1.0);
}

//-----------------------------------------------------------------------------
// Edge Detection Pixel Shaders (First Pass)

/**
* Luma Edge Detection
*
* IMPORTANT NOTICE: luma edge detection requires gamma-corrected colors, and
* thus 'colorTex' should be a non-sRGB texture.
*/
float4 SMAALumaEdgeDetectionPS(float2 texcoord,
float4 offset[2],
SMAATexture2D colorTex
#if SMAA_PREDICATION == 1
, SMAATexture2D predicationTex
#endif
) {
// Calculate the threshold:
#if SMAA_PREDICATION == 1
float2 threshold = SMAACalculatePredicatedThreshold(texcoord, offset, colorTex, predicationTex);
#else
float2 threshold = SMAA_THRESHOLD;
#endif

// Calculate lumas:
float3 weights = float3(0.2126, 0.7152, 0.0722);
float L = dot(SMAASample(colorTex, texcoord).rgb, weights);
float Lleft = dot(SMAASample(colorTex, offset[0].xy).rgb, weights);
float Ltop = dot(SMAASample(colorTex, offset[0].zw).rgb, weights);

// We do the usual threshold:
float4 delta;
delta.xy = abs(L.xx - float2(Lleft, Ltop));
float2 edges = step(threshold, delta.xy);

// Then discard if there is no edge:
if (dot(edges, 1.0) == 0.0)
discard;

// Calculate right and bottom deltas:
float Lright = dot(SMAASample(colorTex, offset[1].xy).rgb, weights);
float Lbottom = dot(SMAASample(colorTex, offset[1].zw).rgb, weights);
delta.zw = abs(L.xx - float2(Lright, Lbottom));

/**
* Each edge with a delta in luma of less than 50% of the maximum luma
* surrounding this pixel is discarded. This allows to eliminate spurious
* crossing edges, and is based on the fact that, if there is too much
* contrast in a direction, that will hide contrast in the other
* neighbors.
* This is done after the discard intentionally as this situation doesn't
* happen too frequently (but it's important to do as it prevents some
* edges from going undetected).
*/
float maxDelta = max(max(max(delta.x, delta.y), delta.z), delta.w);
edges.xy *= step(0.5 * maxDelta, delta.xy);

return float4(edges, 0.0, 0.0);
}

/**
* Color Edge Detection
*
* IMPORTANT NOTICE: color edge detection requires gamma-corrected colors, and
* thus 'colorTex' should be a non-sRGB texture.
*/
float4 SMAAColorEdgeDetectionPS(float2 texcoord,
float4 offset[2],
SMAATexture2D colorTex
#if SMAA_PREDICATION == 1
, SMAATexture2D predicationTex
#endif
) {
// Calculate the threshold:
#if SMAA_PREDICATION == 1
float2 threshold = SMAACalculatePredicatedThreshold(texcoord, offset, colorTex, predicationTex);
#else
float2 threshold = SMAA_THRESHOLD;
#endif

// Calculate color deltas:
float4 delta;
float3 C = SMAASample(colorTex, texcoord).rgb;

float3 Cleft = SMAASample(colorTex, offset[0].xy).rgb;
float3 t = abs(C - Cleft);
delta.x = max(max(t.r, t.g), t.b);

float3 Ctop = SMAASample(colorTex, offset[0].zw).rgb;
t = abs(C - Ctop);
delta.y = max(max(t.r, t.g), t.b);

// We do the usual threshold:
float2 edges = step(threshold, delta.xy);

// Then discard if there is no edge:
if (dot(edges, 1.0) == 0.0)
discard;

// Calculate right and bottom deltas:
float3 Cright = SMAASample(colorTex, offset[1].xy).rgb;
t = abs(C - Cright);
delta.z = max(max(t.r, t.g), t.b);

float3 Cbottom = SMAASample(colorTex, offset[1].zw).rgb;
t = abs(C - Cbottom);
delta.w = max(max(t.r, t.g), t.b);

/**
* Each edge with a delta in luma of less than 50% of the maximum luma
* surrounding this pixel is discarded. This allows to eliminate spurious
* crossing edges, and is based on the fact that, if there is too much
* contrast in a direction, that will hide contrast in the other
* neighbors.
* This is done after the discard intentionally as this situation doesn't
* happen too frequently (but it's important to do as it prevents some
* edges from going undetected).
*/
float maxDelta = max(max(max(delta.x, delta.y), delta.z), delta.w);
edges.xy *= step(0.5 * maxDelta, delta.xy);

return float4(edges, 0.0, 0.0);
}

/**
* Depth Edge Detection
*/
float4 SMAADepthEdgeDetectionPS(float2 texcoord,
float4 offset[2],
SMAATexture2D depthTex) {
float3 neighbours = SMAAGatherNeighbours(texcoord, offset, depthTex);
float2 delta = abs(neighbours.xx - float2(neighbours.y, neighbours.z));
float2 edges = step(SMAA_DEPTH_THRESHOLD, delta);

if (dot(edges, 1.0) == 0.0)
discard;

return float4(edges, 0.0, 0.0);
}

//-----------------------------------------------------------------------------
// Diagonal Search Functions

#if SMAA_MAX_SEARCH_STEPS_DIAG > 0 || SMAA_FORCE_DIAGONAL_DETECTION == 1

/**
* These functions allows to perform diagonal pattern searches.
*/
float SMAASearchDiag1(SMAATexture2D edgesTex, float2 texcoord, float2 dir, float c) {
texcoord += dir * SMAA_PIXEL_SIZE;
float2 e = 0;
for (float i = 0; i < SMAA_MAX_SEARCH_STEPS_DIAG; i++) {
e.rg = SMAASampleLevelZero(edgesTex, texcoord).rg;
[flatten] if (dot(e, 1.0) < 1.9) break;
texcoord += dir * SMAA_PIXEL_SIZE;
}
return i + float(e.g > 0.9) * c;
}

float SMAASearchDiag2(SMAATexture2D edgesTex, float2 texcoord, float2 dir, float c) {
texcoord += dir * SMAA_PIXEL_SIZE;
float2 e = 0;
for (float i = 0; i < SMAA_MAX_SEARCH_STEPS_DIAG; i++) {
e.g = SMAASampleLevelZero(edgesTex, texcoord).g;
e.r = SMAASampleLevelZeroOffset(edgesTex, texcoord, int2(1, 0)).r;
[flatten] if (dot(e, 1.0) < 1.9) break;
texcoord += dir * SMAA_PIXEL_SIZE;
}
return i + float(e.g > 0.9) * c;
}

/**
* Similar to SMAAArea, this calculates the area corresponding to a certain
* diagonal distance and crossing edges 'e'.
*/
float2 SMAAAreaDiag(SMAATexture2D areaTex, float2 distance, float2 e) {
float2 texcoord = SMAA_AREATEX_MAX_DISTANCE_DIAG * e + distance;

// We do a scale and bias for mapping to texel space:
texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + (0.5 * SMAA_AREATEX_PIXEL_SIZE);

// Diagonal areas are on the second half of the texture:
texcoord.x += 0.5;

// Do it!
#if SMAA_HLSL_3 == 1
return SMAASampleLevelZero(areaTex, texcoord).ra;
#else
return SMAASampleLevelZero(areaTex, texcoord).rg;
#endif
}

/**
* This searches for diagonal patterns and returns the corresponding weights.
*/
float2 SMAACalculateDiagWeights(SMAATexture2D edgesTex, SMAATexture2D areaTex, float2 texcoord, float2 e) {
float2 weights = 0.0;

float2 d;
d.x = e.r? SMAASearchDiag1(edgesTex, texcoord, float2(-1.0, 1.0), 1.0) : 0.0;
d.y = SMAASearchDiag1(edgesTex, texcoord, float2(1.0, -1.0), 0.0);

[branch]
if (d.r + d.g > 1) { // d.r + d.g + 1 > 2
float4 coords = mad(float4(-d.r, d.r, d.g, -d.g), SMAA_PIXEL_SIZE.xyxy, texcoord.xyxy);

float4 c;
c.x = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(-1, 0)).g;
c.y = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2( 0, 0)).r;
c.z = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1, 0)).g;
c.w = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1, -1)).r;
float2 e = 2.0 * c.xz + c.yw;
e *= step(d.rg, SMAA_MAX_SEARCH_STEPS_DIAG - 1);

weights += SMAAAreaDiag(areaTex, d, e);
}

d.x = SMAASearchDiag2(edgesTex, texcoord, float2(-1.0, -1.0), 0.0);
float right = SMAASampleLevelZeroOffset(edgesTex, texcoord, int2(1, 0)).r;
d.y = right? SMAASearchDiag2(edgesTex, texcoord, float2(1.0, 1.0), 1.0) : 0.0;

[branch]
if (d.r + d.g > 1) { // d.r + d.g + 1 > 2
float4 coords = mad(float4(-d.r, -d.r, d.g, d.g), SMAA_PIXEL_SIZE.xyxy, texcoord.xyxy);

float4 c;
c.x = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(-1, 0)).g;
c.y = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2( 0, -1)).r;
c.zw = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1, 0)).gr;
float2 e = 2.0 * c.xz + c.yw;
e *= step(d.rg, SMAA_MAX_SEARCH_STEPS_DIAG - 1);

weights += SMAAAreaDiag(areaTex, d, e).gr;
}

return weights;
}
#endif

//-----------------------------------------------------------------------------
// Horizontal/Vertical Search Functions

/**
* This allows to determine how much length should we add in the last step
* of the searches. It takes the bilinearly interpolated edge (see
* @PSEUDO_GATHER4), and adds 0, 1 or 2, depending on which edges and
* crossing edges are active.
*/
float SMAASearchLength(SMAATexture2D searchTex, float2 e, float bias, float scale) {
// Not required if searchTex accesses are set to point:
// float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);
// e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +
// e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;
e.r = bias + e.r * scale;
return 255.0 * SMAASampleLevelZeroPoint(searchTex, e).r;
}

/**
* Horizontal/vertical search functions for the 2nd pass.
*/
float SMAASearchXLeft(SMAATexture2D edgesTex, SMAATexture2D searchTex, float2 texcoord, float end) {
/**
* @PSEUDO_GATHER4
* This texcoord has been offset by (-0.25, -0.125) in the vertex shader to
* sample between edge, thus fetching four edges in a row.
* Sampling with different offsets in each direction allows to disambiguate
* which edges are active from the four fetched ones.
*/
float2 e = float2(0.0, 1.0);
while (texcoord.x > end &&
e.g > 0.8281 && // Is there some edge not activated?
e.r == 0.0) { // Or is there a crossing edge that breaks the line?
e = SMAASampleLevelZero(edgesTex, texcoord).rg;
texcoord -= float2(2.0, 0.0) * SMAA_PIXEL_SIZE;
}

// We correct the previous (-0.25, -0.125) offset we applied:
texcoord.x += 0.25 * SMAA_PIXEL_SIZE.x;

// The searches are bias by 1, so adjust the coords accordingly:
texcoord.x += SMAA_PIXEL_SIZE.x;

// Disambiguate the length added by the last step:
texcoord.x += 2.0 * SMAA_PIXEL_SIZE.x; // Undo last step
texcoord.x -= SMAA_PIXEL_SIZE.x * SMAASearchLength(searchTex, e, 0.0, 0.5);

return texcoord.x;
}

float SMAASearchXRight(SMAATexture2D edgesTex, SMAATexture2D searchTex, float2 texcoord, float end) {
float2 e = float2(0.0, 1.0);
while (texcoord.x < end &&
e.g > 0.8281 && // Is there some edge not activated?
e.r == 0.0) { // Or is there a crossing edge that breaks the line?
e = SMAASampleLevelZero(edgesTex, texcoord).rg;
texcoord += float2(2.0, 0.0) * SMAA_PIXEL_SIZE;
}

texcoord.x -= 0.25 * SMAA_PIXEL_SIZE.x;
texcoord.x -= SMAA_PIXEL_SIZE.x;
texcoord.x -= 2.0 * SMAA_PIXEL_SIZE.x;
texcoord.x += SMAA_PIXEL_SIZE.x * SMAASearchLength(searchTex, e, 0.5, 0.5);
return texcoord.x;
}

float SMAASearchYUp(SMAATexture2D edgesTex, SMAATexture2D searchTex, float2 texcoord, float end) {
float2 e = float2(1.0, 0.0);
while (texcoord.y > end &&
e.r > 0.8281 && // Is there some edge not activated?
e.g == 0.0) { // Or is there a crossing edge that breaks the line?
e = SMAASampleLevelZero(edgesTex, texcoord).rg;
texcoord -= float2(0.0, 2.0) * SMAA_PIXEL_SIZE;
}

texcoord.y += 0.25 * SMAA_PIXEL_SIZE.y;
texcoord.y += SMAA_PIXEL_SIZE.y;
texcoord.y += 2.0 * SMAA_PIXEL_SIZE.y;
texcoord.y -= SMAA_PIXEL_SIZE.y * SMAASearchLength(searchTex, e.gr, 0.0, 0.5);
return texcoord.y;
}

float SMAASearchYDown(SMAATexture2D edgesTex, SMAATexture2D searchTex, float2 texcoord, float end) {
float2 e = float2(1.0, 0.0);
while (texcoord.y < end &&
e.r > 0.8281 && // Is there some edge not activated?
e.g == 0.0) { // Or is there a crossing edge that breaks the line?
e = SMAASampleLevelZero(edgesTex, texcoord).rg;
texcoord += float2(0.0, 2.0) * SMAA_PIXEL_SIZE;
}

texcoord.y -= 0.25 * SMAA_PIXEL_SIZE.y;
texcoord.y -= SMAA_PIXEL_SIZE.y;
texcoord.y -= 2.0 * SMAA_PIXEL_SIZE.y;
texcoord.y += SMAA_PIXEL_SIZE.y * SMAASearchLength(searchTex, e.gr, 0.5, 0.5);
return texcoord.y;
}

/**
* Ok, we have the distance and both crossing edges. So, what are the areas
* at each side of current edge?
*/
float2 SMAAArea(SMAATexture2D areaTex, float2 distance, float e1, float e2) {
// Rounding prevents precision errors of bilinear filtering:
float2 texcoord = SMAA_AREATEX_MAX_DISTANCE * round(4.0 * float2(e1, e2)) + distance;

// We do a scale and bias for mapping to texel space:
texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + (0.5 * SMAA_AREATEX_PIXEL_SIZE);

// Do it!
#if SMAA_HLSL_3 == 1
return SMAASampleLevelZero(areaTex, texcoord).ra;
#else
return SMAASampleLevelZero(areaTex, texcoord).rg;
#endif
}

//-----------------------------------------------------------------------------
// Corner Detection Functions

void SMAADetectHorizontalCornerPattern(SMAATexture2D edgesTex, inout float2 weights, float2 texcoord, float2 d) {
#if SMAA_CORNER_ROUNDING < 100 || SMAA_FORCE_CORNER_DETECTION == 1
float4 coords = mad(float4(d.x, 0.0, d.y, 0.0),
SMAA_PIXEL_SIZE.xyxy, texcoord.xyxy);
float2 e;
e.r = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(0.0, 1.0)).r;
bool left = abs(d.x) < abs(d.y);
e.g = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(0.0, -2.0)).r;
if (left) weights *= saturate(SMAA_CORNER_ROUNDING / 100.0 + 1.0 - e);

e.r = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2(1.0, 1.0)).r;
e.g = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2(1.0, -2.0)).r;
if (!left) weights *= saturate(SMAA_CORNER_ROUNDING / 100.0 + 1.0 - e);
#endif
}

void SMAADetectVerticalCornerPattern(SMAATexture2D edgesTex, inout float2 weights, float2 texcoord, float2 d) {
#if SMAA_CORNER_ROUNDING < 100 || SMAA_FORCE_CORNER_DETECTION == 1
float4 coords = mad(float4(0.0, d.x, 0.0, d.y),
SMAA_PIXEL_SIZE.xyxy, texcoord.xyxy);
float2 e;
e.r = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2( 1.0, 0.0)).g;
bool left = abs(d.x) < abs(d.y);
e.g = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(-2.0, 0.0)).g;
if (left) weights *= saturate(SMAA_CORNER_ROUNDING / 100.0 + 1.0 - e);

e.r = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1.0, 1.0)).g;
e.g = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2(-2.0, 1.0)).g;
if (!left) weights *= saturate(SMAA_CORNER_ROUNDING / 100.0 + 1.0 - e);
#endif
}

//-----------------------------------------------------------------------------
// Blending Weight Calculation Pixel Shader (Second Pass)

float4 SMAABlendingWeightCalculationPS(float2 texcoord,
float2 pixcoord,
float4 offset[3],
SMAATexture2D edgesTex,
SMAATexture2D areaTex,
SMAATexture2D searchTex) {
float4 weights = 0.0;

float2 e = SMAASample(edgesTex, texcoord).rg;

[branch]
if (e.g) { // Edge at north
#if SMAA_MAX_SEARCH_STEPS_DIAG > 0 || SMAA_FORCE_DIAGONAL_DETECTION == 1
// Diagonals have both north and west edges, so searching for them in
// one of the boundaries is enough.
weights.rg = SMAACalculateDiagWeights(edgesTex, areaTex, texcoord, e);

// We give priority to diagonals, so if we find a diagonal we skip
// horizontal/vertical processing.
[branch]
if (dot(weights.rg, 1.0) == 0.0) {
#endif

float2 d;

// Find the distance to the left:
float2 coords;
coords.x = SMAASearchXLeft(edgesTex, searchTex, offset[0].xy, offset[2].x);
coords.y = offset[1].y; // offset[1].y = texcoord.y - 0.25 * SMAA_PIXEL_SIZE.y (@CROSSING_OFFSET)
d.x = coords.x;

// Now fetch the left crossing edges, two at a time using bilinear
// filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to
// discern what value each edge has:
float e1 = SMAASampleLevelZero(edgesTex, coords).r;

// Find the distance to the right:
coords.x = SMAASearchXRight(edgesTex, searchTex, offset[0].zw, offset[2].y);
d.y = coords.x;

// We want the distances to be in pixel units (doing this here allow to
// better interleave arithmetic and memory accesses):
d = d / SMAA_PIXEL_SIZE.x - pixcoord.x;

// SMAAArea below needs a sqrt, as the areas texture is compressed
// quadratically:
float2 sqrt_d = sqrt(abs(d));

// Fetch the right crossing edges:
float e2 = SMAASampleLevelZeroOffset(edgesTex, coords, int2(1, 0)).r;

// Ok, we know how this pattern looks like, now it is time for getting
// the actual area:
weights.rg = SMAAArea(areaTex, sqrt_d, e1, e2);

SMAADetectHorizontalCornerPattern(edgesTex, weights.rg, texcoord, d);

#if SMAA_MAX_SEARCH_STEPS_DIAG > 0 || SMAA_FORCE_DIAGONAL_DETECTION == 1
} else
e.r = 0.0; // Skip vertical processing.
#endif
}

[branch]
if (e.r) { // Edge at west
float2 d;

// Find the distance to the top:
float2 coords;
coords.y = SMAASearchYUp(edgesTex, searchTex, offset[1].xy, offset[2].z);
coords.x = offset[0].x; // offset[1].x = texcoord.x - 0.25 * SMAA_PIXEL_SIZE.x;
d.x = coords.y;

// Fetch the top crossing edges:
float e1 = SMAASampleLevelZero(edgesTex, coords).g;

// Find the distance to the bottom:
coords.y = SMAASearchYDown(edgesTex, searchTex, offset[1].zw, offset[2].w);
d.y = coords.y;

// We want the distances to be in pixel units:
d = d / SMAA_PIXEL_SIZE.y - pixcoord.y;

// SMAAArea below needs a sqrt, as the areas texture is compressed
// quadratically:
float2 sqrt_d = sqrt(abs(d));

// Fetch the bottom crossing edges:
float e2 = SMAASampleLevelZeroOffset(edgesTex, coords, int2(0, 1)).g;

// Get the area for this direction:
weights.ba = SMAAArea(areaTex, sqrt_d, e1, e2);

SMAADetectVerticalCornerPattern(edgesTex, weights.ba, texcoord, d);
}

return weights;
}

//-----------------------------------------------------------------------------
// Neighborhood Blending Pixel Shader (Third Pass)

float4 SMAANeighborhoodBlendingPS(float2 texcoord,
float4 offset[2],
SMAATexture2D colorTex,
SMAATexture2D blendTex) {
// Fetch the blending weights for current pixel:
float4 topLeft = SMAASample(blendTex, texcoord);
float bottom = SMAASample(blendTex, offset[1].zw).g;
float right = SMAASample(blendTex, offset[1].xy).a;
float4 a = float4(topLeft.r, bottom, topLeft.b, right);

// Is there any blending weight with a value greater than 0.0?
[branch]
if (dot(a, 1.0) < 1e-5)
return SMAASampleLevelZero(colorTex, texcoord);
else {
float4 color = 0.0;

// Up to 4 lines can be crossing a pixel (one through each edge). We
// favor blending by choosing the line with the maximum weight for each
// direction:
float2 offset;
offset.x = a.a > a.b? a.a : -a.b; // left vs. right
offset.y = a.g > a.r? a.g : -a.r; // top vs. bottom

// Then we go in the direction that has the maximum weight:
if (abs(offset.x) > abs(offset.y)) // horizontal vs. vertical
offset.y = 0.0;
else
offset.x = 0.0;

#if SMAA_HLSL_4 == 1 || SMAA_DIRECTX9_LINEAR_BLEND == 0
// We exploit bilinear filtering to mix current pixel with the chosen
// neighbor:
texcoord += offset * SMAA_PIXEL_SIZE;
return SMAASampleLevelZero(colorTex, texcoord);
#else
// Fetch the opposite color and lerp by hand:
float4 C = SMAASampleLevelZero(colorTex, texcoord);
texcoord += sign(offset) * SMAA_PIXEL_SIZE;
float4 Cop = SMAASampleLevelZero(colorTex, texcoord);
float s = abs(offset.x) > abs(offset.y)? abs(offset.x) : abs(offset.y);
return lerp(C, Cop, s);
#endif
}
}

//-----------------------------------------------------------------------------

teezaken
2011-10-22, 21:54:19
Lohnt sich sehr im Vergleich zu FXAA. Mit dem "SMAADepthEdgeDetectionPS"-Verfahren entsteht entsteht auch keine Unschärfe bei den Texturen.

wenn das stimmt wäre das echt super, aber ich glaube die Begeisterung zu PP AA hält sich in grenzen leider, denn mit DS siehts ja echt net schlecht aus

Gast
2011-10-22, 23:11:47
Vielleicht werde ich es nochmal versuchen, aber der Würfel beim FXAA nervt und FXAA war eigentlich der einzige Grund warum ich den neuen Treiber installiert habe.

ein openGL Spiel von 1000000 du hast Sorgen....

teezaken
2011-10-29, 13:29:05
SMAA: Enhanced Subpixel Morphological Antialiasing wurde in die Cryengine 3 integriert und es wurde auf Version 2.5 geupdated

http://www.iryoku.com/smaa/#downloads

Deinorius
2011-10-29, 21:53:52
Was ist diese Einheit MS, womit die Leistung gemessen wird?

boxleitnerb
2011-10-29, 21:58:52
Millisekunden, eben wie lange der Algorithmus bei einem Bild braucht.

dildo4u
2011-10-29, 22:03:12
Was ist diese Einheit MS, womit die Leistung gemessen wird?
Wird vorallem bei Konsolen Entwicklern genutzt da gibt's ein Limit ich glaub 30ms für ein 30fps Game,in diesen 30ms muss alles reinpassen was Rechenleistung benötigt,damit das Game auf der Konsole mit 30fps läuft.

Seite 23 kosten für SSAO z.b.
http://advances.realtimerendering.com/s2010/Kaplanyan-CryEngine3(SIGGRAPH%202010%20Advanced%20RealTime%20Rendering%20Course).pdf

Deinorius
2011-10-29, 22:12:23
Ach so, daran hätte ich nicht gedacht.

Richtige Benchmarks wären mir dennoch lieber. Gerade wenn FXAA gerade mal 0.62 ms im Vergleich zu 1.32 ms braucht, wäre es interessant, wie sich das im Verhältnis zu FPS-Angaben auswirkt.

dildo4u
2011-10-29, 22:17:03
Ach so, daran hätte ich nicht gedacht.

Richtige Benchmarks wären mir dennoch lieber. Gerade wenn FXAA gerade mal 0.62 ms im Vergleich zu 1.32 ms braucht, wäre es interessant, wie sich das im Verhältnis zu FPS-Angaben auswirkt.
Das sind so oder so Peanuts auf dem PC wenn man nich grad von IGP's ausgeht.

Ronny145
2011-10-29, 23:33:27
SMAA: Enhanced Subpixel Morphological Antialiasing wurde in die Cryengine 3 integriert und es wurde auf Version 2.5 geupdated

http://www.iryoku.com/smaa/#downloads


Das Video finde ich interessanter. In Bewegung bringt es sichtbar mehr als FXAA und MLAA sowieso. AMDs MLAA verschlimmert das Flimmern oftmals.

Tesseract
2011-10-29, 23:58:58
Wird vorallem bei Konsolen Entwicklern genutzt da gibt's ein Limit ich glaub 30ms für ein 30fps Game,in diesen 30ms muss alles reinpassen was Rechenleistung benötigt,damit das Game auf der Konsole mit 30fps läuft.

ist nichts anderes als der kehrwert der fps (vorausgesetzt es limitiert weder ein framelimiter noch die CPU). wenn der bufferswap 1 ms benötigt hat man 1000/1 = 1000fps für ein leeres bild. wenn man jetzt ein fettes mesh zeichnet und das benötigt z.B. 8ms für das drawing hat man 1000/(1+8)= ~111fps.

gerade in extrembereichen ist renderzeit eine greifbarere größe als fps. der sprung von 1000 auf 100 fps sieht z.B. sehr groß aus, ist er aber eigentlich nicht. wenn diese 8ms z.B. zu schon vorhandenen 50ms dazu kommen werden aus 20 fps ~17 fps.

Gast
2011-10-30, 17:21:26
Hi guys just wanted to say I love this site I come here to find the best AA bits for all the games I play.

I'm having trouble getting FXAA to work in dx11 for BFBC2. I can get it to work in DX9 and DX10 and it looks great. I put the files from the d3d10 folder into the main executable folder but I don't see any changes in game. Is there anything else I'm supposed to do?

Ronny145
2011-10-30, 17:24:24
I'm having trouble getting FXAA to work in dx11 for BFBC2. I can get it to work in DX9 and DX10 and it looks great. I put the files from the d3d10 folder into the main executable folder but I don't see any changes in game. Is there anything else I'm supposed to do?


Only working with enabled SSAA Tool at the same time.

boxleitnerb
2011-10-30, 17:26:03
ronny war schneller :)

teezaken
2011-10-30, 17:55:19
Das Video finde ich interessanter. In Bewegung bringt es sichtbar mehr als FXAA und MLAA sowieso. AMDs MLAA verschlimmert das Flimmern oftmals.

Ja und außerdem matscht das Bild damit nicht (mit SMAA) und vielleicht wäre es gut einen eigenen Thread für SMAA zu eröffnen, da FXAA ja schon ein alter Hut ist und vielleicht deshalb so wenig Leute hier reinschauen

boxleitnerb
2011-10-30, 19:31:08
Also ich weiß ja nicht, aber was man da mit allen drei Methoden (FXAA, MLAA, SMAA) zeigt, sieht für mich absolut ungenießbar aus. Alleine sind die imo kaum zu gebrauchen, nur in Verbindung mit anderen Techniken. Ich finde Auswahl ja schön, benutze FXAA auch mit Downsampling zusammen, aber gerade in der zweiten Vergleichsezene gehen einem die Fussnägel hoch, da flimmert fast alles, wenn kein SSAA benutzt wird.