Custom Shaders for GSdx
Here's a shader I made trying to port BSNES' color ramp for Snes9x, seems to work quite nicely for PS2 too. color curve

Shader ON | Shader OFF

Code:
Texture2D Texture : register(t0);
SamplerState TextureSampler : register(s0);

struct VS_OUTPUT
{
    float4 p : SV_Position;
    float2 t : TEXCOORD0;
};

struct PS_OUTPUT
{
    float4 c : SV_Target0;
};

float ramp(float c)
{
    return c > 0.5 ? c : 0.24*c + 2.22*c*c - 1.4*c*c*c;
}

float4 ps_main(VS_OUTPUT input) : SV_Target0
{
    float4 col = Texture.Sample(TextureSampler, input.t);

    col.r = ramp(col.r);
    col.g = ramp(col.g);
    col.b = ramp(col.b);
    
    return col;
}
[Image: nbKSK.jpg]
Reply

Sponsored links

I tried saving that code into an .fx file and loading it but it didn't work. Shame, that preview looks nice.
Reply
Anyone, can ppsspp's  "SupersamplingAA(Gause) shader" port to pcsx2 ?

This shader makes high quality image as removing a lot of aliasing.


shader off
[Image: 4XPcFoh]

shader on
[Image: UsK4MtM]
Reply
Wink 
Hello again. Lately there's a lot of talk about AMD image sharpening and since some of it's IPs are open source the algorithm has already been ported to ReShade format etc.

Otherwise it's quite lightweight and does a nice job. 

Have fun!


Attached Files
.zip   AMD CAS Sharpening.zip (Size: 2,19 KB / Downloads: 536)
Reply
what shader is best for FFXII IZJS? I'm using pcsx2 1.5
Reply
(03-21-2013, 09:08 AM)Asmodean Wrote: GSdx FX Post-Processing Suite
D3D10 or higher is required(SM4.0+)

Current effects include:

  • HQ FXAA
    -

  • Bilinear Texture Filtering

  • Bicubic Texture Filtering

  • Gaussian Texture Filtering

  • Bicubic Scaling

  • Lanzcos Scaling
    -

  • Blended Bloom

  • Scene Tonemapping

  • Gamma Correction

  • Texture Unsharp Mask

  • Pixel Vibrance

  • Local Contrast Enhancement

  • Colour Grading

  • PX Cel Shading
    -

  • Scanline Emulation

  • Vignette

  • Subpixel Dithering

  • Px Border (MSAA Workaround)

    -----------------------------------------
    You can enable, or disable each effect, from inside the shader settings file. Everything is customizable. Settings are clearly sectioned, and labeled. Use the documentation comments for instructions on each option.
    The default setup is enhancement settings (compliment/enhance the original game's image, without changing it's overall tone & feel) I keep the defaults pretty neutral, so people who don't want to play with the settings can just turn it on and use it. To get the most out of it, customize the many effect settings for yourselves.

    To Install:
    EDIT: I've changed the post-processing directory on the latest dev builds. It's no longer installed to the root, but to a 'shaders' directory. This comes with new builds. I recommend using those, instead of getting here.
    Extract the contents of PCSX2Fx.zip to your PCSX2 root folder(the same folder that the pcsx2.exe binary is in). You can enable the FX shader from inside the GSdx options dialog. You can toggle the shader on and off, by using the HOME key.

    To edit options:
    Open GSdx_FX_Settings.ini in a text editor. I recommend Notepad++, but you can use whatever you like. You can enable, disable, and customize various options, for each effect.

    Notice: This post-processing suite is now shipped with development builds of PCSX2. I recommend you go download the latest version.
    Link:
    Enjoy.

    You can also find my PS1 version: PsxFx here (Hasn't been updated in quite a while, though)

    Some screens below: Update: These screens are ridiculously old. From version 1.1 or something. I'll update them when I get around to it

    [Image: 3df2b0263949249.jpg] [Image: 565d8e263949289.jpg] [Image: 4f6791263949270.jpg]

    Code:
    Version History
    --------------------
    Updated to 2.20

    Too many changes to list :p
    Basically rewrote most of the effect logic, added new effects, and optimizations.

    --------------------
    Updated to 2.00

    -Added CRT emulation effect
    -Added Pseudo Light Attenuation, which now works with default builds of GSdx
    -Added Vignette Effect
    -Updated Gamma Correction, Color Correction, and Sharpening
    -Overall small coding optimisations, should increase speed with multiple/all effects enabled.

    --------------------
    Updated to 1.50

    -Shader settings are now stored in a separate file from the shader code. Keeps things simple for people. Open up PCSX2Fx_Settings.txt to configure any of the options.
    -I was unhappy with the old bloom code, so it has been removed, and replaced with a nice new bloom, adapted from KrossX's screen bloom (Thanks KrossX).
    -FXAA has been updated for improved pixel/luma accuracy, quality, and performance.
    -I've added 4 quality presets to the FXAA settings, to make it easier to change the overall quality. Low, Medium, High, and Ultra.
    -Improvements made to the tone mapping and color correction for more accurate corrected color reproduction, and tone mapping of a scene.
    -Added two tonemapping types to choose from. Scene, and Local tonemapping.
    -Added RGB Alpha checking, for improved luminance reproduction of light sources.
    -Improved Gamma correction, with post inverse correction of sRGB 2.2.
    -Various efficiency coding improvements, ~20% improved performance with all effects enabled, versus 1.20.
    --------------------
    Updated to 1.20

    -Completed the RGB Color Correction.
    -Improved contrast clamping, to prevent over-darkening in some games.
    -Completed in-shader documentation of effects & options.
    -Improved effect options
    -Slightly improved FXAA implementation
    -Improved the Highpass Bloom a bit. It's the best I can do for now, with a single pass.
    -Slightly improved Gamma Correction function
    -Added a color buffer, and improved the global registering a bit
    -Overall code clean up, & improvement
    --------------------
    Updated to 1.15

    - More code improvements.
    - Furthered the Color Correction again
    - HDR Pass, is now Gamma Correction (bloom, gamma correction, & color correction used together, is the HDR).
    - Added Subpixel Dithering
    - Improvements to the FXAA code & implementation
    - Improvements made to the luma sharpen code section
    - Improvements/changes made to the config options. and labelling
    --------------------
    Updated to 1.11

    - More code improvements.
    - Furthered the Color Correction.
    - Color Correction now has Intelligent Scene Tone Mapping (Takes samples of dark pixels, separately from light pixels, and adjusts them accordingly)
    --------------------
    Updated to 1.1

    - Various code improvements.
    - Some improvements to the FXAA.
    - Added a new FXAA setting, for a subtle, or more aggressive FXAA.
    - Merged the tonemapping, and color correction, for some optimisation.
    - Amended the pseudo pass order of the main, for better merging of the effects.
    - improved the optional bloom glow(in settings) also.
  • Hi is there anyway other shaders can be added to this suit? Thanks for any help from anyone.
  • Reply
    (12-30-2019, 04:33 AM)ATLee7618 Wrote: [*]
    Hi is there anyway other shaders can be added to this suit? Thanks for any help from anyone.
    [*]

    Anyone? Unsure
    Reply
    (01-03-2020, 12:09 AM)ATLee7618 Wrote: [*]

    Anyone? Unsure
    [*]The author of this shader suite hasn't been seen on here since October 2018 so I would guess unlikely. The suite is open source I believe but I would be surprised if anyone would add on to it without trying to get Asmodean's blessing. Who knows though but I wouldn't hold my breathe.
    PC: Intel i7 6700
           16 GB DDR4 2400 RAM
           ASUS Phoenix GTX 1660 SUPER OC
    Reply
    When I use the bloom shaders in Ico sometimes textures get buggy on the floor. What causes this?
    Reply
    Is it possible to use these custom shaders in Linux? I'm able to see a change after setting the location of GSdx.fx and GSdx_FX_Settings.ini and checking the 'External Shader (Home)' box in the GSdx Config screen, but so far, I haven't figured out how to apply the custom shader.fx files. Copying it to the executable directory (/usr/games in Linux), as the instructions say to do, doesn't seem to have a visible difference, and selecting anything besides GSdx.fx within the config causes Home to have no effect at all.

    (using the latest 1.5.0-0 provided by pcsx2-unstable)
    Reply




    Users browsing this thread: 5 Guest(s)