mirror of https://github.com/PCSX2/pcsx2.git
[Post-Processing] Update GSdx FX effect suite to latest version.
This commit is contained in:
parent
fc480e9bea
commit
937e475169
|
@ -1,5 +1,5 @@
|
|||
/*===============================================================================*\
|
||||
|######################## [GSdx FX 2.00 Revised] ########################|
|
||||
|######################## [GSdx FX Suite v2.20] ########################|
|
||||
|########################## By Asmodean ##########################|
|
||||
|| ||
|
||||
|| This program is free software; you can redistribute it and/or ||
|
||||
|
@ -14,7 +14,7 @@
|
|||
|| ||
|
||||
|#################################################################################|
|
||||
\*===============================================================================*/
|
||||
//NOTICE: This shader suite requires DirectX 10 (Shader Model 4.0), or higher.
|
||||
//#NOTICE: This post-processing suite requires Direct3D10(Shader Model 4.0), or higher.
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
[DEFINITIONS & ON/OFF OPTIONS]
|
||||
|
@ -22,114 +22,134 @@
|
|||
|
||||
//---------------------------#[CHOOSE EFFECTS]#--------------------------------\\
|
||||
|
||||
//-#[ANTIALIASING TECHNIQUES] [1=ON|0=OFF] #READ: For best results: Use post antialiasing OR FS filtering. Not both. Postfix [2D/3D] after descriptions indicates if it's typically better for 2D, or 3D.
|
||||
#define UHQ_FXAA 0 //#High Quality Fast Approximate Anti Aliasing. Adapted for GSdx from Timothy Lottes FXAA 3.11. If using GSdx's internal FXAA, this will act as a second pass, for increased quality & coverage. [3D]
|
||||
//-#[ANTIALIASING TECHNIQUES] [1=ON|0=OFF] #READ: For best results: Use gsdx fx antialiasing OR FS filtering. Not both.
|
||||
#define UHQ_FXAA 0 //#High Quality Fast Approximate Anti Aliasing. Adapted for GSdx from Timothy Lottes FXAA 3.11. If using GSdx's internal FXAA, this equals FXAA2x. [3D]
|
||||
|
||||
//-#[FS FILTERING TECHNIQUES] [1=ON|0=OFF] #READ: For best results: Only enable one type of filtering at one time. Use post antialiasing OR FS filtering, not both.
|
||||
//-#[FS SCALING TECHNIQUES] [1=ON|0=OFF] #READ: For best results: Only enable one type of filtering at one time. Use post antialiasing OR FS filtering, not both.
|
||||
#define BILINEAR_FILTERING 0 //#BiLinear Fullscreen Texture Filtering. BiLinear filtering - light to medium filtering of textures. [2D]
|
||||
#define BICUBIC_FILTERING 0 //#BiCubic Fullscreen Texture Filtering. BiCubic filtering - medium to strong filtering of textures. [2D]
|
||||
#define GAUSSIAN_FILTERING 0 //#Gaussian Fullscreen Texture Filtering. BiLinear filtering - strong to extra strong filtering of textures. [2D]
|
||||
#define BICUBIC_FILTERING 0 //#Bicubic Fullscreen Texture Filtering. BiCubic filtering - medium to strong filtering of textures. [2D]
|
||||
#define GAUSSIAN_FILTERING 0 //#Gaussian Fullscreen Texture Filtering. Gaussian filtering - strong to extra strong filtering of textures. [2D]
|
||||
#define BICUBLIC_SCALER 0 //#Bicubic Interpolation Scaling. Uses BCS on up scaling, and downsampling of games, for smoother scaling.
|
||||
#define LANCZOS_SCALER 0 //#Lanczos Interpolation Scaling. Uses Lanczos on up scaling, and downsampling of games for smoother scaling.
|
||||
|
||||
//-#[LIGHTING & COLOUR] [1=ON|0=OFF] #READ: These can all be turned on & off independently of each other. [For High Dynamic Range(HDR) - use Bloom, Tonemapping, & Gamma Correction together]
|
||||
#define BLENDED_BLOOM 1 //#High Quality Bloom, using blend techniques. Blooms naturally, per environment. [For best results: use bloom, tone mapping, & gamma together].
|
||||
#define SCENE_TONEMAPPING 1 //#Scene Tonemapping & RGB Colour Correction. [For best results: use bloom, tone mapping, & gamma together].
|
||||
#define GAMMA_CORRECTION 1 //#RGB Post Gamma Correction Curve. [For best results: use bloom, tone mapping, & gamma together].
|
||||
#define S_CURVE_CONTRAST 1 //#S-Curve Scene Contrast Enhancement. Naturally adjusts contrast using S-curves.
|
||||
#define TEXTURE_SHARPENING 1 //#HQ Luma-Based Texture Sharpen, looks similar to a negative mip LOD Bias, enhances texture fidelity.
|
||||
//-#[LIGHTING & COLOUR] [1=ON|0=OFF] #READ: These can all be turned on & off independently of each other. [For High Dynamic Range(HDR) use Bloom & Tonemapping together]
|
||||
#define BLENDED_BLOOM 1 //#High Quality Bloom, using blend techniques. Blooms naturally, per environment.
|
||||
#define SCENE_TONEMAPPING 1 //#Scene Tonemapping & RGB Colour Correction. Corrects colour, and tone maps the scene.
|
||||
#define GAMMA_CORRECTION 1 //#RGB Gamma Correction. sRGB->Linear->sRGB correction curve. Enable for games with incorrect gamma.
|
||||
#define TEXTURE_SHARPEN 0 //#Bicubic Texture Unsharpen Mask. Looks similar to a negative LOD bias. Enhances texture fidelity.
|
||||
#define PIXEL_VIBRANCE 0 //#Pixel Vibrance. Intelligently adjusts pixel vibrance depending on original saturation.
|
||||
#define S_CURVE_CONTRAST 0 //#S-Curve Scene Contrast Enhancement. Locally adjusts contrast using S-curves.
|
||||
#define COLOR_GRADING 0 //#Post-Complement Colour Grading. Alters individual colour components on a scene, to enhance selected colour tones.
|
||||
#define CEL_SHADING 0 //#Cel Shaded toon look, simulates the look of animation/toon. Typically best suited for animated-style games. (cel edges interfere with post AA.)
|
||||
#define CEL_SHADING 0 //#PX Cel Shading. Simulates the look of animation/toon. Typically best suited for animated style games.
|
||||
|
||||
//-#[TV EMU TECHNIQUES] [1=ON|0=OFF] #READ: These can all be turned on & off independently of each other. These effects are typically used to simulated older TVs/CRT etc.
|
||||
#define SCANLINES 0 //#Scanlines to simulate the look of a CRT TV. Typically best suited for 2D/sprite games.
|
||||
#define SCANLINES 0 //#Scanlines to simulate the look of a CRT TV. Typically suited to sprite games. Note: Works best at Native Res.
|
||||
#define VIGNETTE 0 //#Darkens the edges of the screen, to make it look more like it was shot with a camera lens.
|
||||
#define DITHERING 0 //#Subpixel Dithering to simulate more colors than your monitor can display. Smoothes gradiants, this can reduce color banding.
|
||||
#define PX_BORDER 0 //#Creates a pixel border, as a workaround for the bright edge that using hardware antialiasing(MSAA) can cause. (Ported by request from SFX).
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
[SHADER FX CONFIG OPTIONS]
|
||||
[EFFECT CONFIG OPTIONS]
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
//-#[FXAA OPTIONS]
|
||||
#define FxaaSubpixMax 0.25 //[0.00 to 1.00] Amount of subpixel aliasing removal. Higher values: more subpixel antialiasing(softer). Lower values: less subpixel antialiasing(sharper). 0.00: Edge only antialiasing (no blurring)
|
||||
#define FxaaQuality 4 //[1|2|3|4] Overall Fxaa quality preset (pixel coverage). 1: Low, 2: Medium, 3: High, 4: Ultra. I use these labels lightly, as even the 'low coverage' preset is in fact, still pretty high quality.
|
||||
#define FxaaEarlyExit 1 //[0 or 1] Use Fxaa early exit pathing. This basically tells the algorithm to offset only luma-edge detected pixels. When disabled, the entire scene is antialiased(FSAA). 0 is off, 1 is on.
|
||||
//##[FXAA OPTIONS]##
|
||||
#define FxaaSubpixMax 0.50 //[0.00 to 1.00] Amount of subpixel aliasing removal. Higher values: softer. Lower values: sharper. 0.00: Edge only.
|
||||
#define FxaaQuality 4 //[1|2|3|4] Overall Fxaa quality preset (pixel coverage). 1: Low, 2: Medium, 3: High, 4: Ultra.
|
||||
#define FxaaEarlyExit 1 //[0 or 1] Use Fxaa early exit pathing. When enabled: Only luma edge pixels are antialiased. When disabled: the entire scene is antialiased(FSAA).
|
||||
|
||||
//-#[BILINEAR OPTIONS]
|
||||
//##[BILINEAR OPTIONS]##
|
||||
#define FilterStrength 1.00 //[0.10 to 1.50] Bilinear filtering strength. Controls the overall strength of the filtering.
|
||||
#define OffsetAmount 0.0 //[0.0 to 1.5] Pixel offset amount. If you want to use an st offset, 0.5 is generally recommended. 0.0 is off.
|
||||
|
||||
//-#[BICUBIC OPTIONS]
|
||||
#define Interpolation Triangular //[CatMullRom, Bell, BSpline, Triangular, Cubic] Type of interpolation to use. From left to right is lighter<-->stronger filtering. Try them out, and use what you prefer.
|
||||
//##[BICUBIC OPTIONS]##
|
||||
#define Interpolation Triangular //[CatMullRom, Bell, BSpline, Triangular, Cubic] Type of interpolation to use. From left to right is lighter<-->stronger filtering.
|
||||
#define BicubicStrength 0.75 //[0.10 to 1.50] Bicubic filtering strength. Controls the overall strength of the filtering.
|
||||
#define PixelOffset 0.0 //[0.0 to 1.5] Pixel offset amount. If you want to use an st offset, 0.5 is generally recommended. 0.0 is off.
|
||||
|
||||
//-#[GAUSSIAN OPTIONS]
|
||||
//##[GAUSSIAN OPTIONS]##
|
||||
#define FilterAmount 1.00 //[0.10 to 1.50] Gaussian filtering strength. Controls the overall strength of the filtering.
|
||||
#define GaussianSpread 0.75 //[0.50 to 4.00] The filtering spread & offset levels. Controls the sampling spread of the filtering.
|
||||
|
||||
//-#[BLOOM OPTIONS]
|
||||
#define BloomType BlendBloom //[BlendBloom, BlendScreen, BlendOverlay, BlendAddLight] The type of blend for the bloom (Default: BlendScreen). If using BlendOverlay set ToneAmount to 2.20, or it may be too dark.
|
||||
#define BloomPower 0.200 //[0.000 to 2.000] Strength of the bloom. You may need to readjust for each blend type.
|
||||
#define BlendPower 1.000 //[0.000 to 1.500] Strength of the bloom blend. Lower for less blending, higher for more. Default is 1.000.
|
||||
#define BlendSpread 4.000 //[0.000 to 8.000] Width of the bloom glow spread. Scales with BloomPower. Raising SharpenClamp affects this. 0.000 = off.
|
||||
#define BloomMixType 1 //[1|2|3] The interpolation mix type between the base colour, and bloom. (Default is 1) BloomPower/BlendSpread may need re-adjusting depending on type.
|
||||
//##[BLOOM OPTIONS]##
|
||||
#define BloomType BlendBloom //[BlendScreen, BlendOverlay, BlendBloom, BlendAddLight] The type of blending for the bloom (Default: BlendBloom).
|
||||
#define BloomStrength 0.200 //[0.100 to 1.000] Overall strength of the bloom. You may want to readjust for each blend type.
|
||||
#define BlendStrength 1.000 //[0.100 to 1.000] Strength of the bloom blend. Lower for less blending, higher for more. (Default: 1.000).
|
||||
#define BlendSpread 4.000 //[1.000 to 8.000] Width of the bloom 'glow' spread. 0.000 = off. Scales with BloomStrength. (Default: 4.000).
|
||||
#define BloomReds 1.00 //[0.00 to 8.00] Red channel component of the RGB correction curve. Higher values equals red reduction. 1.00 is default.
|
||||
#define BloomGreens 1.00 //[0.00 to 8.00] Green channel component of the RGB correction curve. Higher values equals green reduction. 1.00 is default.
|
||||
#define BloomBlues 1.00 //[0.00 to 8.00] Blue channel component of the RGB correction curve. Higher values equals blue reduction. 1.00 is default.
|
||||
|
||||
//-#[TONEMAP OPTIONS]
|
||||
#define TonemapType 1 //[1 or 2] Type of tone mapping. 1 is Natural(default), 2 is Filmic(cinematic) You might want to increase/decrease ToneAmount to compensate for diff types.
|
||||
#define ToneAmount 2.15 //[1.00 to 4.00] Tonemapping & Gamma curve (Tonemapping/Shadow correction). Lower values for darker tones, Higher values for lighter tones. Default: 2.20
|
||||
#define Luminance 1.00 //[0.10 to 2.00] Luminance Average (luminance correction) Higher values to decrease luminance average, lower values to increase luminance. Adjust by small amounts, eg: increments of 0.1
|
||||
#define Exposure 1.00 //[0.10 to 2.00] White Correction (brightness) Higher values = more Exposure, lower = less Exposure. Adjust by small amounts, eg: increments of 0.1
|
||||
#define WhitePoint 1.00 //[0.10 to 2.00] Whitepoint Avg (lum correction) Adjust by small amounts, eg: increments of 0.01. Generally it's best left at 1.00.
|
||||
#define RedCurve 1.00 //[1.00 to 8.00] Red channel component of the RGB correction curve. Use this to reduce/correct the red colour component. Higher values equals more red reduction. 1.00 is default.
|
||||
#define GreenCurve 1.00 //[1.00 to 8.00] Green channel component of the RGB correction curve. Use this to reduce/correct the green colour component. Higher values equals more green reduction. 1.00 is default.
|
||||
#define BlueCurve 1.00 //[1.00 to 8.00] Blue channel component of the RGB correction curve. Use this to reduce/correct the blue colour component. Higher values equals more blue reduction. 1.00 is default.
|
||||
//##[TONEMAP OPTIONS]##
|
||||
#define TonemapType 1 //[1 or 2] Type of tone mapping operator. 1 is natural map, 2 is cinematic(darker) map. (Default: 1)
|
||||
#define ToneAmount 0.25 //[0.00 to 1.00] Tonemap strength (scene correction) higher for stronger tone mapping, lower for lighter. (Default: ~ 0.25)
|
||||
#define BlackLevels 0.30 //[0.00 to 1.00] Black level balance (shadow correction). Increase to lighten blacks, lower to deepen them. (Default: ~ 0.30)
|
||||
#define Exposure 1.00 //[0.10 to 2.00] White correction (brightness) Higher values for more Exposure, lower for less.
|
||||
#define Luminance 1.00 //[0.10 to 2.00] Luminance average (luminance correction) Higher values to decrease luminance average, lower values to increase luminance.
|
||||
#define WhitePoint 1.02 //[0.10 to 2.00] Whitepoint avg (lum correction) Use to alter the scene whitepoint average. Raising can give a cinema look.
|
||||
|
||||
//-#[CONTRAST OPTIONS]
|
||||
#define CurveType 0 //[0|1|2] Choose what to apply contrast to. 0 = Luma, 1 = Chroma, 2 = both Luma and Chroma. Default is 0 (Luma)
|
||||
#define CurvesContrast 0.50 //[0.00 to 2.00] The amount of contrast you want. Controls the overall strength of the texture sharpening.
|
||||
//##[CORRECTION OPTIONS]##
|
||||
#define CorrectionPalette 1 //[0|1|2|3] The colour correction palette type. 1: RGB, 2: YUV, 3: XYZ, 0: off. 1 is default. This requires tone mapping enabled.
|
||||
#define RedCurve 1.00 //[1.00 to 8.00] Red channel component of the RGB correction curve. Higher values equals red reduction. 1.00 is default.
|
||||
#define GreenCurve 1.00 //[1.00 to 8.00] Green channel component of the RGB correction curve. Higher values equals green reduction. 1.00 is default.
|
||||
#define BlueCurve 1.00 //[1.00 to 8.00] Blue channel component of the RGB correction curve. Higher values equals blue reduction. 1.00 is default.
|
||||
|
||||
//-#[SHARPEN OPTIONS]
|
||||
#define SharpeningType 2 //[1 or 2] The type of sharpening to use. Type 1 is the original High Pass Gaussian, and type 2 is a new Bicubic Sampling type.
|
||||
#define SharpenStrength 0.75 //[0.10 to 2.00] Strength of the texture sharpening effect. This is the maximum strength that will be used. The clamp below limits the minimum, and maximum that is allowed per pixel.
|
||||
//##[FILMIC OPTIONS]##
|
||||
#define FilmicProcess 0 //[0 or 1] Filmic cross processing. Alters the mood of the scene, for more of a filmic look. Typically best suited to realistic style games.
|
||||
#define RedShift 0.60 //[0.10 to 1.00] Red colour component shift of the filmic tone shift. Alters the red balance of the shift. Requires FilmicProcess.
|
||||
#define GreenShift 0.50 //[0.10 to 1.00] Green colour component shift of the filmic tone shift. Alters the green balance of the shift. Requires FilmicProcess.
|
||||
#define BlueShift 0.50 //[0.10 to 1.00] Blue colour component shift of the filmic tone shift. Alters the blue balance of the shift. Requires FilmicProcess.
|
||||
#define ShiftRatio 0.25 //[0.10 to 1.00] The blending ratio for the base colour and the colour shift. Higher for a stronger effect. Requires FilmicProcess.
|
||||
|
||||
//##[SHARPEN OPTIONS]##
|
||||
#define SharpeningType 2 //[1 or 2] The type of sharpening to use. Type 1 is a High Pass Gaussian. Type 2 is a higher quality(slightly slower) Bicubic Sampling type.
|
||||
#define SharpenStrength 0.75 //[0.10 to 1.00] Strength of the texture luma sharpening effect. This is the maximum strength that will be used.
|
||||
#define SharpenClamp 0.015 //[0.005 to 0.500] Reduces the clamping/limiting on the maximum amount of sharpening each pixel recieves. Raise this to reduce the clamping.
|
||||
#define SharpenBias 1.50 //[1.00 to 4.00] Sharpening edge bias. Lower values for clean subtle sharpen, and higher values for a deeper textured sharpen. For SharpeningType 2, best stay under ~2.00, or it may look odd.
|
||||
#define DebugSharpen 0 //[0 or 1] Visualize the sharpening effect. Useful for fine-tuning.
|
||||
#define SharpenBias 1.00 //[1.00 to 4.00] Sharpening edge bias. Lower values for clean subtle sharpen, and higher values for a deeper textured sharpen.
|
||||
#define DebugSharpen 0 //[0 or 1] Visualize the sharpening effect. Useful for fine-tuning. Best to disable other effects, to see edge detection clearly.
|
||||
|
||||
//-#[VIBRANCE OPTIONS]
|
||||
#define Vibrance 0.10 //[-1.00 to 1.00] Intelligently saturates (or desaturates with negative values) pixels depending on their original saturation. 0.00 is original vibrance.
|
||||
//##[GRADING OPTIONS]##
|
||||
#define RedGrading 1.00 //[0.0 to 3.0] Red colour grading coefficient. Adjust to influence the red channel coefficients of the grading, and highlight tones.
|
||||
#define GreenGrading 1.00 //[0.0 to 3.0] Green colour grading coefficient. Adjust to influence the Green channel coefficients of the grading, and highlight tones.
|
||||
#define BlueGrading 1.00 //[0.0 to 3.0] Blue colour grading coefficient. Adjust to influence the Blue channel coefficients of the grading, and highlight tones.
|
||||
#define GradingStrength 0.25 //[0.00 to 1.00] The overall max strength of the colour grading effect. Raise to increase, lower to decrease the amount.
|
||||
#define Correlation 1.00 //[0.10 to 1.00] Correlation between the base colour, and the grading influence. Lower = more of the scene is graded, Higher = less of the scene is graded.
|
||||
|
||||
//-#[GAMMA OPTIONS]
|
||||
#define Gamma 2.2 //Lower values for more Gamma toning(darker), higher Values for brighter (2.2 correction is generally recommended)
|
||||
|
||||
//-#[GRADING OPTIONS]
|
||||
#define RedGrading 1.02 //[0.0 to 3.0] Red colour grading coefficient. Adjust to influence the red channel coefficients of the grading, and highlight tones.
|
||||
#define GreenGrading 0.96 //[0.0 to 3.0] Green colour grading coefficient. Adjust to influence the Green channel coefficients of the grading, and highlight tones.
|
||||
#define BlueGrading 0.88 //[0.0 to 3.0] Blue colour grading coefficient. Adjust to influence the Blue channel coefficients of the grading, and highlight tones.
|
||||
#define GradingStrength 0.40 //[0.00 to 1.00] The overall max strength of the colour grading effect. Raise to increase, lower to decrease the amount.
|
||||
#define Correlation 0.50 //[0.10 to 1.00] Correlation between the base colour, and the grading influence. Lower = more of the scene is graded, Higher = less of the scene is graded.
|
||||
|
||||
//-#[TOON OPTIONS]
|
||||
#define EdgeStrength 1.40 //[0.00 to 4.00] Strength of the cel edge outline effect. 0.00 = no outlines.
|
||||
#define EdgeFilter 0.60 //[0.10 to 2.00] Raise this to filter out fainter cel edges. You might need to increase the power to compensate, when raising this.
|
||||
#define EdgeThickness 1.25 //[0.50 to 4.00] Thickness of the cel edges. Decrease for thinner outlining, Increase for thicker outlining. 1.00 is default.
|
||||
#define PaletteType 2 //[1|2|3] The colour palette to use. 1 is Original, 2 is Animated Shading, 3 is Water Painting (Default is 2: Animated Shading). Below options don't affect palette 1.
|
||||
#define UseYuvLuma 0 //[0 or 1] Uses YUV luma calculations, or base colour luma calculations. 0 is base luma, 1 is Yuv luma. Color luma can be more accurate. Yuv luma can be better for a shaded look.
|
||||
//##[CSHADE OPTIONS]##
|
||||
#define EdgeStrength 1.50 //[0.00 to 4.00] Overall strength of the cel edge outline effect. 0.00 = no outlines.
|
||||
#define EdgeFilter 0.60 //[0.10 to 2.00] Filters out fainter cel edges. Use it for balancing the cel edge density. EG: for faces, foliage, etc. Raise to filter out more edges.
|
||||
#define EdgeThickness 1.25 //[0.50 to 4.00] Thickness of the cel edges. Increase for thicker outlining. Note: when downsampling, you may need to raise this further to keep the edges as noticeable.
|
||||
#define PaletteType 2 //[1|2|3] The colour palette to use. 1 is Game Original, 2 is Animated Shading, 3 is Water Painting (Default is 2: Animated Shading). #!Options below don't affect palette 1.
|
||||
#define UseYuvLuma 0 //[0 or 1] Uses YUV luma calculations, or base colour luma calculations. Yuv luma can produce a better shaded look, but if it looks odd, disable it for that game.
|
||||
#define LumaConversion 1 //[0 or 1] Uses BT.601, or BT.709, RGB<-YUV->RGB conversions. Some games prefer 601, but most prefer 709. BT.709 is typically recommended.
|
||||
#define ColorRounding 0 //[0 or 1] Uses rounding methods on colors. This can emphasise shaded toon colors. Looks good in some games, and odd in others. Try it in-game and see.
|
||||
#define ColorRounding 1 //[0 or 1] Uses rounding methods on colors. This can emphasise shaded toon colors. Looks good in some games, and odd in others. Try it in-game and see.
|
||||
|
||||
//-#[SCANLINE OPTIONS]
|
||||
#define ScanlineType 0 //[0|1|2|3] The type & orientation of the scanlines. 0 is x(horizontal), 1 is y(vertical), 2 is both(xy), ScanlineType 3 is a different algorithm, to work around PCSX2's IR scaling.
|
||||
#define ScanlineScale 0.50 //[0.20 to 2.00] The scaling & thickness of the scanlines. Changing this can help with PCSX2 IR scaling problems. Defaults: 0.50 for ScanlineType 0|1|2, (1.20 for ScanlineType 3, use 1.0 with low IR (lower than 3x)).
|
||||
#define ScanlineIntensity 0.18 //[0.10 to 1.00] The intensity of the scanlines. Defaults: 0.20 for ScanlineType 0|1|2, 0.50 for ScanlineType 3.
|
||||
#define ScanlineBrightness 2.00 //[0.50 to 2.00] The brightness of the scanlines. Defaults: 1.75 for ScanlineType 0|1|2, 1.50 for ScanlineType 3.
|
||||
//##[SCANLINE OPTIONS]##
|
||||
#define ScanlineType 0 //[0|1|2|3] The type & orientation of the scanlines. 0 is x(horizontal), 1 is y(vertical), 2 is both(xy), ScanlineType 3 is an attempt to work around PCSX2's scaling.
|
||||
#define ScanlineScale 0.50 //[0.20 to 2.00] The scaling & thickness of the scanlines. Changing this can help with PCSX2 IR scaling problems. (Type 0 & native res is recommended)
|
||||
#define ScanlineIntensity 0.18 //[0.10 to 1.00] The intensity of the scanlines. Defaults: 0.18 for ScanlineType 0|1|2, 0.50 for ScanlineType 3.
|
||||
#define ScanlineBrightness 2.00 //[0.50 to 2.00] The brightness of the scanlines. Defaults: 2.00 for ScanlineType 0|1|2, 1.50 for ScanlineType 3.
|
||||
|
||||
//-#[VIGNETTE OPTIONS]
|
||||
//##[VIGNETTE OPTIONS]##
|
||||
#define VignetteRatio 1.77 //[0.15 to 6.00] Sets the espect ratio of the vignette. 1.77 for 16:9, 1.60 for 16:10, 1.33 for 4:3, 1.00 for 1:1.
|
||||
#define VignetteRadius 1.00 //[0.50 to 3.00] Radius of the vignette effect. Lower values for stronger radial effect from center
|
||||
#define VignetteRadius 1.10 //[0.50 to 3.00] Radius of the vignette effect. Lower values for stronger radial effect from center
|
||||
#define VignetteAmount 0.25 //[0.00 to 1.00] Strength of black edge occlusion. Increase for higher strength, decrease for lower.
|
||||
#define VignetteSlope 12 //[2|4|8|10|12|16] How far away from the center the vignetting will start.
|
||||
|
||||
//-#[DITHERING OPTIONS]
|
||||
//##[CONTRAST OPTIONS]##
|
||||
#define CurveType 0 //[0|1|2] Choose what to apply contrast to. 0 = Luma, 1 = Chroma, 2 = both Luma and Chroma. Default is 0 (Luma)
|
||||
#define CurvesContrast 0.35 //[0.00 to 2.00] The amount of contrast you want. Controls the overall strength of the texture sharpening.
|
||||
|
||||
//##[VIBRANCE OPTIONS]##
|
||||
#define Vibrance 0.20 //[-1.00 to 1.00] Adjust the vibrance of pixels depending on their original saturation. 0.00 is original vibrance.
|
||||
|
||||
//##[GAMMA OPTIONS]##
|
||||
#define Gamma 2.20 //[1.5 to 4.0] Gamma correction. Decrease for lower gamma(darker). Increase for higher gamma(brighter). (Default: 2.2)
|
||||
|
||||
//##[DITHERING OPTIONS]##
|
||||
#define DitherMethod 2 //[1 or 2] 1 is Ordering dithering(faster, lower quality), 2 is Random dithering (better dithering, but not as fast)
|
||||
|
||||
//-[END OF USER OPTIONS]
|
||||
//##[BORDER OPTIONS]##
|
||||
#define BorderWidth float2(2, 2) //[0 to 2048, 0 to 2048] (X,Y)-width of the border. Measured in pixels.
|
||||
#define BorderColor 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.
|
||||
|
||||
//[END OF USER OPTIONS]
|
||||
|
|
2149
bin/shader.fx
2149
bin/shader.fx
File diff suppressed because it is too large
Load Diff
|
@ -49,6 +49,7 @@ public:
|
|||
class ExternalFXConstantBuffer
|
||||
{
|
||||
public:
|
||||
GSVector2 xyFrame;
|
||||
GSVector4 rcpFrame;
|
||||
GSVector4 rcpFrameOpt;
|
||||
|
||||
|
|
|
@ -762,6 +762,7 @@ void GSDevice11::DoExternalFX(GSTexture* st, GSTexture* dt)
|
|||
|
||||
InitExternalFX();
|
||||
|
||||
cb.xyFrame = GSVector2(s.x, s.y);
|
||||
cb.rcpFrame = GSVector4(1.0f / s.x, 1.0f / s.y, 0.0f, 0.0f);
|
||||
cb.rcpFrameOpt = GSVector4::zero();
|
||||
|
||||
|
|
|
@ -950,6 +950,7 @@ void GSDevice9::DoExternalFX(GSTexture* st, GSTexture* dt)
|
|||
|
||||
InitExternalFX();
|
||||
|
||||
cb.xyFrame = GSVector2(s.x, s.y);
|
||||
cb.rcpFrame = GSVector4(1.0f / s.x, 1.0f / s.y, 0.0f, 0.0f);
|
||||
cb.rcpFrameOpt = GSVector4::zero();
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@ sampler2D TextureSampler : register(s0);
|
|||
|
||||
cbuffer cb0
|
||||
{
|
||||
float4 _rcpFrame : VIEWPORT : register(c0);
|
||||
static const float GammaConst = 2.2;
|
||||
float4 _rcpFrame : register(c0);
|
||||
};
|
||||
|
||||
struct VS_INPUT
|
||||
|
@ -54,46 +53,38 @@ float RGBLuminance(float3 color)
|
|||
return dot(color.rgb, lumCoeff);
|
||||
}
|
||||
|
||||
#define PixelSize float2(_rcpFrame.x, _rcpFrame.y)
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
[GAMMA PREPASS CODE SECTION]
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
float3 RGBGammaToLinear(float3 color, float gamma)
|
||||
{
|
||||
color = abs(color);
|
||||
|
||||
color.r = (color.r <= 0.0404482362771082) ? saturate(color.r / 12.92) :
|
||||
saturate(pow((color.r + 0.055) / 1.055, gamma));
|
||||
|
||||
color.g = (color.g <= 0.0404482362771082) ? saturate(color.g / 12.92) :
|
||||
saturate(pow((color.g + 0.055) / 1.055, gamma));
|
||||
|
||||
color.b = (color.b <= 0.0404482362771082) ? saturate(color.b / 12.92) :
|
||||
saturate(pow((color.b + 0.055) / 1.055, gamma));
|
||||
color = saturate(color);
|
||||
color.r = (color.r <= 0.0404482362771082) ?
|
||||
color.r / 12.92 : pow((color.r + 0.055) / 1.055, gamma);
|
||||
color.g = (color.g <= 0.0404482362771082) ?
|
||||
color.g / 12.92 : pow((color.g + 0.055) / 1.055, gamma);
|
||||
color.b = (color.b <= 0.0404482362771082) ?
|
||||
color.b / 12.92 : pow((color.b + 0.055) / 1.055, gamma);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
float3 LinearToRGBGamma(float3 color, float gamma)
|
||||
{
|
||||
color = abs(color);
|
||||
|
||||
color.r = (color.r <= 0.00313066844250063) ? saturate(color.r * 12.92) : 1.055 *
|
||||
saturate(pow(color.r, 1.0 / gamma)) - 0.055;
|
||||
|
||||
color.g = (color.g <= 0.00313066844250063) ? saturate(color.g * 12.92) : 1.055 *
|
||||
saturate(pow(color.g, 1.0 / gamma)) - 0.055;
|
||||
|
||||
color.b = (color.b <= 0.00313066844250063) ? saturate(color.b * 12.92) : 1.055 *
|
||||
saturate(pow(color.b, 1.0 / gamma)) - 0.055;
|
||||
color = saturate(color);
|
||||
color.r = (color.r <= 0.00313066844250063) ?
|
||||
color.r * 12.92 : 1.055 * pow(color.r, 1.0 / gamma) - 0.055;
|
||||
color.g = (color.g <= 0.00313066844250063) ?
|
||||
color.g * 12.92 : 1.055 * pow(color.g, 1.0 / gamma) - 0.055;
|
||||
color.b = (color.b <= 0.00313066844250063) ?
|
||||
color.b * 12.92 : 1.055 * pow(color.b, 1.0 / gamma) - 0.055;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
#define PixelSize float2(_rcpFrame.x, _rcpFrame.y)
|
||||
#define GammaCorrection(color, gamma) pow(color, gamma)
|
||||
#define InverseGammaCorrection(color, gamma) pow(color, 1.0/gamma)
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
[GAMMA PREPASS CODE SECTION]
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
float4 PreGammaPass(float4 color, float2 uv0)
|
||||
{
|
||||
#if (SHADER_MODEL >= 0x400)
|
||||
|
@ -102,6 +93,7 @@ float4 PreGammaPass(float4 color, float2 uv0)
|
|||
color = tex2D(TextureSampler, uv0);
|
||||
#endif
|
||||
|
||||
const float GammaConst = 2.233;
|
||||
color.rgb = RGBGammaToLinear(color.rgb, GammaConst);
|
||||
color.rgb = LinearToRGBGamma(color.rgb, GammaConst);
|
||||
color.a = RGBLuminance(color.rgb);
|
||||
|
|
Loading…
Reference in New Issue