ReShade - Advanced post-processing everywhere (SweetFX)

Discussion in 'Game Tweaks and Modifications' started by CeeJay.dk, Nov 30, 2014.

  1. Radical_53

    Radical_53 Ancient Guru

    Messages:
    4,358
    Likes Received:
    211
    GPU:
    EVGA RTX 3080 FTW3
    Seems that you are, yes. Boulotaur doesn't work with 8.1 and Radeon Pro has compatibility issues as far as I know. Never used that one myself though.
    No other solution, that's the pint, works for every newer game and every newer OS. Only Reshade can do that.
     
  2. jackie

    jackie Active Member

    Messages:
    70
    Likes Received:
    0
    GPU:
    512
    Problem solved.

    --------------------------------------------------------------------------------------------------------------------

    Now regarding your latest point:
    Um, excuse me?
    Of all the versions I bothered to try, no version of SweetFX+Reshade has ever worked with ENB proxy while regular SweetFX works perfectly.
    Furthermore, when I tried the last version of SweetFX+Reshade on Skyrim it wouldn't work at all, even without ENB.
    That game is from fricking 2011. :D
     
    Last edited: Mar 31, 2015
  3. johnchaser

    johnchaser Member

    Messages:
    18
    Likes Received:
    0
    GPU:
    780
    And i'm not arguing with this - my words about depth buffer was for unfair words from Martigen who is praised this like something unbelievable and fully working feature. But even this feature adds support for some amazing effects it's also brings another big question about performance.
    My main interest at this point is to understand what it would be - the fast post-processing for PLAYING games OR the ultimate tool for "screen-archery" with all good and bad meanings of this term. Compatibility with different versions of DirectX and OS's is great but in our days we can easily use multiple OS's on a single PC.
    And what is with DX12 compatibility? I understand W10 is not released yet but some info on this would be great.
    And yes you're doing great job and i'm NOT UNhappy with your work - please understand me right i can't be unhappy in any case for this free software. About install - all was normal and i'm always read the manual before using anything.
    Main question was about SweetFX future because it's cloudy for now and many things was beyond the understanding.
    After reading your post and CJ's one all become much clearer.
    Also i wish to bring my apologies for any inconvenience for my post if you found it insulting. I don't have any bad thoughts.
     
  4. Martigen

    Martigen Master Guru

    Messages:
    530
    Likes Received:
    253
    GPU:
    GTX 1080Ti SLI
    By all means :)

    Though I'm sure he could elaborate more, Crosire's focus at the moment is on compatibility, and you can speed this by posting reports in the Reshade forum. I've been testing it on every game currently installed from my Steam library and only one has problems. It's getting better every release.

    As for performance, see Ceejay's post on the previous page -- Reshade is actually faster than MrHaandi's injector. To elaborate more on CJ's post: one of the features Reshade provides is the ability to do multiple passes, which previous injectors can't. This allows shader developers to do a lot more when it comes to effects for improving our games, properly layering effects -- such as sharpening after anti-aliasing with SMAA or FXAA, which produces better results (SweetfX 2.0 now does this). As Ceejay explained, there's still more work to do on the shader side, and how many passes are used.

    You're absolutely right, not sure what I was thinking there, been a while since I used the original injector. I stand corrected.

    The DX8 support is there because believe it or not some people still enjoy older games, and some of the console emulators use it as well, and now they can be enhanced too. The new Wolfenstein is OpenGL as is its latest expansion (and the only way to get decent AA is through Reshade, since the in-game console commands don't stick), and it's likely Dishonored 2 will be too thanks to IdTech5. It's also only going to become more common because of it's cross-platform nature and use on Linux, ergo SteamOS and Steam Machines, mainly due to Valve's influence.

    64-bit games are only going to become more common, too. Memory requirements are constantly going up, and more and more games are coming out as 64-bit. Just from the sample of my currently-installed games, it's more than half. These include: Wolfenstein, Assassin's Creed Unity, Dragon Age: Inquistion, Far Cry 4, The Vanishing of Ethan Carter, Star Citzen Arena Commander, and Shadow of Mordor.

    That's a pretty pessimistic view :) And that's coming from someone who uses Linux primarily and Windows mostly for games. I've been dual-booting since OS/2 (I used to have four or five OSes on my machine...) and am no fan of Microsoft's many and varied anti-competitive practices, but its OS sales are actually only a small part of its revenue. Microsoft makes most of its money from enterprise and business and with products like Office.

    This won't be enabled in any machine or motherboard from any major manufacturer. Linux (and BSD, and variations thereof) runs the world now, from supercomputers to toasters. No company is going to ignore a revenue stream by locking out a market. The Windows UEFI story has been mostly hyped up, just as it was with Win 8.

    As for the Win 8 hate, again coming from a Linux nerd... it's actually a decent OS. Metro sucks balls, but with two tweaks (or a few clicks of a mouse in Win 8.1) you don't have to see Metro at all. Win 8 is quicker, uses less memory, and runs games faster than Win 7 and Windows 10 improves this further.

    They are all separated. Look at the framework, each has its own directory, and you can elect to use none or all. You can install Reshade and the framework, and just use SweetFX.

    ...Because these threads are the official SweetFX feedback threads, and where development of Boulotaur's, eFX and Reshade started. The Reshade forum is new, and it's natural discussion will continue both here and there.
     

  5. Martigen

    Martigen Master Guru

    Messages:
    530
    Likes Received:
    253
    GPU:
    GTX 1080Ti SLI
    I don't believe I said it's unbelievable or fully working. *looks at my last post*. Nope.

    FWIW, I'm using depth-assisted SMAA in Dragon Age: Inquistion and Alien: Isolation atm. It doesn't work in all games yet, and Crosire has said he'll work in it once compatibility is sorted.

    Why not both? But first you get it working with everything, then you optimise performance.

    Compatibility wise, it'll be for Windows 10 only. The bigger question is why is this important? The answer is that DX12 provides for multi-threaded draw call queues, which has two results: greatly improved performance, greater fidelity through more complex scenes, or both. Nothing is concrete yet, but this is a great primer: http://www.anandtech.com/show/8962/the-directx-12-performance-preview-amd-nvidia-star-swarm/1

    It's a best-case scenario of pushing large loads across, but in the tests on page 3 you can see DX12 more than doubles a GTX980's FPS, and even an old GTX680 sees an almost 50% FPS increase. Just by moving to DX12. It's one of the most important changes to PC graphics in the last decade.

    There are a lot of optimisations going on under the hood in the graphics layer in Windows 10 to support DX12, including changes at the kernel level. I'm hoping that even DX9-11 games may benefit, if only a little, from these optimisations. We'll have to wait and see.
     
  6. Scarecrow7

    Scarecrow7 Master Guru

    Messages:
    233
    Likes Received:
    0
    GPU:
    HIS R9 280X / 3GB
    Except it does work with Skyrim through ENB's proxy system.

    Quick split-screen shoot, I'm still tweaking this ENB, lol
    You can see the difference on Mara's altar and on the candles, still.

    [​IMG]

    I'm not here to argue, just wanna find out why it is not working for you, dude.
    I'm on Windows 8.1 x64 myself, using SweetFX 1.5.1 through ENB as well.
     
  7. Radical_53

    Radical_53 Ancient Guru

    Messages:
    4,358
    Likes Received:
    211
    GPU:
    EVGA RTX 3080 FTW3
    @jackie: Oh yes, "problem solved". Great argument. You should listen to your own advice then and stop playing Skyrim, if that's the only game giving you trouble ;) Works fine for me btw.
     
  8. Horus-Anhur

    Horus-Anhur Ancient Guru

    Messages:
    8,070
    Likes Received:
    10,027
    GPU:
    RX 6800 XT
    The thing is we can only do one proxy injector with ENB.
    Either we do SweetFX and get all effects working except SMAA. Or we do only SMAA.
     
  9. Scarecrow7

    Scarecrow7 Master Guru

    Messages:
    233
    Likes Received:
    0
    GPU:
    HIS R9 280X / 3GB
    Poxa cara, não.

    SweetFX 1.5.1 through ENB is working 100% on Windows 8.1 x64. SMAA, lumasharpen, vibrance... you name it.

    There is no "except SMAA", it is working fine.
     
  10. jackie

    jackie Active Member

    Messages:
    70
    Likes Received:
    0
    GPU:
    512
    You made a huge fuss about how much trouble it is to get an injector working in win8 so I simply suggested an obvious solution. :)

    It is painfully clear that you have a huge bias in favor of Reshade and won't accept anything other than positive support for it from others. I have no problem with bias as long as people are forthright about it. To be otherwise is simply shady (sorry, I couldn't resist the pun). On the other hand, I don't have a bias for or against any injector. Like most gamers, I am only concerned about one thing: either it works or it doesn't. In my own experience, Reshade has an extremely poor record in that regard. Maybe that will change in the future but as of right now it offers nothing to me except compatibility problems and poor performance. Since there seems to be more of an interest in dragging everybody along for the ride than in getting a solid product out the door I can't say that I am very optimistic about its ultimate outcome.

    But who knows, maybe Reshade will actually have a reliable release somewhere down the road. Only time will tell I guess.

    -------------------------------------------------------------------------------------------------------------------------

    The nonsensical statements in the other post which deride the danger of UEFI lead me to doubt that there is any point in trying to have a serious dialogue about it so I didn't bother to paste a quote from it. Although the original aim of M$ in forcing UEFI on hardware makers was to kill Linux in general, it should concern PC enthusiasts even more now since M$ has a direct threat from GabeN that they need to quash or the Windows OS will simply become obsolete. Everybody needs to be fully aware of the UEFI restriction noose that M$ casually introduced in win8 and which will be fully tightened in win10. Hopefully the majority of people that read these forums have enough common sense to research the subject themselves. We are at a major crossroads which will determine the freedom of the hardware/software landscape for years to come. If you insist on supporting the M$ UEFI scam, then at least educate yourself about the consequences.

    P.S. While I was researching I stumbled across some extremely interesting information about a new next-gen API that OpenGL has created called "Vulkan" which SteamOS is going to use. I don't want to spoil the surprise if you haven't heard about it yet, but its basically like a hardware agnostic version of Mantle that will run on everything. ;)
    link: https://www.khronos.org/vulkan
     
    Last edited: Apr 2, 2015

  11. Horus-Anhur

    Horus-Anhur Ancient Guru

    Messages:
    8,070
    Likes Received:
    10,027
    GPU:
    RX 6800 XT
    Really? I know that SweetFX with SMAA or SMAA 1.2 Injeftor don't work on windows 8.1, bacause of the new driver model.

    But you are saying that injecting SweetFX via proxy, with SMAA enabled, with ENB will work? I had no ideia. I thought that ENB would have the same limitation as SweetFX alone.

    I wil have to try it out. Really hope it does.

    Obrigado pela dica, cara!
     
  12. jackie

    jackie Active Member

    Messages:
    70
    Likes Received:
    0
    GPU:
    512
    Last edited: Apr 2, 2015
  13. Redemption80

    Redemption80 Ancient Guru

    Messages:
    18,495
    Likes Received:
    267
    GPU:
    GALAX 970/ASUS 970
    Lower idle vram usage is not necessarily a good thing, that is why these things are misleading to users.

    Most people base 8.1 gaming on real life performance and how it compared to W7, only a tiny amount of gamers are basing gaming experience on W8 only
     
  14. jackie

    jackie Active Member

    Messages:
    70
    Likes Received:
    0
    GPU:
    512
    Ummm...what??? :confused:

    Idle vram is what is being used by the OS and isn't available for the game. The bulk of that number is being hogged by the DWM in win8 and it can never be disabled. On the other hand, its very easy to disable the DWM in win7. So if you leave the DWM enabled in win7 then they will tie but if you disable the DWM in win7 then it will win.

    Here is an article about testing the effect of lower idle vram usage on actual games.
    link: http://forums.evga.com/High-Res-Gam...ould-Pics-because-it-did-happen-m1583381.aspx
     
    Last edited: Apr 2, 2015
  15. Redemption80

    Redemption80 Ancient Guru

    Messages:
    18,495
    Likes Received:
    267
    GPU:
    GALAX 970/ASUS 970
    I know, but your only comparing it at idle.

    Has there been any proof that it causes higher vram usage in games when compared to a W7 system with Aero disabled, and in turn lower framerate/stutter?

    People didn't give up dual booting W7/8.1 for no reason.
     

  16. Radical_53

    Radical_53 Ancient Guru

    Messages:
    4,358
    Likes Received:
    211
    GPU:
    EVGA RTX 3080 FTW3
    8.1, 8.0 was and is fine. I'm using 8 as it's faster than 7, lighter on ressources and I simply like the style.

    As I said before, if that's your understanding of "solution" stop playing Skyrim.
     
  17. jackie

    jackie Active Member

    Messages:
    70
    Likes Received:
    0
    GPU:
    512
    Did you even bother to read either of the articles? The second article shows very clearly that games run better in win7 when DWM is off.
    (M$ obviously knows this better than anybody because they included the option for the user to disable it in the shortcut settings.)

    The reason games run worse in win7 when DWM is enabled is because DWM needs to use the GPU in order to work.
    That GPU horsepower is essentially "stolen" from the game when DWM is on.

    It seems logical that it will have the same effect in win8 so it should be tested on & off, right?
    The problem is that DWM can't be disabled in win8. Knowing this fact, I am willing to bet that all the well known benchmarkers
    probably left DWM enabled in their win7 vs win8 tests because they wouldn't want win7 to have an "unfair" advantage. ;)

    Since I don't have a copy of win8 then people that do have both will have to be the ones to test it.
    Of course the larger the consensus is, the more likely it is that the test results would be accurate.

    Besides, you already know my bias against win8 so there wouldn't be any point in me doing the test anyway. :)
     
    Last edited: Apr 2, 2015
  18. Harodain

    Harodain New Member

    Messages:
    1
    Likes Received:
    0
    GPU:
    Gforce GTX 560
    Hey guys, I just formatted my PC, the game Guild Wars 2 just runs fine without the SweetFX file d3d9.dll in the bin folder. Once I put it in the bin folder, the launcher automatically crashes with the following error:
    —> Crash <—
    Assertion: Failed to load Coherent DLL: 0xc1
    File: ..\..\..\Engine\ArenaWeb\CoherentUi\AwCoh.cpp(46)
    I really want to play the game with SweetFX on, it looks like crap otherwise.
    (I can copy the entire text file here if you want)


    I tried almost everything already (I think!). To repairing the game, doing a clean install, Updating the directx libraries, traied installing the configurator, I tried with the GEMFX and nothing. It's that darn d3d9.dll that once it's there in the bin folder it brings up that crash immediately after the launcher pops up, I tried lots of other things. I just can't get it to run for the life of me.

    Is there any kind soul that could help me out here?
     
  19. gold333

    gold333 Member

    Messages:
    46
    Likes Received:
    0
    GPU:
    GTX670CUII oc'd
    Hi all,

    Is there any way to use SweetFX to just inject SMAA and leave all the graphics of an application alone? (i.e. colourbalance, etc).

    I'm trying to force SMAA on Assassin's Creed Rogue but injectSMAA by mr haandi doesn't work.

    I'm wondering if I can force SMAA using SWEETFX and change nothing else.


    EDIT: Nevermind, SweetFX apparently doesn't work with Assassin's Creed: Rogue as the log.log isn't updateing and pressing the activation key ingame doesn't do anything.
     
    Last edited: Apr 6, 2015
  20. jackie

    jackie Active Member

    Messages:
    70
    Likes Received:
    0
    GPU:
    512
    Since neither of you made any mention of the Boulotaur2024 injector for SweetFX, I posted some links to it below:

    Original Boulotaur2024 injector (w/SweetFX_1.4): http://forums.guru3d.com/showpost.php?p=4581604&postcount=528
    Updated Boulotaur2024 injector (w/SweetFX_1.5.1): http://forums.guru3d.com/showthread.php?t=381912&page=2


    You might give that a try and see if you have better luck getting SweetFX to work.
    I have yet to find a game that doesn't work with that injector, but since I am using win7 your mileage may vary. :)

    Just enable SMAA by putting a "1" next to it in the "Choose Effects" section of SweetFX_settings.txt and disable the rest of the effects with a "0".
    I don't know if it would be useful to you, but here is an edited SweetFX_settings.txt + Main.h that I made for situations where I only want the bare essential effects so that I can make very fast adjustments.

    SweetFX_settings.txt:
    Code:
       /*-----------------------------------------------------------.   
      /                       Description                           /
      '------------------------------------------------------------/
    SweetFX version: 1.4
    Author: CeeJay.dk
    Injector: Boulotaur2024_6.1.2013
    
       /*-----------------------------------------------------------.
      /                      Choose Effects                         /
      '-----------------------------------------------------------*/
    #define USE_SMAA_ANTIALIASING 0 //[0 or 1] SMAA Anti-aliasing.
    #define USE_FXAA_ANTIALIASING 0 //[0 or 1] FXAA Anti-aliasing.
    #define USE_LUMASHARPEN   1 //[0 or 1] Screen sharpening with limiter.
    #define USE_LIFTGAMMAGAIN 1 //[0 or 1] Adjust brightness and color of shadows, midtones and highlights.
    #define USE_VIBRANCE      1 //[0 or 1] Intelligently saturates or desaturates the pixels depending on their original saturation.
    #define USE_CURVES        1 //[0 or 1] Contrast adjustments using S-curves.
    
       /*-----------------------------------------------------------.
      /                  SMAA Anti-aliasing settings                /
      '-----------------------------------------------------------*/
    #define SMAA_THRESHOLD           0.10 //[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  8 //[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.
    #define COLOR_EDGE_DETECTION        0 //[0 or 1] 1 = color edge detection (slower but slightly more accurate); 0 = luma edge detection (faster).
    #define SMAA_DIRECTX9_LINEAR_BLEND  0 //[0 or 1] Enable only for pre dx10 gpu (i.e. Geforce 7xxx or Radeon X1xxx series or older cards).
    
       /*-----------------------------------------------------------.
      /                  FXAA Anti-aliasing settings                /
      '-----------------------------------------------------------*/
    #define FXAA_QUALITY__PRESET      10 //[10 to 39] Choose the quality preset. (Highest Quality = 39).
    #define fxaa_Subpix            0.400 //[0.000 to 1.000] Choose the amount of sub-pixel aliasing removal.
    #define fxaa_EdgeThreshold     0.250 //[0.000 to 1.000] The minimum amount of local contrast required to apply algorithm.
    #define fxaa_EdgeThresholdMin  0.060 //[0.000 to 1.000] Darkness threshold. Trims the algorithm from processing darks.
    
       /*-----------------------------------------------------------.
      /                     LumaSharpen settings                    /
      '-----------------------------------------------------------*/
    #define sharp_strength  2.00 //[0.10 to 3.00] Strength of the sharpening.
    #define sharp_clamp     0.10 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel receives. (Default = 0.035).
    #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. (Default = 1.0).
    // -- Debug sharpening settings --
    #define show_sharpen       0 //[0 or 1] Visualize the strength of the sharpen (multiplied by 4 to see it better).
    
       /*-----------------------------------------------------------.
      /                      Lift Gamma Gain settings               /
      '-----------------------------------------------------------*/
    #define RGB_Lift  float3(1.004, 1.004, 1.004) //[0.000 to 2.000] Adjust shadows brightness for Red, Green and Blue. (1.000 = Neutral no change).
    #define RGB_Gamma float3(1.000, 1.000, 1.000) //[0.000 to 2.000] Adjust midtones brightness for Red, Green and Blue.
    #define RGB_Gain  float3(0.996, 0.996, 0.996) //[0.000 to 2.000] Adjust highlights brightness for Red, Green and Blue.
    
       /*-----------------------------------------------------------.
      /                       Vibrance settings                     /
      '-----------------------------------------------------------*/
    #define Vibrance  0.60 //[-1.00 to 1.00] Intelligently saturates or desaturates the pixels depending on their original saturation.
    
       /*-----------------------------------------------------------.
      /                        Curves settings                      /
      '-----------------------------------------------------------*/
    #define Curves_mode         2 //[0|1|2] Choose what to apply contrast to. 0 = Luma, 1 = Chroma, 2 = Luma & Chroma. (Default = 0).
    #define Curves_contrast  0.32 //[-1.00 to 1.00] The amount of contrast.
    #define Curves_formula      2 //[1|2|3|4|5|6|7|8|9] The contrast s-curve. (3 = fastest but harshest formula).
                                  //1 = Sine, 2 = Abs split, 3 = Smoothstep, 4 = Exp formula, 5 = Simplified Catmull-Rom (0,0,1,1)
    			      //6 = Perlins Smootherstep, 7 = Abs add, 8 = Technicolor Cinestyle, 9 = Parabola.
    
       /*-----------------------------------------------------------.
      /                  Key settings                               /
      '-----------------------------------------------------------*/
    // This is the section where you can define your own key mapping
    // See the following URL to find out what keycode a key has:
    // http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
    
    // key_toggle_sweetfx = 145
    // key_screenshot     = 44
    // key_reload_sweetfx = 19
    
       /*-----------------------------------------------------------.
      /                  Misc settings                              /
      '-----------------------------------------------------------*/
    // You can load and chain other DirectX wrappers (ENB, Helix, Windower...)
    // If the external wrapper is already named d3d9.dll, rename it into
    // something else like "d3d9_enb.dll" (note that even if this is commented it actually works)
    
    // external_d3d9_wrapper = none
    // external_dxgi_wrapper = none
    
    Main.h:
    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 / 1920)
      #define BUFFER_RCP_HEIGHT (1.0 / 1080)
      #define BUFFER_WIDTH 1920
      #define BUFFER_HEIGHT 1080
    #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_LUMASHARPEN == 1)
      #include "LumaSharpen.h"
    #endif
    
    #if (USE_LIFTGAMMAGAIN == 1)
      #include "LiftGammaGain.h"
    #endif
    
    #if (USE_VIBRANCE == 1)
      #include "Vibrance.h"
    #endif
    
    #if (USE_CURVES == 1)
      #include "Curves.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 :: |
      '--------------------*/
    
      // LumaSharpen
      #if (USE_LUMASHARPEN == 1)
    	FinalColor = LumaSharpenPass(FinalColor,tex);
      #endif
    	
      // Lift Gamma Gain
      #if (USE_LIFTGAMMAGAIN == 1)
    	FinalColor = LiftGammaGainPass(FinalColor);
      #endif
    	
      // Vibrance
      #if (USE_VIBRANCE == 1)
    	FinalColor = VibrancePass(FinalColor);
      #endif
    
      // Curves
      #if (USE_CURVES == 1)
    	FinalColor = CurvesPass(FinalColor);
      #endif
    
      // 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;
    }
    
    If you want to use these, first make a backup of the originals and then save the new text into the replacement versions of those files. :)

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    P.S. While I was researching ini tweaks for Bioshock Infinite I ran across this perfect example of why I despise DOF effects in games.


    Depth Of Field Effect ON:
    [​IMG]
    "Holy crap...somebody smeared vaseline all over my monitor!"


    Depth Of Field Effect OFF:
    [​IMG]
    "Aaaaah...that's better."

    :D
     
    Last edited: Apr 10, 2015

Share This Page