SweetFX Shader Suite release and discussion thread #3

Discussion in 'Games, Gaming & Game-demos' started by CeeJay.dk, Mar 18, 2013.

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

    renji1337 New Member

    Messages:
    1
    Likes Received:
    0
    GPU:
    i5
    How come i can't toggle sweetfx with boulutars injector? I press or hold scroll lock and nothing happens.
     
  2. jim2point0

    jim2point0 Maha Guru

    Messages:
    1,348
    Likes Received:
    42
    GPU:
    Asus Strix 2080TI
    without mentioning what game, I doubt anyone can help. I've used his injector in about 42 games now and toggles fine in all of them

    EDIT:

    I've been trying to use the vignette shader to emulate anamorphic aspect ratio letterboxing, but it's not exactly perfect and there's still a soft fade. I think it would be cool if we had a straight up letterboxing shader for that sorta thing. Mostly for games where that aspect ratio isn't supported.

    I'm probably one of very few people interested in that though :p I just can't get the vignette shader to be a perfectly straight edge at the top and bottom.
     
    Last edited: Jul 27, 2013
  3. r3dfield

    r3dfield Active Member

    Messages:
    57
    Likes Received:
    0
    GPU:
    GTX980 OC@1541Mhz/4001Mhz
    Is anybody running Boulotaur2024's latest Injector with Borderlands 2? It's causing problems on startup and crashs right after I click on play. tried all dlls. Regular SweetFX 1.4 works great.
     
  4. Corvo-Attano-77

    Corvo-Attano-77 Member

    Messages:
    41
    Likes Received:
    0
    GPU:
    GTX 560
    You just want black bars on the top and bottom of the screen? That's really quick to code, how big do you want them? Obviously UI elements would be obscured but you probably knew that already.
     

  5. jim2point0

    jim2point0 Maha Guru

    Messages:
    1,348
    Likes Received:
    42
    GPU:
    Asus Strix 2080TI
    Yep. Kinda like a cut scene in a game. Since I'm already SORTA doing that with vignette, and in most games I hide the UI regardless, I'm not too concerned about the UI being covered.

    The top and bottom bars would each need to be 135 pixels tall, leaving a visible area of 1920x810 (for 1920x1080).
     
    Last edited: Jul 27, 2013
  6. ggp759

    ggp759 Member

    Messages:
    37
    Likes Received:
    0
    GPU:
    Evga GTX 680
    Trying to use sweetfx with nfs most wanted 2012. The game does not start and i get an error saying that dxgi.dll is missing. If i remove sweetfx the game runs fine. I have the sweetfx configurator 1.3.3. Any help? Thanks.
     
  7. pedoncho

    pedoncho Active Member

    Messages:
    64
    Likes Received:
    0
    GPU:
    Nvidia gt240 1gb
    I've got a little question, I made a setting I really like for Skyrim, but, when im in interiors such as houses, caves, etc, it looks awful.
    I was wondering if is possible to make 2 diff settings and switch between them, for example, i make 2, one for exteriors and one for interiors, and change them in-game.
    Is that possible?
    Thanks!!!
     
  8. Corvo-Attano-77

    Corvo-Attano-77 Member

    Messages:
    41
    Likes Received:
    0
    GPU:
    GTX 560
    It'll take literally 2 minutes but I'm entertaining guests ATM. Will post later :)

    Edit: in case you know enough to DIY, the bit of code you need is

    color = ( coords.y > 0.875f || coords.y < 0.125f ? 0 : color );

    If you use any of the new fx in baulotaur then the code will have to go in the last used .fx file, otherwise you can put it at the end of main.h
     
    Last edited: Jul 27, 2013
  9. fwee

    fwee Member

    Messages:
    26
    Likes Received:
    0
    GPU:
    660 Ti @1111MHz
    can someone link me to the x64 bit version since google search and guru3d search wont send me to it i just need the dll files to swap or an updated version from the same person who is working on the x64 now
     
  10. WhiteLightning

    WhiteLightning Don Illuminati Staff Member

    Messages:
    29,445
    Likes Received:
    2,237
    GPU:
    GTX1070 iChillx4

  11. ggp759

    ggp759 Member

    Messages:
    37
    Likes Received:
    0
    GPU:
    Evga GTX 680
    Anyone? thanks
     
  12. evohan

    evohan Member Guru

    Messages:
    178
    Likes Received:
    0
    GPU:
    Asus DCU2 GTX670 4GB SLI
    Resident Evil Reveletaion

    [​IMG][​IMG][​IMG][​IMG][​IMG][​IMG]




    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
    Last edited: Jul 28, 2013
  13. jim2point0

    jim2point0 Maha Guru

    Messages:
    1,348
    Likes Received:
    42
    GPU:
    Asus Strix 2080TI
    I tried in dither.fx but...
    The code makes sense. I can figure out whats going on well enough. Just gotta figure out where to put it so it will work.
     
  14. Corvo-Attano-77

    Corvo-Attano-77 Member

    Messages:
    41
    Likes Received:
    0
    GPU:
    GTX 560
    Sorry "color" and "coords" are generic variable names I made up, you need to replace them with the right variable names from dither.fx

    Edit:
    Here is a modified main.h from baulotaur's injector
    Code:
      /*-------------------------.   
      | :: Defining constants :: |
      '-------------------------*/
    
    //These values are normally defined by the injector dlls, but not when analyzed by GPU Shaderanalyzer
    //I need to ensure they always have a value to be able to compile them whenever I'm not using the injector.
    #ifdef SMAA_PIXEL_SIZE
      #ifndef BUFFER_RCP_WIDTH
        #define BUFFER_RCP_WIDTH SMAA_PIXEL_SIZE.x
        #define BUFFER_RCP_HEIGHT SMAA_PIXEL_SIZE.y
        #define BUFFER_WIDTH (1.0 / SMAA_PIXEL_SIZE.x)
        #define BUFFER_HEIGHT (1.0 / SMAA_PIXEL_SIZE.y)
      #endif
    #endif
    
    #ifndef BUFFER_RCP_WIDTH
      #define BUFFER_RCP_WIDTH (1.0 / 1680)
      #define BUFFER_RCP_HEIGHT (1.0 / 1050)
      #define BUFFER_WIDTH 1680
      #define BUFFER_HEIGHT 1050
    #endif
    
    #define screen_size float2(BUFFER_WIDTH,BUFFER_HEIGHT)
    
    #define px BUFFER_RCP_WIDTH
    #define py BUFFER_RCP_HEIGHT
    
    #define pixel float2(px,py)
    
    // -- Define DirectX9 FXAA specific aliases --
    #if FXAA_HLSL_3 == 1
      #define myTex2D(s,p) tex2D(s,p)
      
      #define s0 frameSampler
      #define s1 frameSampler
    #endif
    
    // -- Define DirectX10/11 specific aliases --
    #if FXAA_HLSL_4 == 1 || FXAA_HLSL_5 == 1
      #define myTex2D(s,p) s.SampleLevel(LinearSampler, p, 0)
      
      #define s0 frameTex2D
      #define s1 frameTex2D
    #endif
    
    // -- Define DirectX9 specific aliases --
    #if SMAA_HLSL_3 == 1
      #define myTex2D(s,p) tex2D(s,p)
      
      #define s0 colorTexG
      #define s1 colorTexG //TODO make a nearest sampler if needed
    #endif
    
    // -- Define DirectX10/11 specific aliases --
    #if SMAA_HLSL_4 == 1 || SMAA_HLSL_4_1 == 1
      #define myTex2D(s,p) s.SampleLevel(LinearSampler, p, 0)
    
      #define s0 colorTexGamma
      #define s1 colorTexGamma //TODO make a nearest sampler if needed
    #endif
    
    
      /*------------------------------.   
      | :: Include enabled shaders :: |
      '------------------------------*/
      
    #if (USE_CARTOON == 1)
      #include "Cartoon.h"
    #endif  
    
    #if (USE_ADVANCED_CRT == 1)
      #include "AdvancedCRT.h"
    #endif
    
    #if (USE_BLOOM == 1)
      #include "Bloom.h"
    #endif
    
    #if (USE_HDR == 1)
      #include "HDR.h"
    #endif
    
    #if (USE_LUMASHARPEN == 1)
      #include "LumaSharpen.h"
    #endif
    
    #if (USE_TECHNICOLOR == 1)
      #include "Technicolor.h"
    #endif
    
    #if (USE_DPX == 1)
      #include "DPX.h"
    #endif
    
    #if (USE_MONOCHROME == 1)
      #include "Monochrome.h"
    #endif
    
    #if (USE_LIFTGAMMAGAIN == 1)
      #include "LiftGammaGain.h"
    #endif
    
    #if (USE_TONEMAP == 1)
      #include "Tonemap.h"
    #endif
    
    #if (USE_SEPIA == 1)
      #include "Sepia.h"
    #endif
    
    #if (USE_VIBRANCE == 1)
      #include "Vibrance.h"
    #endif
    
    #if (USE_CURVES == 1)
      #include "Curves.h"
    #endif
    
    #if (USE_VIGNETTE == 1)
      #include "Vignette.h"
    #endif
    
    #if (USE_DITHER == 1)
      #include "Dither.h"
    #endif
    
    #if (USE_BORDER == 1)
      #include "Border.h"
    #endif
    
    #if (USE_SPLITSCREEN == 1)
      #include "Splitscreen.h"
    #endif
    
      /*-------------------------------.   
      | :: Xbox360 Gamma correction :: |
      '-------------------------------*/
    
    /*
      I suspect that some games that ported to PC are such terrible ports that the developers forgot (or didn't bother)
      to do correct gamma correction for PC but just copied the Xbox360 code.
      
      If that is the case then I can probably correct for it, but I need to find some terrible ports and check for this first.
      Until then this code is not used.
    */
    
    //float XenonGammaToLinear(float val)
    //{
    //   float ret;
    //   saturate(val);
    //   if (val < 0.25f)
    //      ret = 0.25f * val;
    //   else if (val < 0.375f)
    //      ret = (1.0f/16.0f) + 0.5f*(val-0.25f);
    //   else if (val < 0.75f)
    //      ret = 0.125f + 1.0f*(val-0.375f);
    //   else
    //      ret = 0.5f + 2.0f*(val-0.75f);
    //   return ret;
    //}
    //
    //float LinearToXenonGamma(float val)
    //{
    //   float ret;
    //   saturate(val);
    //   if (val < (1.0f/16.0f))
    //      ret = 4.0f * val;
    //   else if (val < (1.0f/8.0f))
    //      ret = (1.0f/4.0f) + 2.0f*(val-(1.0f/16.0f));
    //   else if (val < 0.5f)
    //      ret = 0.375f + 1.0f*(val-0.125f);
    //   else
    //      ret = 0.75f + 0.5f*(val-0.50f);
    //   return ret;
    //}
    
      /*--------------------.   
      | :: Effect passes :: |
      '--------------------*/
    
    float4 main(float2 tex, float4 FinalColor)
    {
    
     // #if (Xbox360gamma == 1)
     //   FinalColor.r = LinearToXenonGamma(FinalColor.r); // Linear to Xbox360 Gamma space (R)
     //   FinalColor.g = LinearToXenonGamma(FinalColor.g); // Linear to Xbox360 Gamma space (G)
     //   FinalColor.b = LinearToXenonGamma(FinalColor.b); // Linear to Xbox360 Gamma space (B)
    	//#endif
    
      /*--------------------.   
      | :: Effect passes :: |
      '--------------------*/
    
      // Cartoon
      #if (USE_CARTOON == 1)
    	FinalColor = CartoonPass(FinalColor,tex);
      #endif
      
      // Advanced CRT
      #if (USE_ADVANCED_CRT == 1)
    	FinalColor = AdvancedCRTPass(FinalColor,tex);
      #endif
    	
    	// Bloom
      #if (USE_BLOOM == 1)
    	FinalColor = BloomPass (FinalColor,tex);
      #endif
    	
    	// HDR
      #if (USE_HDR == 1)
    	FinalColor = HDRPass (FinalColor,tex);
      #endif
    	
      // LumaSharpen
      #if (USE_LUMASHARPEN == 1)
    	FinalColor = LumaSharpenPass(FinalColor,tex);
      #endif
    		
      // Technicolor
      #if (USE_TECHNICOLOR == 1)
    	FinalColor = TechnicolorPass(FinalColor);
      #endif
    	
      // DPX
      #if (USE_DPX == 1)
    	FinalColor = DPXPass(FinalColor);
      #endif
      
      // Monochrome
      #if (USE_MONOCHROME == 1)
    	FinalColor = MonochromePass(FinalColor);
      #endif
    	
      // Lift Gamma Gain
      #if (USE_LIFTGAMMAGAIN == 1)
    	FinalColor = LiftGammaGainPass(FinalColor);
      #endif
    	
      // Tonemap
      #if (USE_TONEMAP == 1)
    	FinalColor = TonemapPass(FinalColor);
      #endif
    	
      // Vibrance
      #if (USE_VIBRANCE == 1)
    	FinalColor = VibrancePass(FinalColor);
      #endif
    
      // Curves
      #if (USE_CURVES == 1)
    	FinalColor = CurvesPass(FinalColor);
      #endif
    		
      // Sepia
      #if (USE_SEPIA == 1)
        FinalColor = SepiaPass(FinalColor);
      #endif
    	
      // Vignette
      #if (USE_VIGNETTE == 1)
    	FinalColor = VignettePass(FinalColor,tex);
      #endif
    	
      // Dither (should go near the end as it only dithers what went before it)
      #if (USE_DITHER == 1)
    	FinalColor = DitherPass(FinalColor,tex);
      #endif
    	
      // Border
      #if (USE_BORDER == 1)
        FinalColor = BorderPass(FinalColor,tex);
      #endif
    	
      // Splitscreen
      #if (USE_SPLITSCREEN == 1)
    	FinalColor = SplitscreenPass(FinalColor,tex);
      #endif
    
      FinalColor = ( tex.y > 0.875f || tex.y < 0.125f ? 0 : FinalColor );
      
      // Return FinalColor
      FinalColor.a = 1.0; //Clear alpha channel to reduce filesize of screenshots that are converted to png and avoid problems when viewing the screenshots.
      return FinalColor;
    }
    
     
    Last edited: Jul 28, 2013
  15. Psychor

    Psychor Member

    Messages:
    40
    Likes Received:
    0
    GPU:
    pc.thedigitalfoundry.com

  16. Elajitz

    Elajitz Master Guru

    Messages:
    743
    Likes Received:
    101
    GPU:
    RTX 3090 Ti TUF
    i have a odd question :)
    The dynamic ticks on windows 8 PRO x64 are they still needed to be YES or are there any fix for that? :)
     
  17. bishi

    bishi Master Guru

    Messages:
    567
    Likes Received:
    16
    GPU:
    GTX 1080 SLI
    no


    ..
     
  18. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    691
    Likes Received:
    14
    GPU:
    Radeon 6870
    Luckily that is very easy to do (for me at least) by modifying the border shader.

    I just made a new version of of it

    I also included an option to set the border color. I used integer color because I figured most people are used to those (hlsl require the colors in float range 0.00 to 1.00 but I just account for that in the code).

    New settings :
    Code:
       /*-----------------------------------------------------------.
      /                        Border settings                      /
      '-----------------------------------------------------------*/
    #define border_width float2(0,80) //[0 to 2048, 0 to 2048] (X,Y)-width of the border. Measured in pixels.
    #define border_color float3(0, 0, 0) //[0 to 255, 0 to 255, 0 to 255] What color the border should be. In integer RGB colors, meaning 0,0,0 is black and 255,255,255 is full white.
    New border.h :
    Code:
      /*-----------------------------------------------------------.
     /                          Border                            /
    '-----------------------------------------------------------*/
    // Version 1.2
    
    /*
    Version 1.0 by Oomek
    - Fixes light, one pixel thick border in some games when forcing MSAA like i.e. Dishonored
    
    Version 1.1 by CeeJay.dk
    - Optimized the shader. It still does the same but now it runs faster.
    
    Version 1.2 by CeeJay.dk
    - Added border_width and border_color features
    */
    
    
    float4 BorderPass( float4 colorInput, float2 tex )
    {
    float3 border_color_float = border_color / 255.0;
    float2 distance = abs(tex - 0.5); //calculate distance from center
    
    //bool2 screen_border = step(distance,0.5 - (pixel * border_width)); //is the distance less than the max - border_width?
    bool2 screen_border = step(0.5 - (pixel * border_width),distance); //is the distance greater than the max - border_width?
    
    
    colorInput.rgb = (!dot(screen_border, 1.0)) ? colorInput.rgb : border_color_float; //if neither x or y is greater then do nothing, but if one them is greater then set the color to border_color.
    //colorInput.rgb = saturate(colorInput.rgb - dot(screen_border, 1.0));
    //colorInput.rgb = colorInput.rgb * screen_border.x - !screen_border.y;
    
    return colorInput; //return the pixel
    
    } 
    Also good news everyone : I'm feeling better. Getting lots of sun on the beach, using my light therapy lamp and avoiding anything stressful seems to have done the trick. I haven't felt really depressed in 3 or 4 days now so I think I'm over the worst and it only going to get better.

    I might even start coding again. I wanted to take a look at eFX today and see if I could make an early OpenGL version of SweetFX, but I can't seem to find any posts or threads from Crosire anymore - so I'm wondering if his user was deleted or anything?

    Also I'm pretty sure I had private messages waiting for me (because I got email notifications), but there are fewer than I expected in my Guru3D inbox - If anyone PM'ed me and it was important , try PM'ing me again.
     
  19. K-putt

    K-putt Master Guru

    Messages:
    472
    Likes Received:
    0
    GPU:
    GTX 1080Ti
    Nice to hear that you're getting better! :)
    I know that feeling very well. Time and Friends helps a lot. And nice weather too :)

    The eFX thread is deleted because the database got restored.
    Some admin account got hacked and someone got access to the server.
    Server vulnerability 14 July 2013 - Database restored and passwords reset

    And thanks for this updated shader :)
    I need to try it out now.

    Keep up your awesome work!

    Shader works perfectly.

    [​IMG]
     
    Last edited: Jul 30, 2013
  20. jim2point0

    jim2point0 Maha Guru

    Messages:
    1,348
    Likes Received:
    42
    GPU:
    Asus Strix 2080TI
    Ahh. Well that worked great :) It's coming in handy in a few games where I can't use my 2.37:1 custom resolutions.

    As k-putt said, the forum got rolled back an entire month. A month's worth of PMs, forum posts, etc were lost. So yeah. Chances are you did have PMs but they're gone now. Really strange time that was...
     
Thread Status:
Not open for further replies.

Share This Page