SweetFX Shader Suite release and discussion thread

Discussion in 'Games, Gaming & Game-demos' started by CeeJay.dk, Sep 23, 2012.

Thread Status:
Not open for further replies.
  1. BetA

    BetA Ancient Guru

    Messages:
    4,526
    Likes Received:
    480
    GPU:
    G1-GTX980@1400Mhz
    @ NeoEnigma aka jim2point0

    Great Screens as allways...
    I wish u would share that Free Camera hack u use there..couldnt find teh tool myself :(

    Anyway, keep it up. i love those screens..i also have a preset based on your old one..still tweaking it..playing with a slight bloom atm. looks nice at night when u look at lights..

    On a side question:
    Could u maybe explain me how i can use ENB with sweetFX on certain games..i just wanna get more involved into that enb stuff and thought i might ask u about it, since u allready tested it abit..

    Greetz BetA
     
  2. NeoEnigma

    NeoEnigma Master Guru

    Messages:
    631
    Likes Received:
    0
    GPU:
    ---
    The camera hack I created is just bunch of hotkeys used to manipulate your coordinates and speeds vectors. It's the most difficult thing you'd ever try and use. When it comes to screenshotting, I'm willing to take rather annoying measures to accomplish cool stuff, but most people would find this thing clunky and frustrating. If you're really quite desperate for something like that, feel free to PM me...

    Typically, ENB only works well with games that the author has supported. There are a lot of features built into the average version of ENB, and he hand-crafts them on a per-game basis. I've yet to come across a single UE3 game that he's actually fully supported. I snagged the ENB for the orginal Deus Ex knowing most of the settings wouldnt work... but I could use the palette file setting. Almost irrelevant now that we have SweetFX 1.3 (for Dishonored, mind you, not other games).
     
  3. CeeJay.dk

    CeeJay.dk Guest

    Messages:
    691
    Likes Received:
    14
    GPU:
    Radeon 6870
    That's a good idea but we also need to know why they are incompatible and we need to verify it. I've had plenty of reports that said SweetFX didn't work with a game, where it turned out to be a problem with something else.
     
    Last edited: Oct 26, 2012
  4. CeeJay.dk

    CeeJay.dk Guest

    Messages:
    691
    Likes Received:
    14
    GPU:
    Radeon 6870
    I link to an OpenGL wrapper in the readme yes, but I doubt it will work with Rage.

    Rage uses the very lastest OpenGL - including several extentions to OpenGL that was developed specifically for Rage.

    I doubt the wrapper has support for those yet.

    The shaders could also be ported to OpenGL and put in the game as a mod (without using the injector), but id software still haven't released an SDK :(
    Seeing how id software made modding was it is today with their previous games that were all extremely mod-friendly this is a great disappointment.
     

  5. vejn

    vejn Maha Guru

    Messages:
    1,002
    Likes Received:
    0
    GPU:
    MSI 7870 TF3
    CeeJay.dk help me with MPC shaders.
    Luma Sharpen works, but curves, DPX and tonemap doesn't.
    /*-----------------------------------------------------------.
    / Curves /
    '-----------------------------------------------------------*/
    /*
    by Christian Cann Schuldt Jensen ~ CeeJay.dk

    Curves, uses S-curves to increase contrast, without clipping highlights and shadows.
    */

    #define Curves_contrast 0.30 //[-1.0 to 1.0] The amount of contrast you want

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

    float4 CurvesPass( float4 colorInput )
    {
    float3 color = colorInput.rgb; //original input color
    float3 lumCoeff = float3(0.2126, 0.7152, 0.0722); //Values to calculate luma with
    float Curves_contrast_blend = Curves_contrast;
    float PI = acos(-1); //3.14159265

    //calculate luma (grey)
    float luma = dot(lumCoeff, color);

    //calculate chroma
    float3 chroma = color - luma;

    //Apply curve to luma

    // -- Curve 1 --
    #if Curves_formula == 1
    luma = sin(PI * 0.5 * luma); // Sin - 721 amd fps
    luma *= luma;
    #endif

    // -- Curve 2 --
    #if Curves_formula == 2
    luma = ( (luma - 0.5) / (0.5 + abs(luma-0.5)) ) + 0.5; // 717 amd fps
    #endif

    // -- Curve 3 --
    #if Curves_formula == 3
    //luma = smoothstep(0.0,1.0,luma); //smoothstep
    luma = luma*luma*(3.0-2.0*luma); //faster smoothstep alternative - 776 amd fps
    #endif

    // -- Curve 4 --
    #if Curves_formula == 4
    luma = 1.1048 / (1.0 + exp(-3.0 * (luma * 2.0 - 1.0))) - (0.1048 / 2.0); //exp formula - 706 amd fps
    #endif

    // -- Curve 5 --
    #if Curves_formula == 5
    luma = 0.5 * (luma + 3.0 * luma * luma - 2.0 * luma * luma * luma); //a simple catmull-rom (0,0,1,1) - 726 amd fps
    Curves_contrast_blend = Curves_contrast * 2.0; //I multiply by two to give it a strength closer to the other curves.
    #endif

    // -- Curve 6 --
    #if Curves_formula == 6
    luma = luma*luma*luma*(luma*(luma*6.0 - 15.0) + 10.0); //Perlins smootherstep - 752 amd fps
    #endif

    // -- Curve 7 --
    #if Curves_formula == 7
    luma = ((luma-0.5) / ((0.5/(4.0/3.0)) + abs((luma-0.5)*1.25))) + 0.5; // amd fps
    #endif


    //Add back the chroma
    color = luma + chroma;

    //Blend by Curves_contrast
    colorInput.rgb = lerp(colorInput.rgb, color, Curves_contrast_blend);

    //Return the result
    return colorInput;
    }

    I got error with something"main" ...
     
    Last edited: Oct 26, 2012
  6. kingd

    kingd Guest

    Messages:
    2
    Likes Received:
    0
    GPU:
    gtx675m sli
    Hello @ NeoEnigma

    I want to thank you that you share your settings with us :) I Appreciate that.

    Could you just please tell me which parameters you changed to lighten your settings up ?

    Greetings kingd
     
  7. Super1

    Super1 Guest

    Messages:
    91
    Likes Received:
    0
    GPU:
    Nvidia
    I think Amnesia is OpenGL,
    and how did you load sweetfx dll with Gears of War ?
    because Gears of War doesn't load modified dll.
     
  8. Super1

    Super1 Guest

    Messages:
    91
    Likes Received:
    0
    GPU:
    Nvidia
    That's why I hate opengl xD

    Thanks for reply.
     
  9. gridiron whirlw

    gridiron whirlw Ancient Guru

    Messages:
    4,105
    Likes Received:
    315
    GPU:
    RTX 3070Ti
    I am interested if it works with Gears , also.
     
  10. Super1

    Super1 Guest

    Messages:
    91
    Likes Received:
    0
    GPU:
    Nvidia
    I tried QindieGL with Rage and the game crash.
     

  11. HHawk

    HHawk Member

    Messages:
    29
    Likes Received:
    0
    GPU:
    Asus X1900 XTX (watercooled)
    No one...? :(
     
  12. CeeJay.dk

    CeeJay.dk Guest

    Messages:
    691
    Likes Received:
    14
    GPU:
    Radeon 6870
    Try installing SweetFX to Risen 2/ (the root folder) , and then move d3d9.dll and injector.ini to Risen 2/system/

    I don't have the game myself - I just googled for fxaa risen 2 and read how other people installed the fxaa injector - sweetfx installs in almost the same way.
     
  13. CeeJay.dk

    CeeJay.dk Guest

    Messages:
    691
    Likes Received:
    14
    GPU:
    Radeon 6870
    Don't. As a graphics API, it's actually currently a little faster and more efficient than DirectX. It also supports several platforms that DirectX does not.

    DirectX is however still the most popular - probably because that is what the Xbox360 uses , and so developers that are already familiar with DirectX choose to go with the same for PC as well, so they can reuse a lot of the code.

    It's also not the fault of OpenGL that no one have created a shader injector for it yet.

    Know any good OpenGL programmers willing to make one?
     
  14. CeeJay.dk

    CeeJay.dk Guest

    Messages:
    691
    Likes Received:
    14
    GPU:
    Radeon 6870
    The shader code needs a starting point - a function to begin with.
    That function is called by the application or game.

    In MPC that starting function should be called main()

    In the code you put together there is no main function but only the CurvesPass function.

    Please ignore the fact that I also have a main function in sweetfx - that's actually not the starting function in sweetfx (hmm maybe I should rename that)

    You also need to sample the original pixel and use the sampler name that MPC have used ( s0 ) - See how I did the MPC-Vibrance shader.

    Instead of writing a new main() that contained all the vibrance code, I wrote a new main() that samples the original pixel and then passes that to the VibrancePass() function in the same manner as SweetFX passes it on to it's VibrancePass().

    This means that the VibrancePass function can be copied unchanged from SweetFX to MPC, which makes porting the shader much easier.

    Give me a few minutes and I'll port Curves for you, to show you what I mean.

    EDIT :

    Okay I'm back with this :

    Code:
    /* --- Curves settings --- */
    #define Curves_contrast 0.30  //[-1.0 to 1.0] The amount of contrast you want
    
    // -- Advanced curve settings --
    #define Curves_formula 3      //[1|2|3|4|5|6|7] The constrast s-curve you want to use. 
    /* --- End of settings --- */
    
    /* ---  Defining Constants --- */
    
    sampler s0 : register(s0);
    
    
    /* --- Curves --- */
    /*
      by Christian Cann Schuldt Jensen ~ CeeJay.dk
      
      Curves, uses S-curves to increase contrast, without clipping highlights and shadows.
    */
    
    float4 CurvesPass( float4 colorInput )
    {
      float3 color = colorInput.rgb; //original input color
      float3 lumCoeff = float3(0.2126, 0.7152, 0.0722);  //Values to calculate luma with
      float Curves_contrast_blend = Curves_contrast;
      float PI = acos(-1); //3.14159265
    
      //calculate luma (grey)
      float luma = dot(lumCoeff, color);
    	
      //calculate chroma
    	float3 chroma = color - luma;
    	
    	//Apply curve to luma
    	
    	// -- Curve 1 --
      #if Curves_formula == 1
        luma = sin(PI * 0.5 * luma); // Sin - 721 amd fps, +vign 536 nv
        luma *= luma;  
      #endif
      
      // -- Curve 2 --
      #if Curves_formula == 2
        luma = ( (luma - 0.5) / (0.5 + abs(luma-0.5)) ) + 0.5; // 717 amd fps, +vign 519 nv
      #endif
    
    	// -- Curve 3 --
      #if Curves_formula == 3
        //luma = smoothstep(0.0,1.0,luma); //smoothstep
        luma = luma*luma*(3.0-2.0*luma); //faster smoothstep alternative - 776 amd fps, +vign 536 nv
      #endif
    
    	// -- Curve 4 --
      #if Curves_formula == 4
        luma = 1.1048 / (1.0 + exp(-3.0 * (luma * 2.0 - 1.0))) - (0.1048 / 2.0); //exp formula - 706 amd fps , +vign 511 nv
      #endif
    
    	// -- Curve 5 --
      #if Curves_formula == 5
        luma = 0.5 * (luma + 3.0 * luma * luma - 2.0 * luma * luma * luma); //a simple catmull-rom (0,0,1,1) - 726 amd fps , +vign 519 nv
        Curves_contrast_blend = Curves_contrast * 2.0; //I multiply by two to give it a strength closer to the other curves.
      #endif
    
     	// -- Curve 6 --
      #if Curves_formula == 6
        luma = luma*luma*luma*(luma*(luma*6.0 - 15.0) + 10.0); //Perlins smootherstep - 752 amd fps , +vign 526 nv
    	#endif
    	
    	// -- Curve 7 --
      #if Curves_formula == 7
        luma = ((luma-0.5) / ((0.5/(4.0/3.0)) + abs((luma-0.5)*1.25))) + 0.5; // amd fps , +vign 527 nv
      #endif
    	
      
    	//Add back the chroma
    	color = luma + chroma;
    	
    	//Blend by Curves_contrast
    	colorInput.rgb = lerp(colorInput.rgb, color, Curves_contrast_blend);
    	
      //Return the result
      return colorInput;
    }
    
    /* --- Main --- */
    
    float4 main(float2 tex : TEXCOORD0) : COLOR {
    	float4 FinalColor = tex2D(s0, tex);
    
    	FinalColor = CurvesPass(FinalColor);
    
    	return FinalColor;
    }

    It's also up on Dropcanvas now.

    Here's a template for porting most of the shaders to MPC:

    Code:
    /* --- Shader settings --- */
    
    //Settings goes here - copy the relevant settings from SweetFX_settings.txt
    
    /* --- End of settings --- */
    
    /* ---  Defining Constants --- */
    
    sampler s0 : register(s0); //Setting up a sampler so we can use it later
    
    
    float4 ShaderPass( float4 colorInput ) //Put the correct function name here - we call it later in main()
    {
    
    //The function goes here - copy this from the shaders .h file.
    
    }
    
    /* --- Main --- */
    
    float4 main(float2 tex : TEXCOORD0) : COLOR { 
    	float4 FinalColor = tex2D(s0, tex); //We need to sample the original pixel
    
    	FinalColor = ShaderPass(FinalColor); //Copy this line from main.h in SweetFX
    
    	return FinalColor;
    }
     
    Last edited: Oct 26, 2012
  15. Shuggatank

    Shuggatank Guest

    Messages:
    13
    Likes Received:
    0
    GPU:
    Gigabyte GTX 670
    For Risen 2 i was using the smaa injector before and had to put the d3d9.dll in the system folder while all other file went into the main risen 2 folder but with SweetFX i just put all the files into the system folder and it worked.
     

  16. tw1st

    tw1st Guest

    Messages:
    173
    Likes Received:
    0
    GPU:
    Asus 3080 ROG Strix
    nevermind

    *edit*
     
    Last edited: Oct 26, 2012
  17. Roger_D25

    Roger_D25 Guest

    Messages:
    4,384
    Likes Received:
    2
    GPU:
    Asus Strix GTX980Ti
    NeoEnigma - Is there any chance you would be willing to post your most recent Dishonored SweetFX settings (the settings you used in the images you most recently posted)? Thank you very much for your hardwork in modifying and testing SweetFX in Dishonored!
     
  18. p0ly

    p0ly Member

    Messages:
    20
    Likes Received:
    0
    GPU:
    Palit GTX 1070Ti
    Realy nice shots man! :thumbup:

    Can you share this preset please?
     
  19. NeoEnigma

    NeoEnigma Master Guru

    Messages:
    631
    Likes Received:
    0
    GPU:
    ---
    I see your requests for Dishonored settings :p If you want to experiment yourself, I simply toned down the amount in which I reduced shadows and midtones. And I eased up quite a bit on the amount of reduced blue in midtones. Still wanna tweak at it some more though.

    In the meantime. I returned to Borderlands 2 to play the DLC for an actual length of time today. I haven't been too impressed with it. At all. Pretty disappointed in fact. But here are some screenshots made possible by SweetFX and no-clipping. Particularly the last one, which I've deemed my crowning achievement in screenshotting.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     
  20. alientorni

    alientorni Guest

    Messages:
    88
    Likes Received:
    0
    GPU:
    MSI 5770 (bios6770) Hawk
    @NeoEnigma your screens are a joke. there is something else, game doesn't looks that way, just modifying colors is impossible. how do you get that ultra antialiasing? textures looks much better, everything is very shrap, but antialiased at the same time. distance does not affect textures or anything else.
    how do you get that iq?
     
Thread Status:
Not open for further replies.

Share This Page