Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,170 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

BorisVorontsov

[GTAIV|REL|BETA] ENBSeries graphic modification

Recommended Posts

AlexFake

Some screens with my new timecyc. FXAA. AA=false.

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

 

And some landscapes with gp65cj04 enbeffect with my little fix:

user posted imageuser posted image

user posted imageuser posted image

Very fu*king bloomy((

Share this post


Link to post
Share on other sites
ziggyYardie

i had gotten a FXAA effect.txt from some where here on this fourm ....which didnt work -__-! or i didnt see any difference

i hope the FXAA posted by gp65cj04 works

 

quick aquatic aurora

 

user posted image

as you can see jagged edges seen on boats at sea and i was using the supposed Fxaa effect.txt

does AA have to be on for it to work?

 

Share this post


Link to post
Share on other sites
uLy_b0y

@gp65cj04

 

tnx for posting. i tried this FXAA that has been recently released yours and the one posted by myster92

i'm really impressed how it works..

it's on par with AA=true with the right tweaks

 

and kudos to you and your works

you work quietly and releases a awesome job instany smile.gif oldschool hardcore type cool sly.gificon14.gificon14.gif

 

 

Share this post


Link to post
Share on other sites
tkd3796
And some landscapes with gp65cj04 enbeffect with my little fix:

user posted imageuser posted image

user posted imageuser posted image

Very fu*king bloomy((

Can I get this ENB ?

[gp65cj04 fix enbeffect]

Share this post


Link to post
Share on other sites
dmit.tor

AA=False

user posted imageuser posted image

Share this post


Link to post
Share on other sites
ziggyYardie

fxaa does work colgate.gif beautifully too.

Share this post


Link to post
Share on other sites
Omarock

WOOW good pictures folks , and thanks to all who share these beautiful codes , good job ^^

Share this post


Link to post
Share on other sites
AlexFake

FXAA. AA=false. DOF. SSAO.

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

Share this post


Link to post
Share on other sites
perern
With NEW DOF Code :

PATCH 1.0.7.0

 

user posted image

user posted image

 

Thank you very much gp65cj04

Can u upload all files?

Share this post


Link to post
Share on other sites
portal2x2

Hmm whobeheard about TSSAA???? It is type the improved filtration of structures, I have found a code and have inserted in enbeffect.fx all works and differences it is not visible. By the way thanks for FXAA!

Edited by portal2x2

Share this post


Link to post
Share on other sites
movo

@AlexFake: Awesome screens, would love to try your settings. Maybe lower the reflections a bit.

@dmit.tor: Wow. Looks alot like Alex's settings

Share this post


Link to post
Share on other sites
fedec96

I think I love you all. biggrin.gif

Share this post


Link to post
Share on other sites
AlexFake

Test FXAA on notebook. AA=false. DOF. SSAO.

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

 

 

Share this post


Link to post
Share on other sites
remington122

use FXAA code by gp65cj04

AA and SSAO is off.

 

user posted image user posted image

 

user posted image user posted image

Share this post


Link to post
Share on other sites
stphy

@Fake

nice pics

 

user posted image

user posted image

user posted image

user posted image

user posted image

Share this post


Link to post
Share on other sites
Damian989121

user posted image

user posted image

Share this post


Link to post
Share on other sites
Stahuuuu

 

Here we go...

 

 

 

Preview of the upcoming settings.

Really almost done.

+ some surprises inside.

 

Video

It's perfect. I can't wait no more smile.gif

Share this post


Link to post
Share on other sites
gp65cj04

FXAA, all credit goes to Timothy Lottes and Myster92. smile.gif

 

About TSSAA, it needs previous frame and current frame, so it's impossible to implement in effect.txt.

Share this post


Link to post
Share on other sites
squared

To those of you who asked what mods/settings I use - RealizmIV, VisualIV, Ultimate Textures 2.0, AlexFakes' last setting he posted in this thread. At 1920x1080, max settings.

 

Gonna try adding FXAA tonight smile.gif

 

@icelaglace: Awesome looking video! Can't wait to try it smile.gif

Share this post


Link to post
Share on other sites
napoleonic

need help guys

 

user posted image

 

I want to turn down the yellow bloom and color saturation... I'm using this enbeffect.fx

 

 

//++++++++++++++++++++++++++++++++++++++++++++// ENBSeries effect file// visit http://enbdev.com for updates// Copyright 2010 © Boris Vorontsov//L3EVO settings by gp65cj04 & lpf312//DoF code from AMD// Using decompiled shader of GTA4 game by// Rockstar Games.//++++++++++++++++++++++++++++++++++++++++++++//NOTE: enable or disable these//to disable, write // symbols before #define//#define APPLYGAMECOLORCORRECTION //use contrast, brightness, saturation from gamefloat EColorSaturation = 1.0;float EBrightnessV1 = 1.0;float EBloomAmountV1 = 0.34;float EBloomAmountAdditiveV1 = 1.4;float BP_factor = 0.1; //bleach bypassint DoF_TAPS = 60; //0: turn off, 4 , 8, 24, higer means better, but more performance drop.//   sampler2D AdapLumSampler;//   sampler2D BloomSampler;//   float4 ColorCorrect;//   float4 ColorShift;//   float Exposure;//   sampler2D GBufferTextureSampler2;//   sampler2D GBufferTextureSampler3;//   sampler2D HDRSampler;//   sampler2D JitterSampler;//   float PLAYER_MASK;//   sampler2D StencilCopySampler;//   float4 TexelSize;//   float4 ToneMapParams;//   float4 deSatContrastGamma;//   float4 dofBlur;//   float4 dofDist;//   float4 dofProj;//   float gDirectionalMotionBlurLength;//   float4 globalScreenSize;//   row_major float4x4 motionBlurMatrix;////// Registers:////   Name                         Reg   Size//   ---------------------------- ----- ----//   globalScreenSize             c44      1//   Exposure                     c66      1//   motionBlurMatrix             c72      4//   TexelSize                    c76      1//   dofProj                      c77      1//   dofDist                      c78      1//   dofBlur                      c79      1//   gDirectionalMotionBlurLength c80      1//   ToneMapParams                c81      1//   deSatContrastGamma           c82      1//   ColorCorrect                 c83      1//   ColorShift                   c84      1//   PLAYER_MASK                  c85      1//   GBufferTextureSampler2       s0       1//   GBufferTextureSampler3       s1       1//   HDRSampler                   s2       1//   BloomSampler                 s3       1//   AdapLumSampler               s4       1//   JitterSampler                s5       1//   StencilCopySampler           s6       1//quadstruct VS_OUTPUT_POST{float4 vpos  : POSITION;float2 txcoord0 : TEXCOORD0;};struct VS_INPUT_POST{float3 pos  : POSITION;float2 txcoord0 : TEXCOORD0;};//int4 _i0 : register(i0);/*float4 _c0 : register(c0);float4 _c1 : register(c1);float4 _c2 : register(c2);float4 _c3 : register(c3);float4 _c4 : register(c4);float4 _c5 : register(c5);float4 _c6 : register(c6);*/float4 _c44 : register(c44);float4 _c66 : register(c66);float4 _c72 : register(c72);float4 _c73 : register(c73);float4 _c74 : register(c74);float4 _c75 : register(c75);float4 _c76 : register(c76);float4 _c77 : register(c77);float4 _c78 : register(c78);float4 _c79 : register(c79);float4 _c80 : register(c80);float4 _c81 : register(c81);float4 _c82 : register(c82);float4 _c83 : register(c83);float4 _c84 : register(c84);float4 _c85 : register(c85);float maxi : register(c86);float temp : register(c87);texture2D texs0 : register(s0);texture2D texs1 : register(s1);texture2D texs2 : register(s2);texture2D texs3 : register(s3);texture2D texs4 : register(s4);texture2D texs5 : register(s5);texture2D texs6 : register(s6);texture2D texs7 : register(s7);texture2D texs13 : register(s13);//palettetexture2D texs15 : register(s15);//sampler2D s0=sampler_state { Texture=<texs0>; };//sampler2D s1=sampler_state { Texture=<texs1>; };sampler2D s2=sampler_state { Texture=<texs2>; };//sampler2D s3=sampler_state { Texture=<texs3>; };sampler2D s4=sampler_state { Texture=<texs4>; };sampler2D s5=sampler_state { Texture=<texs5>; };sampler2D s6=sampler_state { Texture=<texs6>; };sampler2D s7=sampler_state { Texture=<texs7>; };//sampler2D s13=sampler_state { Texture=<texs13>; };sampler2D s15=sampler_state { Texture=<texs15>; };//next samplers states fixing problems on ATI cardssampler2D s0 = sampler_state{  Texture   = <texs0>;MinFilter = LINEAR;//MagFilter = LINEAR;//MipFilter = NONE;//NONE;//LINEAR;AddressU  = Clamp;AddressV  = Clamp;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};sampler2D s1 = sampler_state{  Texture   = <texs1>;MinFilter = LINEAR;//MagFilter = LINEAR;//MipFilter = NONE;//NONE;//LINEAR;AddressU  = Clamp;AddressV  = Clamp;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};sampler2D s3 = sampler_state{  Texture   = <texs3>;MinFilter = LINEAR;//MagFilter = LINEAR;//MipFilter = NONE;//NONE;//LINEAR;AddressU  = Clamp;AddressV  = Clamp;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};sampler2D s13 = sampler_state{Texture   = <texs13>;MinFilter = LINEAR;MagFilter = LINEAR;MipFilter = NONE;AddressU  = Clamp;AddressV  = Clamp;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++////+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++float4 PS_C215BE6E(VS_OUTPUT_POST IN) : COLOR{float4 _oC0=0.0; //outputfloat4 _c0=float4(0, 0.212500006, 0.715399981, 0.0720999986);float4 _c1=float4(0.25, 1, 256, 0);float4 _c2=float4(0, 2, 4, 8);float4 _c3=float4(58.1640015, 47.1300011, 0, 0);float4 _c4=float4(-0.5, -1.5, 1.5, 0.5);float4 _c5=float4(2, -1, 0.125, 0);float4 _c6=float4(256, 2, 4, 8);//minefloat4 _c7=float4(1.0, 0.1, 0.8, 1.0);float4 _c8=float4(0.0, 0.1, 0.8, 0.333);float4 _c9=float4(0.06, 0.1, 0.8, 0.1);float4 _c10=float4(0.01, 1.4, 0.0, 0.32);float4 _c11=float4(0.333333, 1.0, 0.0, 0.0);float4 _c12=float4(0.27, 0.67, 0.06, 0.0);float4 _c13=float4(0.0, 0.0, 0.0, 0.00001);float4 _c150=float4(0.55, 0.9, 0.85, 0.9);float4 _c195=float4(0.0, 0.0, 0.0, 0.07);//0.7float4 r0;float4 r1;float4 r2;float4 r3;float4 r4;float4 r5;float4 r6;float4 r7;float4 r8;float4 r9;float4 r10;float4 r11;float4 _v0=0.0;_v0.xy=IN.txcoord0.xy;r1=tex2D(s2, _v0.xy); //HDRSamplerr2=tex2D(s3, _v0.xy); //BloomSampler//*************************float2 center;float depth;float focus;r0=tex2D(s1, _v0.xy); //GBufferTextureSampler3r0.y=-_c77.x + _c77.y; //-dofProj.x + dofProj.yr0.y=1.0/r0.y;r0.z=r0.y * _c77.y; //dofProj.yr0.z=r0.z * -_c77.x; //dofProj.xr0.x=_c77.y * -r0.y + r0.x;r0.x=1.0/r0.x;r0.y=r0.z * r0.x;r0.w=abs(_c79.w);r3=_c4; //-0.5, -1.5, 1.5, 0.5depth=r0.z * r0.x - _c78.w; //dofDist.wdepth+=_c78.y * -r3.w; //dofDist.ydepth+=148;//offsetcenter.x=_v0.x-0.5;center.y=0.5-_v0.y;//***************if(DoF_TAPS > 0){depth = max(depth, 0); //fix zoom bugfloat4 vDofParams = float4(0, 1.5, 450.0, 1.0); //near blur depth, focal plane depth, far blur depth, blurriness cut off constantfloat dist;if(depth < vDofParams.y)   dist = (depth - vDofParams.y)/(vDofParams.y - vDofParams.x);else{   dist = (depth - vDofParams.y)/(vDofParams.z - vDofParams.y);   dist = clamp(dist, 0, vDofParams.w);}   dist = dist * 0.5 + 0.5;/*static float2 poisson[24]={float2(1.0, 0.0), //0 degreesfloat2(0.0, -1.0),float2(-1.0, 0.0),float2(0.0, 1.0),float2(0.7071, 0.7071), //45 degreesfloat2(0.7071, 0.7071),float2(-0.7071, -0.7071),float2(-0.7071, 0.7071),float2(0.9659, 0.2588), //15 degreesfloat2(0.2588, -0.9659),float2(-0.9659, -0.2588),float2(-0.2588, 0.9659),float2(0.8660, 0.5000), //60 degreesfloat2(0.5000, -0.8660),float2(-0.8660, -0.5000),float2(-0.5000, 0.8660),float2(0.5000, 0.8660), //30 degreesfloat2(0.8660, -0.5000),float2(-0.5000, -0.8660),float2(-0.8660, 0.5000),float2(0.2588, 0.9659), //75 degreesfloat2(0.9659, -0.2588),float2(-0.2588, -0.9659),float2(-0.9659, 0.2588),};*/      static float3 poisson[60] =      {          float3( 0.2165, 0.1250, 1.0000 ),          float3( 0.0000, 0.2500, 1.0000 ),          float3( -0.2165, 0.1250, 1.0000 ),          float3( -0.2165, -0.1250, 1.0000 ),          float3( -0.0000, -0.2500, 1.0000 ),          float3( 0.2165, -0.1250, 1.0000 ),          float3( 0.4330, 0.2500, 1.0000 ),          float3( 0.0000, 0.5000, 1.0000 ),          float3( -0.4330, 0.2500, 1.0000 ),          float3( -0.4330, -0.2500, 1.0000 ),          float3( -0.0000, -0.5000, 1.0000 ),          float3( 0.4330, -0.2500, 1.0000 ),          float3( 0.6495, 0.3750, 1.0000 ),          float3( 0.0000, 0.7500, 1.0000 ),          float3( -0.6495, 0.3750, 1.0000 ),          float3( -0.6495, -0.3750, 1.0000 ),          float3( -0.0000, -0.7500, 1.0000 ),          float3( 0.6495, -0.3750, 1.0000 ),          float3( 0.8660, 0.5000, 1.0000 ),          float3( 0.0000, 1.0000, 1.0000 ),          float3( -0.8660, 0.5000, 1.0000 ),          float3( -0.8660, -0.5000, 1.0000 ),          float3( -0.0000, -1.0000, 1.0000 ),          float3( 0.8660, -0.5000, 1.0000 ),          float3( 0.2163, 0.3754, 0.8670 ),          float3( -0.2170, 0.3750, 0.8670 ),          float3( -0.4333, -0.0004, 0.8670 ),          float3( -0.2163, -0.3754, 0.8670 ),          float3( 0.2170, -0.3750, 0.8670 ),          float3( 0.4333, 0.0004, 0.8670 ),          float3( 0.4328, 0.5004, 0.8847 ),          float3( -0.2170, 0.6250, 0.8847 ),          float3( -0.6498, 0.1246, 0.8847 ),          float3( -0.4328, -0.5004, 0.8847 ),          float3( 0.2170, -0.6250, 0.8847 ),          float3( 0.6498, -0.1246, 0.8847 ),          float3( 0.6493, 0.6254, 0.9065 ),          float3( -0.2170, 0.8750, 0.9065 ),          float3( -0.8663, 0.2496, 0.9065 ),          float3( -0.6493, -0.6254, 0.9065 ),          float3( 0.2170, -0.8750, 0.9065 ),          float3( 0.8663, -0.2496, 0.9065 ),          float3( 0.2160, 0.6259, 0.8851 ),          float3( -0.4340, 0.5000, 0.8851 ),          float3( -0.6500, -0.1259, 0.8851 ),          float3( -0.2160, -0.6259, 0.8851 ),          float3( 0.4340, -0.5000, 0.8851 ),          float3( 0.6500, 0.1259, 0.8851 ),          float3( 0.4325, 0.7509, 0.8670 ),          float3( -0.4340, 0.7500, 0.8670 ),          float3( -0.8665, -0.0009, 0.8670 ),          float3( -0.4325, -0.7509, 0.8670 ),          float3( 0.4340, -0.7500, 0.8670 ),          float3( 0.8665, 0.0009, 0.8670 ),          float3( 0.2158, 0.8763, 0.9070 ),          float3( -0.6510, 0.6250, 0.9070 ),          float3( -0.8668, -0.2513, 0.9070 ),          float3( -0.2158, -0.8763, 0.9070 ),          float3( 0.6510, -0.6250, 0.9070 ),          float3( 0.8668, 0.2513, 0.9070 )      };float2 pixelSizeHigh;float2 pixelSizeLow;pixelSizeHigh.x = 1.005 / _c44.x;pixelSizeHigh.y = 1.005 / _c44.y;pixelSizeLow.xy = pixelSizeHigh.xy;float2 vMaxCoC = float2(5.0, 10.0);float radiusScale = 0.4;float discRadius;float discRadiusLow;float centerDepth;float4 tdepth;float4  tapHigh;float4  tapLow;centerDepth = dist;discRadius = abs(centerDepth * vMaxCoC.y - vMaxCoC.x);discRadiusLow = discRadius * radiusScale;r1 = 0.0;for(int t = 0; t < DoF_TAPS; t++){   float2  coordLow = _v0.xy + (pixelSizeLow.xy * poisson[t].xy * discRadiusLow);   float2  coordHigh = _v0.xy + (pixelSizeHigh.xy * poisson[t].xy * discRadius);   tapLow = tex2D(s2, coordLow.xy) * poisson[t].z;   tapHigh = tex2D(s2, coordHigh.xy) * poisson[t].z;   tdepth = tex2D(s1, coordHigh.xy); //GBufferTextureSampler3   tdepth.y = -_c77.x + _c77.y; //-dofProj.x + dofProj.y   tdepth.y = 1.0 / tdepth.y;   tdepth.z = tdepth.y * _c77.y; //dofProj.y   tdepth.z = tdepth.z * -_c77.x; //dofProj.x   tdepth.x = _c77.y * -tdepth.y + tdepth.x;   tdepth.x = 1.0 / tdepth.x;   tdepth.w = tdepth.z * tdepth.x - _c78.w; //dofDist.w   tdepth.w += _c78.y * -r3.w; //dofDist.y   tdepth.w += 148;//offset   tdepth.w = max(tdepth.w, 0); //fix zoom bug   if(tdepth.w < vDofParams.y)       tapHigh.w = (tdepth.w - vDofParams.y)/(vDofParams.y - vDofParams.x);   else   {       tapHigh.w = (tdepth.w - vDofParams.y)/(vDofParams.z - vDofParams.y);       tapHigh.w = clamp(tapHigh.w, 0, vDofParams.w);   }       tapHigh.w = tapHigh.w * 0.5 + 0.5;   tapLow.w = tapHigh.w;   float  tapBlur = abs(tapHigh.w * 2.0 - 1.0);   float4  tap = lerp(tapHigh, tapLow, tapBlur);   if(tap.w >= centerDepth) tap.w = 1.0;   else tap.w = abs(tap.w * 2.0 - 1.0);   r1.xyz += tap.xyz * tap.w;   r1.w += tap.w;}r1.xyz /= r1.w;//float4 dofcolor = r1;//dofcolor.w = r1.w / DoF_TAPS;}//***************r1.w=dot(r1.xyz, r1.xyz); //dp3r1.w=1.0/r1.w;if (-r1.w<0.0){r3 = r1;r4 = r1;r5 = r1;r6 = r1;r7 = r1;}else{r3 = _c0.x;r4 = _c0.x;r5 = _c0.x;r6 = _c0.x;r7 = _c0.x;}r0.x=r0.z * r0.x - _c78.w; //dofDist.wr0.x=_c78.y * -r3.w + r0.x; //dofDist.yr1.w=max(r0.x, _c0.x); //0.0r0.x=1.0/_c78.z; //dofDist.zr0.x=r1.w * r0.x;r1.w=lerp(_c79.y, _c79.z, r0.x);//dofBlurr0.x=min(_c79.z, r1.w); //dofBlur.zr0.z=dot(r7.xyz, _c0.yzw); //0.212500006, 0.715399981, 0.0720999986r8.x=dot(r3.xyz, _c0.yzw); //0.212500006, 0.715399981, 0.0720999986r8.y=dot(r4.xyz, _c0.yzw); //0.212500006, 0.715399981, 0.0720999986r8.z=dot(r5.xyz, _c0.yzw); //0.212500006, 0.715399981, 0.0720999986r8.w=dot(r6.xyz, _c0.yzw); //0.212500006, 0.715399981, 0.0720999986r1.w=dot(r8, _c1.xxxx); //0.25r8=r8 - r1.w;r2.w=dot(r8, r8);r0.z=r0.z - r1.w;r0.z=r0.z * r0.z - r2.w;r0.x=r0.x*r0.x;if (r0.z<0.0){r0.x=r0.x;} else r0.x=_c1.y; //1.0r8=tex2D(s0, _v0.xy); //GBufferTextureSampler2r8.yz=_c1.yz; // 1.0, 256.0r9=r8.w * -r8.z + _c2; //0, 2, 4, 8if (r9.w<0.0) //r9<0.0{r9=_c1.w; //0.0} else r9=_c1.y; //1.0//r9 is filtered sky maskfloat skymask = r9.x;if(depth < 1000) skymask = 0.0;//r10=r8.w + tempc6;//c6.yzwx; //256, 2, 4, 8r10=r8.w * -_c6.x + _c6.yzwx; //256, 2, 4, 8if (r10.x<0.0){r10.x=-_c1.w; //0.0} else r10.x=-_c1.y; //1.0if (r10.y<0.0){r10.y=-_c1.w; //0.0} else r10.y=-_c1.y; //1.0if (r10.z<0.0){r10.z=-_c1.w; //0.0} else r10.z=-_c1.y; //1.0if (r10.w<0.0){r10.w=-_c1.w; //0.0} else r10.w=-_c1.y; //1.0r9=r9 + r10;r9=r9 * _c4.x; //-0.5r0.z=dot(r9, _c1.yyyy); //1.0r0.z=r0.z + _c4.w; //0.5r0.z=1.0/r0.z;r8.xzw=r3.xyz * r9.x;r7.xyz=r7 * _c4.w + r8.xzw; //0.5r7.xyz=r4 * r9.y + r7;r7.xyz=r5 * r9.z + r7;r7.xyz=r6 * r9.w + r7;r7.xyz=r0.z * r7;r0.z=-r0.x + _c1.y; //1.0r1.w=r0.x * _c1.x; //0.25r3.xyz=r3 * r1.w;r3.xyz=r7 * r0.z + r3;r3.xyz=r4 * r1.w + r3;r3.xyz=r5 * r1.w + r3;r3.xyz=r6 * r1.w + r3;//r4.xyz=_v0.yxy * _c5.x + _c5.y; //2, -1r4.x=_v0.y * _c5.x + _c5.y;r4.y=_v0.x * _c5.x + _c5.y;r4.z=_v0.y * _c5.x + _c5.y;r0.z=r4.y * _c77.z; //dofProj.zr0.z=r0.y * r0.z;r1.w=-r4.x * _c77.w; //dofProj.wr1.w=r0.y * r1.w;r5.xyz=r1.w * _c73; //motionBlurMatrix.2r5.xyz=r0.z * _c72 + r5; //motionBlurMatrix.1r5.xyz=-r0.y * _c74 + r5; //motionBlurMatrix.3r5.xyz=r5 + _c75; //motionBlurMatrix.4r0.y=-r5.z * _c77.z; //dofProj.zr0.y=1.0/r0.y;r6.x=r5.x * r0.y;r0.y=r5.z * _c77.w; //dofProj.wr0.y=1.0/r0.y;r6.y=r5.y * r0.y;//r0.yz=-r4 + r6.xxyw;r0.yz=-r4.yz + r6.xy;//r0.yz=r0 * _c80.x; //gDirectionalMotionBlurLength.xr0.y=r0.y * _c80.x;r0.z=r0.z * _c80.x;//r4.xy=r0.yzzw * _c5.z; //0.125r4.x=r0.y * _c5.z;r4.y=r0.z * _c5.z;r5=tex2D(s6, _v0.xy); //StencilCopySamplerr1.w=r5.x + -_c85.x; //PLAYER_MASK.xr4.zw=r3.xyxy * _c2.w; //8.0//r4.z=r3.x * _c2.w;//r4.w=r3.y * _c2.w;//r4.zw=_v0.xyxy * _c3.xyxy + r4; //58.1640015, 47.1300011r4.z=_v0.x * _c3.x + r4.z; //v2r4.w=_v0.y * _c3.y + r4.w; //v2r5=tex2D(s5, r4.zw); //JitterSamplerr2.w=r5.x + _c4.x; //-0.5//r4.zw=r4.xyxy * r2.w + _v0.xyxy; //v0r4.z=r4.x * r2.w + _v0.x; //v2r4.w=r4.y * r2.w + _v0.y; //v2r5.xyz=r3.xyz;r2.w=_c1.y; //1.0r3.w=_c1.y; //1.0//motion blurfor (int iii=0; iii<7; iii++){// r6.xy=r4 * r3.w + r4.zwzw; //v0r6.x=r4.x * r3.w + r4.z; //v2r6.y=r4.y * r3.w + r4.w; //v2r7=tex2D(s6, r6.xy);r5.w=r7.x - _c85.x;if (r5.w<0.0){ r5.w=_c1.y; //1.0} else r5.w=_c1.w; //0.0r6=tex2D(s2, r6.xy);r5.xyz=r6.xyz * r5.w + r5.xyz;r2.w=r2.w + r5.w;r3.w=r3.w + _c1.y; //1.0}r2.w=1.0/r2.w;//r0.yz=r0 * _c44.xxyw; //globalScreenSizer0.y=r0.y * _c44.x; //globalScreenSizer0.z=r0.z * _c44.y; //globalScreenSizer0.y=dot(r0.yz, r0.yz)+_c0.x;//dp2//r0.y=sqrt(r0.y);//r0.y=1.0/r0.y;r0.y=pow(r0.y, _c4.w); //0.5r0.y=r0.y * _c4.w; //0.5r0.x=r0.x + _c1.y; //1.0r0.x=1.0/r0.x;//r0.y is wrongr0.x=saturate(r0.y * r0.x);r4.xyz=r5 * r2.w - r3;r0.xyz=r0.x * r4 + r3;//_oC0.xyz=0.5*r0.xyz;if (-r1.w<0.0) r0.xyz=r3.xyz;if (-r0.w<0.0) r0.xyz=r1.xyz;//for future user11=r0;r1=tex2D(s4, _c0.x); //AdapLumSampler , 0.0r0.w=1.0/r1.x;r0.w=r0.w * _c81.y; //ToneMapParams.yr1.x=1.0/r0.w;r1.x=r1.x * _c81.x; //ToneMapParams.xr1.xyz=r2 * _c66.x - r1.x; //Exposure.xr2.xyz=max(r1, _c0.x); //0.0r1.xyz=r2 * _c81.z; //ToneMapParams.zr1.xyz=r1 * _c1.x; //0.25r0.xyz=r0 * _c66.x + r1; //Exposure.xr1.xyz=r0.w * r0;r1.x=dot(r1.xyz, _c0.yzw); //0.2125, 0.7154, 0.0721r0.xyz=r0 * r0.w - r1.x;r0.xyz=_c82.x * r0 + r1.x; //deSatContrastGamma.xr0.w=r1.x * _c84.w; //ColorShift.wr1.yzw=r0.w * _c84.xxyz; //ColorShift//darken as DarkeningAmount, but keeps colorsr2.x=saturate(r0.w);r0.xyz=r0.xyz - _c84.xyz * r0.w; //ColorShiftr0.xyz=r2.x * r0.xyz + r1.yzww;//coloring (green, brown, ...)r0.xyz=2.0 * r0.xyz * _c83.xyz; //ColorCorrect//keeps colors, changes lumar1.x=saturate(r1.x);//lumar0.w=_c82.z - _c1.y; //deSatContrastGamma.z - 1.0r2.x=pow(r1.x, r0.w);_oC0.xyz=r0.xyz * r2.x; //orig_oC0.w=_c1.y; //1.0//*******************************float4 color;color = r11;float4 colorbloom  =tex2D(s3, _v0.xy); //bloomcolorbloom.r *= 1.1;colorbloom.g *= 1.0;colorbloom.b *= 0.9;color += colorbloom * EBloomAmountV1;//increase colorfloat cgray = dot(color.xyz, 0.333);//lumafloat3 poweredcolor = pow(color.xyz, EColorSaturation);float newgray = dot(poweredcolor.xyz, 0.333);color.xyz = poweredcolor.xyz*cgray/(newgray+0.0001);r10.x = dot(color.xyz, _c12.xyz); //luminancer10.x = max(r10.x, 1.0) * EBrightnessV1;color *= r10.x;color.xyz = lerp(color.xyz, pow(color.xyz*2, 0.6), 0.3);r5 = tex2D(s4, _c0.x);//adaptation luminance//r5=1.0;//adaptationr5.w = r5.x;color.xyz /= r5.w;r3.xy = _c10.xwxw;r3.xy *= r5.w;color *= _c7.y; //pre multiplyr1 = color * _c7.z + _c7.w; //e multiplycolor /= r1;//HERE 0.8 is bloom for additive mixcolor += EBloomAmountAdditiveV1*colorbloom * r3.x;      color.xyz = lerp(color.xyz, 1 - pow(2.71, -color.xyz), 0.4);float middlegray = dot(color.xyz, 0.3333);float3 diffcolor = color.rgb-middlegray;color.rgb += diffcolor*1.0;color.xyz = saturate(color.xyz);color.xyz = lerp(color.xyz, sin(color.xyz*1.57079), 0.4);#ifdef APPLYGAMECOLORCORRECTION//apply original corrections (((r0.w=1.0;//_c81.y/r5.x;//r5 is AdapLumSamplerluma=0.27*color.r + 0.67*color.g + 0.06*color.b;color.xyz=color.xyz * r0.w - luma;color.xyz=_c82.x * color.xyz + luma; //deSatContrastGamma.xr0.w=luma * _c84.w; //ColorShift.wr1.xyz=r0.w * _c84.xyz; //ColorShift//darken as DarkeningAmount, but keeps colorscolor.xyz=color.xyz - _c84.xyz * r0.w; //ColorShiftcolor.xyz=saturate(r0.w) * color.xyz + r1.xyz;//coloring (green, brown, ...)color.xyz=2.0 * color.xyz * _c83.xyz; //ColorCorrect//desaturatingluma=saturate(luma);r0.w=_c82.z - _c1.y; //deSatContrastGamma.z - 1.0color.xyz=color.xyz * pow(luma, r0.w);#endif //APPLYGAMECOLORCORRECTION//pallete texture (0.082 version feature)#ifdef E_CC_PALETTEcolor.rgb=saturate(color.rgb);float3 brightness=0.001;//tex2D(s4, _c0.x);//adaptation luminance// brightness=brightness/(brightness+1.0);float3 palette;float4 uvsrc=0.0;uvsrc.y=brightness.r;uvsrc.x=color.r;palette.r=tex2Dlod(s13, uvsrc).r;uvsrc.x=color.g;uvsrc.y=brightness.g;palette.g=tex2Dlod(s13, uvsrc).g;uvsrc.x=color.b;uvsrc.y=brightness.b;palette.b=tex2Dlod(s13, uvsrc).b;color.rgb=palette.rgb;#endif //E_CC_PALETTEfloat luma = dot(color.xyz, _c12.xyz);float3 blend = luma.xxx;float L = min(1, max(0, 10*(luma - 0.45)));float3 result1 = 2.0 * color.xyz * blend;float3 result2 = 1.0 - 2.0*(1.0 - blend)*(1.0 - color.xyz);float3 newColor = lerp(result1.xyz, result2.xyz, L);float3 mixRGB = BP_factor * newColor.xyz;mixRGB += ((1.0f - BP_factor) * color.xyz);color.xyz = mixRGB;float Weight;r0.xyz = color.xyz;r2.x = dot(color.xyz, 0.3333);r2.x = 1 - pow(2.71, -r2.x*6.0);r2.x = r2.x * 0.125;r0.xyz = saturate(r0.xyz - r2.x);r0.xyz = lerp(r0.xyz, sin(r0.xyz*1.570796), 1.0);Weight=0.6 - r2.x*0.3;color.xyz=lerp(color.xyz, r0.xyz, Weight);r10.x = dot(color.xyz, _c12.xyz);color.xyz = lerp(color.xyz, r10.x, 0.1);/*focus = length(center.xy)*1.41421;focus = pow(focus, 5);color.xyz -= focus*0.3;*/color.xyz = saturate(color.xyz);_oC0.xyz=color.xyz;//_oC0.w=1.0;return _oC0;}//mine temporary post processtechnique Shader_C215BE6E{  pass p0  {PixelShader  = compile ps_3_0 PS_C215BE6E();}}//original shader of post processingtechnique Shader_ORIGINALPOSTPROCESS{  pass p0  {PixelShader=asm{//// Generated by Microsoft ® HLSL Shader Compiler 9.23.949.2378//// Parameters:////   sampler2D AdapLumSampler;//   sampler2D BloomSampler;//   float4 ColorCorrect;//   float4 ColorShift;//   float Exposure;//   sampler2D GBufferTextureSampler2;//   sampler2D GBufferTextureSampler3;//   sampler2D HDRSampler;//   sampler2D JitterSampler;//   float PLAYER_MASK;//   sampler2D StencilCopySampler;//   float4 TexelSize;//   float4 ToneMapParams;//   float4 deSatContrastGamma;//   float4 dofBlur;//   float4 dofDist;//   float4 dofProj;//   float gDirectionalMotionBlurLength;//   float4 globalScreenSize;//   row_major float4x4 motionBlurMatrix;////// Registers:////   Name                         Reg   Size//   ---------------------------- ----- ----//   globalScreenSize             c44      1//   Exposure                     c66      1//   motionBlurMatrix             c72      4//   TexelSize                    c76      1//   dofProj                      c77      1//   dofDist                      c78      1//   dofBlur                      c79      1//   gDirectionalMotionBlurLength c80      1//   ToneMapParams                c81      1//   deSatContrastGamma           c82      1//   ColorCorrect                 c83      1//   ColorShift                   c84      1//   PLAYER_MASK                  c85      1//   GBufferTextureSampler2       s0       1//   GBufferTextureSampler3       s1       1//   HDRSampler                   s2       1//   BloomSampler                 s3       1//   AdapLumSampler               s4       1//   JitterSampler                s5       1//   StencilCopySampler           s6       1//  ps_3_0  def c0, 0, 0.212500006, 0.715399981, 0.0720999986  def c1, 0.25, 1, 256, 0  def c2, 0, 2, 4, 8  def c3, 58.1640015, 47.1300011, 0, 0  def c4, -0.5, -1.5, 1.5, 0.5  def c5, 2, -1, 0.125, 0  def c6, 256, 2, 4, 8def c180, 0.0, 0.0, 0.0, 100.5def c181, 1.0, 0.0, 0.0, 20.01def c183, 800.0, 600.0, 0.0, 100.5  defi i0, 7, 0, 0, 0  dcl_texcoord v0.xy  dcl_2d s0  dcl_2d s1  dcl_2d s2  dcl_2d s3  dcl_2d s4  dcl_2d s5  dcl_2d s6  texld r0, v0, s1  add r0.y, -c77.x, c77.y  rcp r0.y, r0.y  mul r0.z, r0.y, c77.y  mul r0.z, r0.z, -c77.x  mad r0.x, c77.y, -r0.y, r0.x  rcp r0.x, r0.x  mul r0.y, r0.z, r0.x  texld r1, v0, s2  texld r2, v0, s3  abs r0.w, c79.w  mov r3, c4  mad r4.xy, c76, r3, v0  texld r4, r4, s2  mad r5.xy, c76, r3.zxzw, v0  texld r5, r5, s2  mad r3.xz, c76.xyyw, r3.wyzw, v0.xyyw  texld r6, r3.xzzw, s2  mad r3.xy, c76, r3.ywzw, v0  texld r7, r3, s2  dp3 r1.w, r4, r4  rcp r1.w, r1.w  cmp r3.xyz, -r1.w, c0.x, r4  dp3 r1.w, r5, r5  rcp r1.w, r1.w  cmp r4.xyz, -r1.w, c0.x, r5  dp3 r1.w, r6, r6  rcp r1.w, r1.w  cmp r5.xyz, -r1.w, c0.x, r6  dp3 r1.w, r7, r7  rcp r1.w, r1.w  cmp r6.xyz, -r1.w, c0.x, r7  dp3 r1.w, r1, r1  rcp r1.w, r1.w  cmp r7.xyz, -r1.w, c0.x, r1  mad r0.x, r0.z, r0.x, -c78.w  mad r0.x, c78.y, -r3.w, r0.x  max r1.w, r0.x, c0.x  rcp r0.x, c78.z  mul r0.x, r1.w, r0.x  lrp r1.w, r0.x, c79.z, c79.y  min r0.x, c79.z, r1.w  dp3 r0.z, r7, c0.yzww  dp3 r8.x, r3, c0.yzww  dp3 r8.y, r4, c0.yzww  dp3 r8.z, r5, c0.yzww  dp3 r8.w, r6, c0.yzww  dp4 r1.w, r8, c1.x  add r8, r8, -r1.w  dp4 r2.w, r8, r8  add r0.z, r0.z, -r1.w  mad r0.z, r0.z, r0.z, -r2.w  mul r0.x, r0.x, r0.x  cmp r0.x, r0.z, c1.y, r0.x  texld r8, v0, s0  mov r8.yz, c1  mad r9, r8.w, -r8.z, c2  cmp r9, r9, c1.y, c1.w  mad r10, r8.w, -c6.x, c6.yzwx  cmp r10, r10, -c1.y, -c1.w  add r9, r9, r10  mul r9, r9, c4.x  dp4 r0.z, r9, c1.y  add r0.z, r0.z, c4.w  rcp r0.z, r0.z  mul r8.xzw, r3.xyyz, r9.x  mad r7.xyz, r7, c4.w, r8.xzww  mad r7.xyz, r4, r9.y, r7  mad r7.xyz, r5, r9.z, r7  mad r7.xyz, r6, r9.w, r7  mul r7.xyz, r0.z, r7  add r0.z, -r0.x, c1.y  mul r1.w, r0.x, c1.x  mul r3.xyz, r3, r1.w  mad r3.xyz, r7, r0.z, r3  mad r3.xyz, r4, r1.w, r3  mad r3.xyz, r5, r1.w, r3  mad r3.xyz, r6, r1.w, r3  mad r4.xyz, v0.yxyw, c5.x, c5.y  mul r0.z, r4.y, c77.z  mul r0.z, r0.y, r0.z  mul r1.w, -r4.x, c77.w  mul r1.w, r0.y, r1.w  mul r5.xyz, r1.w, c73  mad r5.xyz, r0.z, c72, r5  mad r5.xyz, -r0.y, c74, r5  add r5.xyz, r5, c75  mul r0.y, -r5.z, c77.z  rcp r0.y, r0.y  mul r6.x, r5.x, r0.y  mul r0.y, r5.z, c77.w  rcp r0.y, r0.y  mul r6.y, r5.y, r0.y  add r0.yz, -r4, r6.xxyw  mul r0.yz, r0, c80.x  mul r4.xy, r0.yzzw, c5.z  texld r5, v0, s6  add r1.w, r5.x, -c85.x  mul r4.zw, r3.xyxy, c2.w  mad r4.zw, v0.xyxy, c3.xyxy, r4  texld r5, r4.zwzw, s5  add r2.w, r5.x, c4.x  mad r4.zw, r4.xyxy, r2.w, v0.xyxy  mov r5.xyz, r3  mov r2.w, c1.y  mov r3.w, c1.y  rep i0    mad r6.xy, r4, r3.w, r4.zwzw    texld r7, r6, s6    add r5.w, r7.x, -c85.x    cmp r5.w, r5.w, c1.w, c1.y    texld r6, r6, s2    mad r5.xyz, r6, r5.w, r5    add r2.w, r2.w, r5.w    add r3.w, r3.w, c1.y  endrep  rcp r2.w, r2.w  mul r0.yz, r0, c183.xxyw//c44.xxyw  dp2add r0.y, r0.yzzw, r0.yzzw, c0.x  rsq r0.y, r0.y  rcp r0.y, r0.y  mul r0.y, r0.y, c4.w  add r0.x, r0.x, c1.y  rcp r0.x, r0.x  mul_sat r0.x, r0.y, r0.x  mad r4.xyz, r5, r2.w, -r3  mad r0.xyz, r0.x, r4, r3  cmp r0.xyz, r1.w, r3, r0  cmp r0.xyz, -r0.w, r0, r1  texld r1, c0.x, s4  rcp r0.w, r1.x  mul r0.w, r0.w, c81.y  rcp r1.x, r0.w  mul r1.x, r1.x, c81.x  mad r1.xyz, r2, c66.x, -r1.x  max r2.xyz, r1, c0.x  mul r1.xyz, r2, c81.z  mul r1.xyz, r1, c1.x  mad r0.xyz, r0, c66.x, r1  mul r1.xyz, r0.w, r0  dp3 r1.x, r1, c0.yzww  mad r0.xyz, r0, r0.w, -r1.x  mad r0.xyz, c82.x, r0, r1.x  mul r0.w, r1.x, c84.w  mul r1.yzw, r0.w, c84.xxyz  mov_sat r2.x, r0.w  mad r0.xyz, c84, -r0.w, r0  mad r0.xyz, r2.x, r0, r1.yzww  mul r0.xyz, r0, c83  add r0.xyz, r0, r0  mov_sat r1.x, r1.x  add r0.w, -r8.y, c82.z  pow r2.x, r1.x, r0.w//mul r2.x, r2.x, c181.x  mul oC0.xyz, r0, r2.x  mov oC0.w, c1.y//texld r1, v0, s2//mul oC0.xyz, r1, c199.z};  }}

 

 

so what codes do I must to edit? I'm quite aware about the parameters from DP3 old fx but this new fx totally confuses me confused.gif

Share this post


Link to post
Share on other sites
gtasadude

 

FXAA, all credit goes to Timothy Lottes and Myster92.  smile.gif

 

About TSSAA, it needs previous frame and current frame, so it's impossible to implement in effect.txt.

That code is awesome, however it seems to have introduced problems for me. I'm using a slightly a modified version of Dpeasant's 1.0c2 settings converted to ENB 0.82, and when I applied your code it messed up the depth of field effect and introduced artifacts at high speeds in vehicles. Take a look at these two pictures to see what I mean. Here's my effect.txt as well, have I implemented the code correctly?

 

DOF Example: seems to have changed from the original to a complete different kind of DOF.

 

http://imageshack.us/photo/my-images/853/g...2314460104.png/

 

Artifacting Example: check around the bike in this screenshot, none of these issues are present with definition turned on, so it must be to do with the code.

 

http://imageshack.us/photo/my-images/339/g...2314460761.png/

 

EDIT: The trees also look quite bad now.

 

http://imageshack.us/photo/my-images/695/g...2314590599.png/

 

 

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//http://enbdev.com//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/THIS IS HLSL FILE FORMAT FOR EXECUTING ADDITIONALPOST PROCESSING EFFECTS. MAKE THE COPY BEFORE CHANGING IT!*///enable blurring, useless, disabled at all//#define EBLURRING//enable sharpening#define ESHARPENING//if defined, color sharpen, otherwise sharp by gray#define ESHARPENINGCOLOR//enable noise in dark areas#define ENOISEfloat SamplingRange=1.1; //sharpening or blurring rangefloat SharpeningAmount=0.2;float ScanLineAmount=0.0;float ScanLineRepeat=1.0; //0.5, 0.3333, 0.25, 0.125, so onfloat NoiseAmount=0.2;#define E_SHADER_3_0//keyboard controled variablesfloat tempF1;float tempF2;float tempF3;float tempF4;float tempF5;float tempF6;float tempF7;float tempF8;float tempF9;float tempF0;//global variables, already set before executing this codefloat ScreenSize; //width of the display resolution (1920 f.e.)float ScreenScaleY; //screen proportions (1.333 for 1920/1080)//texturestexture2D texColor;texture2D texNoise;sampler2D SamplerColor = sampler_state{Texture   = <texColor>;MinFilter = LINEAR;MagFilter = LINEAR;MipFilter = NONE;//NONE;AddressU  = Clamp;AddressV  = Clamp;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};sampler2D SamplerNoise = sampler_state{Texture   = <texNoise>;MinFilter = POINT;MagFilter = POINT;MipFilter = NONE;//NONE;AddressU  = Wrap;AddressV  = Wrap;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};struct VS_OUTPUT_POST {float4 vpos  : POSITION;float2 txcoord : TEXCOORD0;};struct VS_INPUT_POST {float3 pos  : POSITION;float2 txcoord : TEXCOORD0;};//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++////++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN){VS_OUTPUT_POST OUT;float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);OUT.vpos=pos;OUT.txcoord.xy=IN.txcoord.xy;return OUT;}float4 PS_PostProcess(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR{float4 res;float4 coord=0.0;coord.xy=IN.txcoord.xy;float4 origcolor;coord.w=0.0;origcolor=tex2Dlod(SamplerColor, coord);// coord.x=IN.txcoord.x-(1.5/ScreenSize);// float4 lshift=tex2Dlod(SamplerColor, coord);// coord.x=IN.txcoord.x+(1.5/ScreenSize);// float4 rshift=tex2Dlod(SamplerColor, coord);float2 offset[8]={float2(1.0, 1.0),float2(-1.0, -1.0),float2(-1.0, 1.0),float2(1.0, -1.0),float2(1.41, 0.0),float2(-1.41, 0.0),float2(0.0, 1.41),float2(0.0, -1.41)};int i=0;float4 tcol=origcolor;float invscreensize=1.0/ScreenSize;//for (i=0; i<8; i++) //higher qualityfor (i=0; i<4; i++){float2 tdir=offset[i].xy;coord.xy=IN.txcoord.xy+tdir.xy*invscreensize*SamplingRange;//*1.0;float4 ct=tex2Dlod(SamplerColor, coord);tcol+=ct;}tcol*=0.111; // 1.0/(4+1)//tcol*=0.111; // 1.0/(8+1)  //higher quality/*//not interesting#ifdef EBLURRING//blurres=tcol;#endif*///sharp#ifdef ESHARPENING#ifdef ESHARPENINGCOLOR//colorres=origcolor*(1.0+((origcolor-tcol)*SharpeningAmount));#else//non colorfloat difffact=dot((origcolor.xyz-tcol.xyz), 0.333);res=origcolor*(1.0+difffact*SharpeningAmount);#endif//less sharpening for bright pixelsfloat rgray=origcolor.z; //blue fit well//float rgray=max(origcolor.x, max(origcolor.y, origcolor.z));rgray=pow(rgray, 2.0);res=lerp(res, origcolor, saturate(rgray));#endif//grain noise#ifdef ENOISEfloat origgray=max(res.x, res.y);//dot(res.xyz, 0.333);origgray=max(origgray, res.z);coord.xy=IN.txcoord.xy*16.0 + origgray;float4 cnoi=tex2Dlod(SamplerNoise, coord);res=lerp(res, (cnoi.x+0.5)*res, NoiseAmount*saturate(1.0-origgray*1.8));#endifres.w=1.0;return res;}/*============================================================================  FXAA3 QUALITY - PC NVIDIA FXAA III.8 by TIMOTHY LOTTES============================================================================*/  #define FXAA_LINEAR 0  #define FXAA_QUALITY__EDGE_THRESHOLD (1.0/8.0)  #define FXAA_QUALITY__EDGE_THRESHOLD_MIN (1.0/16.0)  #define FXAA_QUALITY__SUBPIX_CAP (7.0/8.0)  #define FXAA_QUALITY__SUBPIX_TRIM (1.0/8.0)  #define FXAA_QUALITY__SUBPIX_TRIM_SCALE  (1.0/(1.0 - FXAA_QUALITY__SUBPIX_TRIM))  #define FXAA_SEARCH_STEPS     8  #define FXAA_SEARCH_THRESHOLD (1.0/4.0)float4 FxaaPixelShader(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR{   #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))#define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))float2 pos = IN.txcoord.xy;float2 rcpFrame = float2(1/ScreenSize, ScreenScaleY/ScreenSize);float4 rcpFrameOpt = float4(2/ScreenSize, 2*ScreenScaleY/ScreenSize, 0.5/ScreenSize, 0.5*ScreenScaleY/ScreenSize);float lumaN = dot(FxaaTexOff(SamplerColor, pos.xy, float2(0, -1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1, 0), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float4 rgbyM;rgbyM.xyz = FxaaTexTop(SamplerColor, pos.xy).xyz;rgbyM.w = dot(rgbyM.xyz, float3(0.299, 0.587, 0.114));float lumaE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1, 0), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaS = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 0, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaM = rgbyM.w;float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE)));float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE)));float range = rangeMax - rangeMin;if(range < max(FXAA_QUALITY__EDGE_THRESHOLD_MIN, rangeMax * FXAA_QUALITY__EDGE_THRESHOLD)) return rgbyM;float lumaNW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1,-1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaNE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1,-1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaSW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaSE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25;float rangeL = abs(lumaL - lumaM);float blendL = saturate((rangeL / range) - FXAA_QUALITY__SUBPIX_TRIM) * FXAA_QUALITY__SUBPIX_TRIM_SCALE; blendL = min(FXAA_QUALITY__SUBPIX_CAP, blendL);float edgeVert = abs(lumaNW + (-2.0 * lumaN) + lumaNE) + 2.0 * abs(lumaW  + (-2.0 * lumaM) + lumaE ) + abs(lumaSW + (-2.0 * lumaS) + lumaSE);   float edgeHorz = abs(lumaNW + (-2.0 * lumaW) + lumaSW) + 2.0 * abs(lumaN  + (-2.0 * lumaM) + lumaS ) + abs(lumaNE + (-2.0 * lumaE) + lumaSE);   bool horzSpan = edgeHorz >= edgeVert;float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x;if(!horzSpan) lumaN = lumaW;if(!horzSpan) lumaS = lumaE;float gradientN = abs(lumaN - lumaM);float gradientS = abs(lumaS - lumaM);lumaN = (lumaN + lumaM) * 0.5;lumaS = (lumaS + lumaM) * 0.5;bool pairN = gradientN >= gradientS;if(!pairN) lumaN = lumaS;if(!pairN) gradientN = gradientS;if(!pairN) lengthSign *= -1.0;float2 posN;posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5);posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0);gradientN *= FXAA_SEARCH_THRESHOLD;float2 posP = posN;float2 offNP = horzSpan ? float2(rcpFrame.x, 0.0) :float2(0.0f, rcpFrame.y); float lumaEndN;float lumaEndP;	bool doneN = false;bool doneP = false;posN += offNP * (-1.5);posP += offNP * ( 1.5);for(int i = 0; i < FXAA_SEARCH_STEPS; i++) {lumaEndN = dot(FxaaTexTop(SamplerColor, posN.xy).xyz, float3(0.299, 0.587, 0.114));lumaEndP = dot(FxaaTexTop(SamplerColor, posP.xy).xyz, float3(0.299, 0.587, 0.114));bool doneN2 = abs(lumaEndN - lumaN) >= gradientN;bool doneP2 = abs(lumaEndP - lumaN) >= gradientN;if(doneN2 && !doneN) posN += offNP;if(doneP2 && !doneP) posP -= offNP;if(doneN2 && doneP2) break;doneN = doneN2;doneP = doneP2;if(!doneN) posN -= offNP * 2.0;if(!doneP) posP += offNP * 2.0; }float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y;float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y;bool directionN = dstN < dstP;lumaEndN = directionN ? lumaEndN : lumaEndP;if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0)) lengthSign = 0.0;float spanLength = (dstP + dstN);dstN = directionN ? dstN : dstP;float subPixelOffset = 0.5 + (dstN * (-1.0/spanLength));subPixelOffset += blendL * (1.0/8.0);subPixelOffset *= lengthSign;float3 rgbF = FxaaTexTop(SamplerColor, float2(pos.x + (horzSpan ? 0.0 : subPixelOffset), pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz;  #if (FXAA_LINEAR == 1)lumaL *= lumaL;  #endif  float lumaF = dot(rgbF, float3(0.299, 0.587, 0.114)) + (1.0/(65536.0*256.0));  float lumaB = lerp(lumaF, lumaL, blendL);  float scale = min(4.0, lumaB/lumaF);  rgbF *= scale;  return float4(rgbF, lumaM); }technique PostProcess{  pass P0  {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}technique PostProcess2{  pass P0  {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}technique PostProcess3{  pass P0  {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}technique PostProcess4{  pass P0  {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++////++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++technique PostProcess{  pass P0  {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 PS_PostProcess();DitherEnable=FALSE;ZEnable=FALSE;CullMode=NONE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;StencilEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}

 

 

EDIT: It doesn't even look like the AA has been applied... do I have to have AA enabled in my ENBSeries config as well? I turned it off, because from my understanding this is an alternative way of anti-aliasing, where you can leave AA off in your ENB config and get the AA look to your game with minimal FPS hit.

Edited by gtasadude

Share this post


Link to post
Share on other sites
portal2x2

Your help companions is necessary!!! As well as where in enbeffect.fx to adjust force of illumination prompt please???

Share this post


Link to post
Share on other sites
AlexFake

Some change in cfg on my notebook. FAXX. AA=false. DOF by stphy. SSAO. New bloom.

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

user posted imageuser posted image

user posted image

Share this post


Link to post
Share on other sites
gtasadude

Sorry to double post but effectively what I'm asking is this: how do I implement FXAA into this effect.txt, and do I need to disable or enable AA in my enbseries.cfg?

 

 

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//http://enbdev.com//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/THIS IS HLSL FILE FORMAT FOR EXECUTING ADDITIONALPOST PROCESSING EFFECTS. MAKE THE COPY BEFORE CHANGING IT!*///enable blurring, useless, disabled at all//#define EBLURRING//enable sharpening#define ESHARPENING//if defined, color sharpen, otherwise sharp by gray#define ESHARPENINGCOLOR//enable noise in dark areas#define ENOISEfloat SamplingRange=1.1; //sharpening or blurring rangefloat SharpeningAmount=0.2;float ScanLineAmount=0.0;float ScanLineRepeat=1.0; //0.5, 0.3333, 0.25, 0.125, so onfloat NoiseAmount=0.2;#define E_SHADER_3_0//keyboard controled variablesfloat tempF1;float tempF2;float tempF3;float tempF4;float tempF5;float tempF6;float tempF7;float tempF8;float tempF9;float tempF0;//global variables, already set before executing this codefloat ScreenSize; //width of the display resolution (1920 f.e.)float ScreenScaleY; //screen proportions (1.333 for 1920/1080)//texturestexture2D texColor;texture2D texNoise;sampler2D SamplerColor = sampler_state{Texture   = <texColor>;MinFilter = LINEAR;MagFilter = LINEAR;MipFilter = NONE;//NONE;AddressU  = Clamp;AddressV  = Clamp;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};sampler2D SamplerNoise = sampler_state{Texture   = <texNoise>;MinFilter = POINT;MagFilter = POINT;MipFilter = NONE;//NONE;AddressU  = Wrap;AddressV  = Wrap;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};struct VS_OUTPUT_POST {float4 vpos  : POSITION;float2 txcoord : TEXCOORD0;};struct VS_INPUT_POST {float3 pos  : POSITION;float2 txcoord : TEXCOORD0;};//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++////++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN){VS_OUTPUT_POST OUT;float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);OUT.vpos=pos;OUT.txcoord.xy=IN.txcoord.xy;return OUT;}float4 PS_PostProcess(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR{float4 res;float4 coord=0.0;coord.xy=IN.txcoord.xy;float4 origcolor;coord.w=0.0;origcolor=tex2Dlod(SamplerColor, coord);// coord.x=IN.txcoord.x-(1.5/ScreenSize);// float4 lshift=tex2Dlod(SamplerColor, coord);// coord.x=IN.txcoord.x+(1.5/ScreenSize);// float4 rshift=tex2Dlod(SamplerColor, coord);float2 offset[8]={float2(1.0, 1.0),float2(-1.0, -1.0),float2(-1.0, 1.0),float2(1.0, -1.0),float2(1.41, 0.0),float2(-1.41, 0.0),float2(0.0, 1.41),float2(0.0, -1.41)};int i=0;float4 tcol=origcolor;float invscreensize=1.0/ScreenSize;//for (i=0; i<8; i++) //higher qualityfor (i=0; i<4; i++){float2 tdir=offset[i].xy;coord.xy=IN.txcoord.xy+tdir.xy*invscreensize*SamplingRange;//*1.0;float4 ct=tex2Dlod(SamplerColor, coord);tcol+=ct;}tcol*=0.111; // 1.0/(4+1)//tcol*=0.111; // 1.0/(8+1)  //higher quality/*//not interesting#ifdef EBLURRING//blurres=tcol;#endif*///sharp#ifdef ESHARPENING#ifdef ESHARPENINGCOLOR//colorres=origcolor*(1.0+((origcolor-tcol)*SharpeningAmount));#else//non colorfloat difffact=dot((origcolor.xyz-tcol.xyz), 0.333);res=origcolor*(1.0+difffact*SharpeningAmount);#endif//less sharpening for bright pixelsfloat rgray=origcolor.z; //blue fit well//float rgray=max(origcolor.x, max(origcolor.y, origcolor.z));rgray=pow(rgray, 2.0);res=lerp(res, origcolor, saturate(rgray));#endif//grain noise#ifdef ENOISEfloat origgray=max(res.x, res.y);//dot(res.xyz, 0.333);origgray=max(origgray, res.z);coord.xy=IN.txcoord.xy*16.0 + origgray;float4 cnoi=tex2Dlod(SamplerNoise, coord);res=lerp(res, (cnoi.x+0.5)*res, NoiseAmount*saturate(1.0-origgray*1.8));#endifres.w=1.0;return res;}//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++////++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++technique PostProcess{  pass P0  {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 PS_PostProcess();DitherEnable=FALSE;ZEnable=FALSE;CullMode=NONE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;StencilEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}

 

Share this post


Link to post
Share on other sites
fjlour

How can I decrease the amount of DoF distant blur in Dpeasants settings?

 

With AA it's nice, but with AA off it is too much blurry on the horizon, it's ugly.

 

Thanks, guys.

Share this post


Link to post
Share on other sites
gp65cj04
FXAA, all credit goes to Timothy Lottes and Myster92.  smile.gif

 

About TSSAA, it needs previous frame and current frame, so it's impossible to implement in effect.txt.

That code is awesome, however it seems to have introduced problems for me. I'm using a slightly a modified version of Dpeasant's 1.0c2 settings converted to ENB 0.82, and when I applied your code it messed up the depth of field effect and introduced artifacts at high speeds in vehicles. Take a look at these two pictures to see what I mean. Here's my effect.txt as well, have I implemented the code correctly?

 

DOF Example: seems to have changed from the original to a complete different kind of DOF.

 

http://imageshack.us/photo/my-images/853/g...2314460104.png/

 

Artifacting Example: check around the bike in this screenshot, none of these issues are present with definition turned on, so it must be to do with the code.

 

http://imageshack.us/photo/my-images/339/g...2314460761.png/

 

EDIT: The trees also look quite bad now.

 

http://imageshack.us/photo/my-images/695/g...2314590599.png/

 

EDIT: It doesn't even look like the AA has been applied... do I have to have AA enabled in my ENBSeries config as well? I turned it off, because from my understanding this is an alternative way of anti-aliasing, where you can leave AA off in your ENB config and get the AA look to your game with minimal FPS hit.

It's motion blur's bug that causing ghosting around the bike or car, not dof's fault.

 

effect.txt contains with Boris's sharp and noise code

 

 

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//http://enbdev.com//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/*THIS IS HLSL FILE FORMAT FOR EXECUTING ADDITIONALPOST PROCESSING EFFECTS. MAKE THE COPY BEFORE CHANGING IT!*///enable sharpening#define ESHARPENING//if defined, color sharpen, otherwise sharp by gray#define ESHARPENINGCOLOR//enable noise in dark areas#define ENOISEfloat SamplingRange=1.1; //sharpening or blurring rangefloat SharpeningAmount=1.5;float ScanLineAmount=0.0;float ScanLineRepeat=0.0; //0.5, 0.3333, 0.25, 0.125, so onfloat NoiseAmount=0.15;//keyboard controled variablesfloat tempF1;float tempF2;float tempF3;float tempF4;float tempF5;float tempF6;float tempF7;float tempF8;float tempF9;float tempF0;//global variables, already set before executing this codefloat ScreenSize; //width of the display resolution (1920 f.e.)float ScreenScaleY; //screen proportions (1.333 for 1920/1080)//texturestexture2D texColor;texture2D texNoise;sampler2D SamplerColor = sampler_state{Texture   = <texColor>;MinFilter = LINEAR;MagFilter = LINEAR;MipFilter = NONE;//NONE;AddressU  = Clamp;AddressV  = Clamp;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};sampler2D SamplerNoise = sampler_state{Texture   = <texNoise>;MinFilter = POINT;MagFilter = POINT;MipFilter = NONE;//NONE;AddressU  = Wrap;AddressV  = Wrap;SRGBTexture=FALSE;MaxMipLevel=0;MipMapLodBias=0;};struct VS_OUTPUT_POST {float4 vpos  : POSITION;float2 txcoord : TEXCOORD0;};struct VS_INPUT_POST {float3 pos  : POSITION;float2 txcoord : TEXCOORD0;};//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++////++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN){VS_OUTPUT_POST OUT;float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);OUT.vpos=pos;OUT.txcoord.xy=IN.txcoord.xy;return OUT;}/*============================================================================   FXAA3 QUALITY - PC 	NVIDIA FXAA III.8 by TIMOTHY LOTTES============================================================================*/   #define FXAA_LINEAR 0   #define FXAA_QUALITY__EDGE_THRESHOLD (1.0/16.0)   #define FXAA_QUALITY__EDGE_THRESHOLD_MIN (1.0/16.0)   #define FXAA_QUALITY__SUBPIX_CAP (3.0/4.0)   #define FXAA_QUALITY__SUBPIX_TRIM (1.0/4.0)   #define FXAA_QUALITY__SUBPIX_TRIM_SCALE  (1.0/(1.0 - FXAA_QUALITY__SUBPIX_TRIM))   #define FXAA_SEARCH_STEPS     8   #define FXAA_SEARCH_THRESHOLD (1.0/4.0)float4 FxaaPixelShader(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR{   #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))#define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))float2 pos = IN.txcoord.xy;float2 rcpFrame = float2(1/ScreenSize, ScreenScaleY/ScreenSize);float4 rcpFrameOpt = float4(2/ScreenSize, 2*ScreenScaleY/ScreenSize, 0.5/ScreenSize, 0.5*ScreenScaleY/ScreenSize);float lumaN = dot(FxaaTexOff(SamplerColor, pos.xy, float2(0, -1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1, 0), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float4 rgbyM;rgbyM.xyz = FxaaTexTop(SamplerColor, pos.xy).xyz;rgbyM.w = dot(rgbyM.xyz, float3(0.299, 0.587, 0.114));float lumaE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1, 0), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaS = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 0, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaM = rgbyM.w;float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE)));float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE)));float range = rangeMax - rangeMin;if(range < max(FXAA_QUALITY__EDGE_THRESHOLD_MIN, rangeMax * FXAA_QUALITY__EDGE_THRESHOLD)) return rgbyM;float lumaNW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1,-1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaNE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1,-1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaSW = dot(FxaaTexOff(SamplerColor, pos.xy, float2(-1, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaSE = dot(FxaaTexOff(SamplerColor, pos.xy, float2( 1, 1), rcpFrame.xy).xyz, float3(0.299, 0.587, 0.114));float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25;float rangeL = abs(lumaL - lumaM);float blendL = saturate((rangeL / range) - FXAA_QUALITY__SUBPIX_TRIM) * FXAA_QUALITY__SUBPIX_TRIM_SCALE; blendL = min(FXAA_QUALITY__SUBPIX_CAP, blendL);float edgeVert = abs(lumaNW + (-2.0 * lumaN) + lumaNE) + 2.0 * abs(lumaW  + (-2.0 * lumaM) + lumaE ) + abs(lumaSW + (-2.0 * lumaS) + lumaSE);   	float edgeHorz = abs(lumaNW + (-2.0 * lumaW) + lumaSW) + 2.0 * abs(lumaN  + (-2.0 * lumaM) + lumaS ) + abs(lumaNE + (-2.0 * lumaE) + lumaSE);   	bool horzSpan = edgeHorz >= edgeVert;float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x;if(!horzSpan) lumaN = lumaW;if(!horzSpan) lumaS = lumaE;float gradientN = abs(lumaN - lumaM);float gradientS = abs(lumaS - lumaM);lumaN = (lumaN + lumaM) * 0.5;lumaS = (lumaS + lumaM) * 0.5;bool pairN = gradientN >= gradientS;if(!pairN) lumaN = lumaS;if(!pairN) gradientN = gradientS;if(!pairN) lengthSign *= -1.0;float2 posN;posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5);posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0);gradientN *= FXAA_SEARCH_THRESHOLD;float2 posP = posN;float2 offNP = horzSpan ? float2(rcpFrame.x, 0.0) :float2(0.0f, rcpFrame.y); float lumaEndN;float lumaEndP;	bool doneN = false;bool doneP = false;posN += offNP * (-1.5);posP += offNP * ( 1.5);for(int i = 0; i < FXAA_SEARCH_STEPS; i++) { lumaEndN = dot(FxaaTexTop(SamplerColor, posN.xy).xyz, float3(0.299, 0.587, 0.114)); lumaEndP = dot(FxaaTexTop(SamplerColor, posP.xy).xyz, float3(0.299, 0.587, 0.114)); bool doneN2 = abs(lumaEndN - lumaN) >= gradientN; bool doneP2 = abs(lumaEndP - lumaN) >= gradientN; if(doneN2 && !doneN) posN += offNP; if(doneP2 && !doneP) posP -= offNP; if(doneN2 && doneP2) break; doneN = doneN2; doneP = doneP2; if(!doneN) posN -= offNP * 2.0; if(!doneP) posP += offNP * 2.0; }float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y;float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y;bool directionN = dstN < dstP;lumaEndN = directionN ? lumaEndN : lumaEndP;if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0)) lengthSign = 0.0;float spanLength = (dstP + dstN);dstN = directionN ? dstN : dstP;float subPixelOffset = 0.5 + (dstN * (-1.0/spanLength));subPixelOffset += blendL * (1.0/8.0);subPixelOffset *= lengthSign;float3 rgbF = FxaaTexTop(SamplerColor, float2(pos.x + (horzSpan ? 0.0 : subPixelOffset), pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz;   	#if (FXAA_LINEAR == 1) lumaL *= lumaL;   	#endiffloat lumaF = dot(rgbF, float3(0.299, 0.587, 0.114)) + (1.0/(65536.0*256.0));float lumaB = lerp(lumaF, lumaL, blendL);float scale = min(4.0, lumaB/lumaF);rgbF *= scale;return float4(rgbF, lumaM); }float4 PS_Sharp_Noise(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR{float4 res;float4 coord=0.0;coord.xy=IN.txcoord.xy;float4 origcolor;coord.w=0.0;origcolor=tex2Dlod(SamplerColor, coord);float2 offset[8]={ 	float2(1.0, 1.0), 	float2(-1.0, -1.0), 	float2(-1.0, 1.0), 	float2(1.0, -1.0), 	float2(1.41, 0.0), 	float2(-1.41, 0.0), 	float2(0.0, 1.41), 	float2(0.0, -1.41)};int i=0;float4 tcol=origcolor;float invscreensize=1.0/ScreenSize;for (i=0; i<8; i++) //higher quality{ 	float2 tdir=offset[i].xy; 	coord.xy=IN.txcoord.xy+tdir.xy*invscreensize*SamplingRange;//*1.0; 	float4 ct=tex2Dlod(SamplerColor, coord); 	tcol+=ct;}tcol*=0.111; // 1.0/(8+1)  //higher quality//sharp#ifdef ESHARPENING#ifdef ESHARPENINGCOLOR//colorres=origcolor*(1.0+((origcolor-tcol)*SharpeningAmount));#else //non colorfloat difffact=dot((origcolor.xyz-tcol.xyz), 0.333);res=origcolor*(1.0+difffact*SharpeningAmount);#endif//less sharpening for bright pixelsfloat rgray=origcolor.z; //blue fit well//float rgray=max(origcolor.x, max(origcolor.y, origcolor.z));rgray=pow(rgray, 3.0);res=lerp(res, origcolor, saturate(rgray));#endif//grain noise#ifdef ENOISEfloat origgray=max(res.x, res.y);//dot(res.xyz, 0.333);origgray=max(origgray, res.z);coord.xy=IN.txcoord.xy*16.0 + origgray;float4 cnoi=tex2Dlod(SamplerNoise, coord);res=lerp(res, (cnoi.x+0.5)*res, NoiseAmount*saturate(1.0-origgray*1.8));#endifres.w=1.0;return res;}technique PostProcess{   pass P0   {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}technique PostProcess2{   pass P0   {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}technique PostProcess3{   pass P0   {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}technique PostProcess4{   pass P0   {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 FxaaPixelShader();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}technique PostProcess5{   pass P0   {VertexShader = compile vs_3_0 VS_PostProcess();PixelShader  = compile ps_3_0 PS_Sharp_Noise();FogEnable=FALSE;ALPHATESTENABLE=FALSE;SEPARATEALPHABLENDENABLE=FALSE;AlphaBlendEnable=FALSE;FogEnable=FALSE;SRGBWRITEENABLE=FALSE;}}

 

Share this post


Link to post
Share on other sites
dmit.tor

 

user posted imageuser posted image

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.