SweetFX Shader Suite release and discussion thread #2

Discussion in 'Games, Gaming & Game-demos' started by Hilbert Hagedoorn, Jan 8, 2013.

Thread Status:
Not open for further replies.
  1. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    1
    GPU:
    Radeon 6870
    Yes, when it's done.

    I think I'm going to push the LumaSharpen changes back a release, so I can get this release out sooner.
    BTW the problem with sharpening and AA, is not so much a problem with either the SMAA or LumaSharpen shader but more a problem with having to run different shaders that sample the original image in the same pass, which I'm forced to do because InjectSMAA was hardcoded that way. It was after all only intended to run SMAA and nothing else.

    When LumaSharpen runs it needs to sample image and apply sharpening, but because the pixel have not been out after SMAA ran, it can only see the image before SMAA and so it sharpens based on that. My workaround is the find the difference between the original and the sharpened pixel and then apply that to the output of SMAA, which makes it possible to use both shaders, but unfortunately some of the aliasing returns. But it was this or nothing.

    Hopefully a better injector will allow me to do as many extra passes as I want so this won't be a problem.

    Improvement to Curves are done, but while I was doing them, I got to doing optimizations too and now some of the formulas run faster and I got new ideas, started researching, did some more coding and implemented splines!

    // -- Curve 10 --
    #if Curves_formula == 10 //Cubic catmull (say that 10 times fast)
    float a = 1.00; //control point 1
    float b = 0.00; //start point
    float c = 1.00; //endpoint
    float d = 0.20; //control point 2
    x = 0.5 * ((-a + 3*b -3*c + d)*x*x*x + (2*a -5*b + 4*c - d)*x*x + (-a+c)*x + 2*b); //A customizable cubic catmull-rom spline
    #endif

    // -- Curve 11 --
    #if Curves_formula == 11 //Cubic Bezier spline
    float a = 0.00; //start point
    float b = 0.00; //control point 1
    float c = 1.00; //control point 2
    float d = 1.00; //endpoint

    float r = (1-x);
    float r2 = r*r;
    float r3 = r2 * r;
    float x2 = x*x;
    float x3 = x2*x;
    //x = dot(float4(a,b,c,d),float4(r3,3*r2*x,3*r*x2,x3));

    //x = a * r*r*r + r * (3 * b * r * x + 3 * c * x*x) + d * x*x*x;
    //x = a*(1-x)*(1-x)*(1-x) +(1-x) * (3*b * (1-x) * x + 3 * c * x*x) + d * x*x*x;
    x = a*(1-x)*(1-x)*(1-x) + 3*b*(1-x)*(1-x)*x + 3*c*(1-x)*x*x + d*x*x*x;
    #endif

    Note the above examples are working but not yet optimized fully.
    They also need to take vectors as input for the control points instead of just scalars and they need to be able to control RGB and Luma separately and I'm not that far yet.

    It's a big step towards being able to do color grading using Gimp curves with splines
    Gimp uses Bezier splines, and I'm getting there with my Bezier spline code, but I also implemented Catmull-rom splines while I was at it.

    Hmm seeing that page just now makes me think I can code a shader for the black and white part .. in less than 30 minutes.

    Be right back ..

    Oh btw .. to sum up. It's quite done yet, but I'm back on the case .. ideas are sparking , fingers are racing over the keyboard and the math is fun.
    I'm in a good mood.

    EDIT: There .. new monochrome shader added.
    It allows you to set custom conversion values to convert from RGB to greyscale.
    I put it before LiftGammaGain so you can combine the two to do mono- duo and tri-toning. Should make for some interesting artistic screenshots.
     
    Last edited: Mar 14, 2013
  2. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    1
    GPU:
    Radeon 6870
    I concur. ( +1 )
     
  3. Gramps

    Gramps Active Member

    Messages:
    84
    Likes Received:
    0
    GPU:
    PNY GTX 770 4GB OC
    Thanks for the reply.

    I'm just wondering, why you three don't work on it together, instead of doing seperate ones?
     
  4. sexus

    sexus Master Guru

    Messages:
    300
    Likes Received:
    0
    GPU:
    EVGA GF GTX 680 sli
    hey marcel , lovin dat crysis 2 sweetfx config , lookin great , you usin maldo 4.0 hd pack as well with that i asume
     

  5. somebody2978

    somebody2978 Member

    Messages:
    41
    Likes Received:
    0
    GPU:
    ZOTAC GTX 650 Ti 2GB AMP!
    I'm running Tomb Raider 2013 with DX9/x86. The old SMAA (v1.3) works perfectly if I disable the post processing of the game, but causes artifacts if I active it.
    If I use your new DLL, I can turn on post processing of the game without it causes artifacts. Even working all the effects of the new DLL.
    However, the new SMAA not working properly (with or without post processing of the game enabled). While at first seemed not work, with closer inspection I noticed that the new SMAA is active, but works veeeery inefficiently, correct the 10% of the aliasing on screen, is almost imperceptible.
    The old SMAA worked very well.

    I'm using the FXAA from game, combined with the rest of the effects of new DLL and everything seems to work fine.
    Although I rather use the old SMAA previous...

    Forcing DX9 by reg, nothing has changed at all.
     
    Last edited: Mar 15, 2013
  6. adawe

    adawe Member

    Messages:
    21
    Likes Received:
    0
    GPU:
    7700
    next version add color temperature setting
     
  7. alientorni

    alientorni Active Member

    Messages:
    88
    Likes Received:
    0
    GPU:
    MSI 5770 (bios6770) Hawk
    cj! now that you're in good mood :D

    would you mind to check this?
    is about radeon pro's sweetFX injector.

    i've posted something like this some time ago. but now with tomb raider as an update.
    the problem is with colors, contrasts, etc. there are a few differences on final results with the same configs.

    SwFX off
    [​IMG]

    SwFX on native smaa injector
    [​IMG]

    SwFX on RP injector
    [​IMG]
    i'm using

    RGB_Lift = float3(0.955, 0.955, 0.960)// USE_LIFTGAMMAGAIN
    RGB_Gamma = float3(1.070, 1.070, 1.080)// USE_LIFTGAMMAGAIN
    RGB_Gain = float3(1.010, 1.010, 1.013)// USE_LIFTGAMMAGAIN

    Saturation = 0.20 // USE_TONEMAP

    Curves_contrast = -0.30 // USE_CURVES

    what can it be? maybe shaders are incorrectly sorted on his injector?

    please, some help.
     
    Last edited: Mar 15, 2013
  8. johnyz333

    johnyz333 Active Member

    Messages:
    56
    Likes Received:
    0
    GPU:
    Inno3d 8800GTS 512 x2
    Great work Marcel, but dont expect anything less from you. :)

    Plz make your config with much more vibrant colours, like what you did with Batman AC; that was the best sweet fx profile I have ever seen.
     
  9. Szfeps

    Szfeps New Member

    Messages:
    7
    Likes Received:
    0
    GPU:
    GTX 560
    Hi.

    I search a the best sweetfx to battlefield 3, anyone can give me link ?

    Sorry for my english,
    regards.
     
  10. Wanny

    Wanny Ancient Guru

    Messages:
    7,480
    Likes Received:
    0
    GPU:
    GTX 980 Ti GAMING 6G
    Any progress on the x64 front for Nvidia users?
     

  11. Alex.Outer

    Alex.Outer Active Member

    Messages:
    93
    Likes Received:
    0
    GPU:
    AMD 7970
    @Marcel
    Nice Tomb settings. :)

    Trying to make something with Resident 5:


    [​IMG]

    [​IMG]

    [​IMG]
     
  12. -Tj-

    -Tj- Ancient Guru

    Messages:
    13,873
    Likes Received:
    9
    GPU:
    ZOTAC GX980Ti Amp!Extreme
    ^
    Care to share those RE5 settings :)
     
  13. GokunDesu

    GokunDesu Member

    Messages:
    11
    Likes Received:
    0
    GPU:
    GTX 680
    Can some expert make or share some Dota 2 presets?
     
  14. TFL Replica

    TFL Replica Master Guru

    Messages:
    381
    Likes Received:
    0
    GPU:
    NVIDIA GTX 970
    Hey Boulotaur2024, love the progress you've been making with your new injector. :thumbup:
     
  15. ninjafada

    ninjafada Master Guru

    Messages:
    308
    Likes Received:
    0
    GPU:
    pny 670
    just cleaned up the db

    please check if the game exist or not before creating a new game
    don't put the description of your preset in the game note, it's the place for the specific install of sweetfx like "dll in bin, rest in base"
    when you add a preset name try to avoid "best preset" ...
    and when i see people posting 17 18 19 ! screenshots it's not a image hosting website
    you can put a link to your gallery ;;

    if you are using a preset from someone else and changing a value at least put a credit

    and will delete everything i see with random letter in name of the preset and comment


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Marcel great job on TB ^^
    Wanny go one page before
    Szfeps http://sfx.thelazy.net/games/game/38/
     

  16. Alex.Outer

    Alex.Outer Active Member

    Messages:
    93
    Likes Received:
    0
    GPU:
    AMD 7970
    Settings:
    /*-----------------------------------------------------------.
    / Choose effects /
    '-----------------------------------------------------------*/

    // Set to 1 for ON or 0 for OFF
    #define USE_SMAA_ANTIALIASING 0 //[0 or 1] SMAA Anti-aliasing : Smoothens jagged lines using the SMAA technique.
    #define USE_FXAA_ANTIALIASING 0 //[0 or 1] FXAA Anti-aliasing : Smoothens jagged lines using the FXAA technique.
    #define USE_LUMASHARPEN 1 //[0 or 1] LumaSharpen : Also sharpens the antialiased edges which makes them less smooth - I'm working on fixing that.
    #define USE_CRT 0 //[0 or 1] CRT-like effet (cgwg's CRT-shader ported to SweetFX)
    #define USE_BLOOM 0 //[0 or 1] Bloom : Makes bright lights bleed their light into their surroundings (relatively high performance cost)
    #define USE_HDR 1 //[0 or 1] HDR : Not actual HDR - It just tries to mimic an HDR look (relatively high performance cost)
    #define USE_TECHNICOLOR 0 //[0 or 1] TECHNICOLOR : Attempts to mimic the look of an old movie using the Technicolor three-strip color process (Techicolor Process 4)
    #define USE_DPX 1 //[0 or 1] Cineon DPX : Should make the image look like it's been converted to DXP Cineon - basically it's another movie-like look similar to technicolor.
    #define USE_LIFTGAMMAGAIN 1 //[0 or 1] Lift Gamma Gain : Adjust brightness and color of shadows, midtones and highlights (avoids clipping)
    #define USE_TONEMAP 0 //[0 or 1] Tonemap : Adjust gamma, exposure, saturation, bleach and defog. (may cause clipping)
    #define USE_VIBRANCE 1 //[0 or 1] Vibrance : Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation.
    #define USE_CURVES 1 //[0 or 1] Curves : Contrast adjustments using S-curves.
    #define USE_CARTOON 0 //[0 or 1] Cartoon : "Toon"s the image
    #define USE_SEPIA 0 //[0 or 1] Sepia : Sepia tones the image.
    #define USE_VIGNETTE 0 //[0 or 1] Vignette : Darkens the edges of the image to make it look more like it was shot with a camera lens. May cause banding artifacts.
    #define USE_DITHER 1 //[0 or 1] Dither : Applies dithering to simulate more colors than your monitor can display. This lessens banding artifacts (mostly caused by Vignette)
    #define USE_BORDER 0 //[0 or 1] Border : Makes the screenedge black as a workaround for the bright edge that forcing some AA modes sometimes causes.
    #define USE_SPLITSCREEN 0 //[0 or 1] Splitscreen : Enables the before-and-after splitscreen comparison mode.


    /*-----------------------------------------------------------.
    / SMAA Anti-aliasing settings /
    '-----------------------------------------------------------*/

    #define SMAA_THRESHOLD 0.12 //[0.05 to 0.20] Edge detection threshold
    #define SMAA_MAX_SEARCH_STEPS 16 //[0 to 98] Determines the radius SMAA will search for aliased edges
    #define SMAA_MAX_SEARCH_STEPS_DIAG 6 //[0 to 16] Determines the radius SMAA will search for diagonal aliased edges
    #define SMAA_CORNER_ROUNDING 0 //[0 to 100] Determines the percent of antialiasing to apply to corners.

    // -- Advanced SMAA settings --
    #define COLOR_EDGE_DETECTION 1 //[0 or 1] 1 Enables color edge detection (slower but more acurate) - 0 uses luma edge detection (faster)
    #define SMAA_DIRECTX9_LINEAR_BLEND 0 //[0 or 1] Using DX9 HARDWARE? (software version doesn't matter) if so this needs to be 1 - If not, leave it at 0.


    /*-----------------------------------------------------------.
    / FXAA Anti-aliasing settings /
    '-----------------------------------------------------------*/
    #define FXAA_QUALITY__PRESET 39 //[1 to 9] Choose the quality preset
    #define fxaa_Subpix 0.75 //[0.000 to 1.000] Choose the amount of sub-pixel aliasing removal
    #define fxaa_EdgeThreshold 0.125 //[0.000 to 1.000] The minimum amount of local contrast required to apply algorithm
    #define fxaa_EdgeThresholdMin 0.0312 //[0.000 to 1.000] Trims the algorithm from processing darks


    /*-----------------------------------------------------------.
    / LumaSharpen settings /
    '-----------------------------------------------------------*/
    // -- Sharpening --
    #define sharp_strength 0.60 //[0.10 to 3.00] Strength of the sharpening
    #define sharp_clamp 0.100 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035

    // -- Advanced sharpening settings --
    #define pattern 2 //[1|2|3|4] Choose a sample pattern. 1 = Fast, 2 = Normal, 3 = Wider, 4 = Pyramid shaped.
    #define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern.
    //I designed the pattern for offset_bias 1.0, but feel free to experiment.

    // -- Debug sharpening settings --
    #define show_sharpen 0 //[0 or 1] Visualize the strength of the sharpen (multiplied by 4 to see it better)


    /*-----------------------------------------------------------.
    / CRT settings /
    '-----------------------------------------------------------*/
    #define CRTAmount 1.0 // [0.0 to 1.0] Amount of CRT effect you want

    #define CRTResolution 1.2 // [1.0 to 8.O] Input size coefficent (low values gives the "low-res retro look"). Default is 1.2
    #define CRTgamma 2.4 // [0.0 to 4.0] Gamma of simulated CRT (default 2.4)
    #define CRTmonitorgamma 2.2 // [0.0 to 4.0] Gamma of display monitor (typically 2.2 is correct)
    #define CRTBrightness 1.3 // [1.0 to 3.0] Used to boost brightness a little. Default is 1.0
    #define CRTScanlineIntensity 2.0 // [2.0 to 4.0] Scanlines intensity (use integer values preferably). Default is 2.0
    #define CRTScanlineGaussian 1 // [0 or 1] Use the "new nongaussian scanlines bloom effect". Default is on

    #define CRTCurvature 1 // [[0 or 1] "Barrel effect" enabled (1) or off (0)
    #define CRTCurvatureRadius 1.5 // [0.0 to 2.0] Curvature Radius (only effective when Curvature is enabled). Default is 1.5
    #define CRTCornerSize 0.008 // [0.001 to 0.02] Higher values, more rounded corner. Default is 0.001
    #define CRTDistance 2.0 // [0.0 to 4.0] simulated distance from viewer to monitor. Default is 2.0
    #define CRTAngleX 0.0 // [-0.2 to 0.2] tilt angle in radians (X coordinates)
    #define CRTAngleY -0.15 // [-0.2 to 0.2] tilt angle in radians (Y coordinates). (Value of -0.15 gives the 'arcade tilt' look)
    #define CRTOverScan 1.01 // [1.00 to 1.1] overscan (e.g. 1.02 for 2% overscan). Default is 1.01
    #define CRTOversample 0 // [0 or 1] Enable 3x oversampling of the beam profile (warning : performance hit)


    /*-----------------------------------------------------------.
    / Bloom settings /
    '-----------------------------------------------------------*/
    #define BloomThreshold 20.25 //[0.00 to 50.00] Threshold for what is a bright light (that causes bloom) and what isn't.
    #define BloomPower 1.446 //[0.000 to 8.000] Strength of the bloom
    #define BloomWidth 0.0142 //[0.0000 to 1.0000] Width of the bloom


    /*-----------------------------------------------------------.
    / HDR settings /
    '-----------------------------------------------------------*/
    #define HDRPower 1.02 //[0.00 to 8.00] Strangely lowering this makes the image brighter
    #define radius2 0.74 //[0.00 to 8.00] Raising this seems to make the effect stronger and also brighter


    /*-----------------------------------------------------------.
    / TECHNICOLOR settings /
    '-----------------------------------------------------------*/
    #define TechniAmount 0.4 //[0.0 to 1.0]
    #define TechniPower 4.0 //[0.0 to 8.0]
    #define redNegativeAmount 0.88 //[0.0 to 1.0]
    #define greenNegativeAmount 0.88 //[0.0 to 1.0]
    #define blueNegativeAmount 0.88 //[0.0 to 1.0]


    /*-----------------------------------------------------------.
    / Cineon DPX settings /
    '-----------------------------------------------------------*/
    #define Red 12.0 //[1.0 to 15.0]
    #define Green 12.0 //[1.0 to 15.0]
    #define Blue 12.0 //[1.0 to 15.0]

    #define ColorGamma 1.2 //[0.1 to 2.5] Adjusts the colorfulness of the effect in a manner similar to Vibrance. 1.0 is neutral.
    #define DPXSaturation 1.0 //[0.0 to 8.0] Adjust saturation of the effect. 1.0 is neutral.

    #define RedC 0.35 //[0.60 to 0.20]
    #define GreenC 0.35 //[0.60 to 0.20]
    #define BlueC 0.35 //[0.60 to 0.20]

    #define Blend 0.2 //[0.00 to 1.00] How strong the effect should be.


    /*-----------------------------------------------------------.
    / Lift Gamma Gain settings /
    '-----------------------------------------------------------*/
    #define RGB_Lift float3(1.012, 1.007, 0.992) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue
    #define RGB_Gamma float3(0.973, 0.953, 1.028) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue
    #define RGB_Gain float3(1.000, 0.980, 1.110) //[0.000 to 2.000] Adjust highlights for Red, Green and Blue


    /*-----------------------------------------------------------.
    / Tonemap settings /
    '-----------------------------------------------------------*/
    #define Gamma 0.60 //[0.000 to 2.000] Adjust midtones

    #define Exposure 0.00 //[-1.000 to 1.000] Adjust exposure

    #define Saturation 0.00 //[-1.000 to 1.000] Adjust saturation

    #define Bleach 0.00 //[0.000 to 1.000] Brightens the shadows and fades the colors

    #define Defog 0.011 //[0.000 to 1.000] How much of the color tint to remove
    #define FogColor float3(0.00, 0.00, 0.00) //[0.00 to 2.55, 0.00 to 2.55, 0.00 to 2.55] What color to remove - default is blue


    /*-----------------------------------------------------------.
    / Vibrance settings /
    '-----------------------------------------------------------*/
    #define Vibrance 0.16 //[-1.00 to 1.00] Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation.


    /*-----------------------------------------------------------.
    / Curves settings /
    '-----------------------------------------------------------*/
    #define Curves_contrast 0.42 //[-1.00 to 1.00] The amount of contrast you want

    // -- Advanced curve settings --
    #define Curves_formula 2 //[1|2|3|4|5|6|7] The constrast s-curve you want to use. I prefer 2 myself.


    /*-----------------------------------------------------------.
    / Cartoon settings /
    '-----------------------------------------------------------*/
    //No settings yet, beyond switching it on or off in the top section.
    //I'm still tweaking this effect - also I'm not even sure it should be called Cartoon in the final version.


    /*-----------------------------------------------------------.
    / Sepia settings /
    '-----------------------------------------------------------*/
    #define ColorTone float3(1.40, 1.10, 0.90) //[0.00 to 1.00, 0.00 to 1.00, 0.00 to 1.00] What color to tint the image
    #define GreyPower 0.11 //[0.0 to 1.0] How much desaturate the image before tinting it
    #define SepiaPower 0.58 //[0.0 to 1.0] How much to tint the image


    /*-----------------------------------------------------------.
    / Vignette settings /
    '-----------------------------------------------------------*/
    #define VignetteRadius 1.00 //[-1.00 to 3.00] lower values = stronger radial effect from center
    #define VignetteAmount -1.00 //[-2.00 to 1.00] Strength of black. -2.00 = Max Black, 1.00 = Max White.
    #define VignetteSlope 8 //[1 to 16] How far away from the center the change should start to really grow strong (odd numbers cause a larger fps drop than even numbers)
    #define VignetteCenter float2(0.500, 0.500) //[0.00 to 1.00, 0.00 to 1.00] Center of effect.


    /*-----------------------------------------------------------.
    / Dither settings /
    '-----------------------------------------------------------*/
    //No settings yet, beyond switching it on or off in the top section.

    //Note that the checkerboard pattern used by Dither, makes an image harder to compress.
    //This can make your screenshots and video recordings take up more space.


    /*-----------------------------------------------------------.
    / Border settings /
    '-----------------------------------------------------------*/
    //No settings yet, beyond switching it on or off in the top section.


    /*-----------------------------------------------------------.
    / Splitscreen settings /
    '-----------------------------------------------------------*/
    #define splitscreen_mode 1 //[1|2|3|4|5] 1 = Vertical 50/50 split, 2 = Vertical 25/50/25 split, 3 = Vertical 50/50 angled split, 4 = Horizontal 50/50 split, 5 = Horizontal 25/50/25 split
    Still making some adjustments, mainly in the shadows...if you try please let me know your thoughts.

    [​IMG]
     
  17. Marcel

    Marcel Maha Guru

    Messages:
    1,129
    Likes Received:
    0
    GPU:
    MSI GTX 1070 Gaming
    hi all

    know someone how use SweetFx in TERA? Do not work for me... and how turn OFF HUD and all text ?
     
  18. djcasey

    djcasey Member

    Messages:
    16
    Likes Received:
    0
    GPU:
    GTX 460 1gb SLI
    is SweetFx working with Starcraft 2 ??
     
  19. ninjafada

    ninjafada Master Guru

    Messages:
    308
    Likes Received:
    0
    GPU:
    pny 670
    don't use sweetfx with sc2 you risk a ban

    for tera all files in TERA\Client\Binaries
    i don't how/remember to remove the hud i played 3weeks last summer lol

    marcel could you add your preset in the database or allow me to put them with your credit, please :)
     
    Last edited: Mar 16, 2013
  20. Marcel

    Marcel Maha Guru

    Messages:
    1,129
    Likes Received:
    0
    GPU:
    MSI GTX 1070 Gaming
    what database? yes of course you can...
     
Thread Status:
Not open for further replies.

Share This Page