1D LUT for ReShade

Home Forums Help and Support 1D LUT for ReShade

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #4065

    Pneumatic
    Participant
    • Offline
    #4067

    Pneumatic
    Participant
    • Offline

    If you can’t get the same result, try pushing the reshade files to the directory of FRAFS and editing the values there in CustomFX.cfg.      Mediator is such a cluster#@%! …

    #4068

    Pneumatic
    Participant
    • Offline

    Ugh, mediator is horrid.    After every change you must hit apply in the top right, and then Update in the bottom middle, and then you MUST select the application you are about to launch from the left hand drop down list, or otherwise push the files.        Worst UI ever!     And he puts that PC Master Race logo next to it…..total cringe.

    #4142

    Pneumatic
    Participant
    • Offline

    So, the deband shader looks good on grey ramp test patterns, but in actual games and real world content it’s crushing quite  a bit of detail out of the image:

    I have tried for a very long time to find some magic combination of settings that smoothed without crushing.   I think I’ve tried every single combination of values 🙂

    For now I will stick with the normal 8-bit banding with the -p setting.

    • This reply was modified 3 years, 6 months ago by Pneumatic.
    #4258

    Pneumatic
    Participant
    • Offline

    Breakthrough!    Forget deband, use grain instead.   It works great, no artefacts and no loss of texture detail.   Just have to go into pipeline.cfg and put (CustomFX, Grain) before (CustomFX, ColorCorrection) .

    The default settings work very well, but I found it possible to reduce GrainPower to 0.01 to make the grain almost invisible.   The grain pattern is actually less noticeable than in screenshots because the  pattern is temporally randomised.

    Honestly I am shocked at how well it works.  Just a simple layer of noise and our eyes are tricked into integrating smooth gradients.     GPU usage is great too, only 2%.

    #4265

    Pneumatic
    Participant
    • Offline

    Just a heads up, there is a bug with the CustomFX LUT shader with the handling of the first 8 shades above black.   If you open CFX_lut_linear_0-255.png with FRAFS and use the same file for the CustomFX LUT, and then take a screenshot, the RGB levels are not the same as the original file.   The problem is with the first 8 shades above black being offset by 1 value.     It can be corrected by doing some modifications to the first 8 shades in CFX_lut_linear_0-255.png , which I have uploaded here:   https://www.mediafire.com/?5os2b5lbai8j4pn  .  Basically the correction goes like this: 0=0 , 1=2 , 2=3 , 3=4 , 4=5 , 5=6 , 6=7 , 7=8 , 8=8, 9=9 , 10=10…. and from then on it’s identical.    With this modification the screenshot matches exactly the levels in CFX_lut_linear_0-255.png and the image is unaltered as it should be.   I figure it’s some kind of rounding error near black in ReShade.

    • This reply was modified 3 years, 6 months ago by Pneumatic.
    #4763

    Pneumatic
    Participant
    • Offline

    Just a heads up, there is a bug with the CustomFX LUT shader with the handling of the first 8 shades above black.   If you open CFX_lut_linear_0-255.png with FRAFS and use the same file for the CustomFX LUT, and then take a screenshot, the RGB levels are not the same as the original file.   The problem is with the first 8 shades above black being offset by 1 value.     It can be corrected by doing some modifications to the first 8 shades in CFX_lut_linear_0-255.png , which I have uploaded here:   https://www.mediafire.com/?5os2b5lbai8j4pn  .  Basically the correction goes like this: 0=0 , 1=2 , 2=3 , 3=4 , 4=5 , 5=6 , 6=7 , 7=8 , 8=8, 9=9 , 10=10…. and from then on it’s identical.    With this modification the screenshot matches exactly the levels in CFX_lut_linear_0-255.png and the image is unaltered as it should be.   I figure it’s some kind of rounding error near black in ReShade.

    It turns out the above is not a proper fix.

    The root cause of the problem seems to be due to the shader’s texture size being too small.   I was able to fix it   by nearest neighbour upscaling the 256×1 texture to a 1024×1 image (each pixel is duplicated 4 times, no interpolation), and then changing line 35 of Reshade\CustomFX\ColorCorrection.h  to specify  a texture width of 1024.        After this, the near black shades are displaying correctly in FRAFS.

    edit:  it seems you don’t need to upscale the image to 1024, just change line 35 and the levels are good.

    • This reply was modified 3 years, 5 months ago by Pneumatic.
    • This reply was modified 3 years, 5 months ago by Pneumatic.
    #4857

    Pneumatic
    Participant
    • Offline

    Well, turns out the above is not a proper fix either.   Inspecting the pixel values of a screenshot reveals the rise out of black is still not correct as it skips the first shade above black (0-2-3-4…. when it should be 0-1-2-3… ) .

    The magical number seems to be a texture width of either 2055 or 2056, on line 36 of colorcorrection.h:

     texture texLUT < string source = "ReShade/CustomFX/Textures/CFX_lut.png"; > {Width = 2055; Height = 1; Format = RGBA8;};

    With this value applied and linear CFX_lut as both the correction LUT and test image in FRAFS, the output levels are now 100% identical.   Rise out of black is 0-1-2-3-4 …. 253-254-255 , with no skipped or duplicate shades.

    #4858

    Pneumatic
    Participant
    • Offline

    Spoke too soon again 🙂

    So, running a linear calibration through the shader returns the correct output values, but with an actual calibration file the levels near black are still not quite right.

    #4859

    Pneumatic
    Participant
    • Offline

    Breakthrough!   Set the MinFilter, MagFilter and MipFilter to NONE.

    sampler2D SamplerLUT
    {
     Texture = texLUT;
     MinFilter = NONE;
     MagFilter = NONE;
     MipFilter = NONE;
     AddressU = Clamp;
     AddressV = Clamp;
    
    };

    I am now getting correct levels on everything, and high precision values are being rounded correctly to their nearest 8-bit value.

Viewing 10 posts - 16 through 25 (of 25 total)

You must be logged in to reply to this topic.

Log in or Register

Display Calibration and Characterization powered by ArgyllCMS