From a1db78f1ef02da178dda5014560bef22704fdeb8 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 7 Nov 2018 17:30:40 -0800 Subject: [PATCH] push skalfates changes --- .../37040a485a29d54e_00000000000003c9_ps.txt | 2878 ++++++++--------- .../how_to_make_your_own_preset.txt | 104 +- .../BreathOfTheWild_Clarity/rules.txt | 100 +- .../BreathOfTheWild_LODBias/rules.txt | 40 + .../FatalFrameProjectZero_FilmGrain/rules.txt | 50 + .../FatalFrameProjectZero_LODBias/rules.txt | 38 + Source/BreathOfTheWild_Resolution/rules.txt | 80 +- .../patches.txt | 61 + .../rules.txt | 226 ++ docs/_data/GameTitles.yml | 2 +- 10 files changed, 2032 insertions(+), 1547 deletions(-) create mode 100644 Enhancements/BreathOfTheWild_LODBias/rules.txt create mode 100644 Enhancements/FatalFrameProjectZero_FilmGrain/rules.txt create mode 100644 Enhancements/FatalFrameProjectZero_LODBias/rules.txt create mode 100644 Source/FatalFrameProjectZero_Resolution/patches.txt create mode 100644 Source/FatalFrameProjectZero_Resolution/rules.txt diff --git a/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt b/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt index 9710fb12..0a226e8e 100644 --- a/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt +++ b/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt @@ -1,1439 +1,1439 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -//########################################################## - -// Being below game update version 1.4.0 will give you double-vision with recent graphic packs. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Crementif for additional assistance. -// Credit to all other creators for their time in making alternative presets. - -// Shader dumped from Cemu 1.11.2 from BotW 1.4.0 -// Added Cemu 1.13.x Preset support -// v 2.3 Final - -//########################################################## - -#define Preset $preset - - // User Defined Preset 0 - // Bruz Preset 1 - // BSOD Gaming Preset 2 - // Jamie Preset 3 - // Contrasty Preset 4 - // The Complaining Gamer Preset 5 - // Filmic Preset Preset 6 - // CellHunter Preset 7 - // Serfrost Preset (Bright Display) 8 - // Serfrost Preset (Dim Display) 9 - // Serfrost Preset (Default) 10 - -//########################################################## - -#if (Preset == 0) - -// User Defined, values to change are below. End before main presets. - -//########################################################## - -#define adjust_bloom 1 // 0: disable, 1: enable. - -//BloomFactor -const float bloomFactor = 0.020; // Default is 0.020 (rough estimate based on Switch) - -#define HDRpassing 0 // 0: disable, 1: enable. - -//Fake High Dynamic Range. -const float HDRPower = 1.00; // 0.0 to 8.0 Default 1.30. -const float radius1 = 1.00; // 0.0 to 8.0 Default 0.793 -const float radius2 = 0.80; // 0.0 to 8.0 Default 0.87 "Raising this seems to make the effect stronger and also brighter." - -#define lumapassing 0 // 0: disable, 1: enable. - -//LumaShapening -const float sharp_strength = 0.35; //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -const float sharp_clamp = 0.85; //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 - -//Advanced sharpening settings -const float offset_bias = 1.0; //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -#define Tone_map 0 - - // 0: disable, -1 to 9: enable. - // -1: disable, loss of bright detail/color but keep [0,1] intact - // 0: (Wii U) BotW original - // Reshade ToneMap Option 1 - // linearToneMapping Option 2 - // simpleReinhardToneMapping Option 3 - // lumaBasedReinhardToneMapping Option 4 - // whitePreservingLumaBasedReinhardToneMapping Option 5 - // RomBinDaHouseToneMapping Option 6 - // filmicToneMapping Option 7 - // Uncharted2ToneMapping Option 8 - // ACES Filmic Option 9 - // Reshade ToneMap Controls / "Contrasty" Parameters - -const float Exposure = 1.17; // [0.0, 1.0+] Adjust exposure -const float Bleach = 0.4; // "More bleach means more contrasted and less colorful image" min -0.5 max 1.0 Default 0.0 -const float Gamma = 1.00; // "Adjust midtones. 1.000 is neutral. This setting does exactly the same as the one in Lift Gamma Gain, only with less control." -const float defog = 0.00; // Default is 0.0 //How much of the overall color you want removed form the values of FogColor. -vec3 FogColor = vec3(1.0, 1.0, 1.0); // Color you want to Add or Remove 0.25 would add .25 percent of that color 1.25 would remove .25 percent of the color." -const float sat = 0.000; // "Adjust saturation" min -1.0 max 1.0 Default 0.0 -const float crushContrast = 0.000; // 0.0 is neutral. Use small increments, loss of shadow detail - -#define post_process 0 - -//----------------"BotW original" vibrance adjust-------------// -const float satFactor = 0.25; // 0.18 is neutral. Experimental, adjust native saturation -//------------------------------------------------------------// - -#define blacknwhitepass 0 // 0: disable, 1: enable. -// Levels Control -const int BlackPoint = 16; // [0, 255] The black point is the new black - literally. Everything darker than this will become completely black -const int WhitePoint = 235; // [0, 255] The new white point. Everything brighter than this becomes completely white - -#define lggpass 0 // 0: disable, 1: enable. -//Lift Gamma Gain -vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); // [0.000 to 2.000] Adjust shadows for Red, Green and Blue. -vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); // [0.000 to 2.000] Adjust midtones for Red, Green and Blue -vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue - // Note that a value of 1.0 is a neutral setting that leave the color unchanged. - -#define vibpass 0 // 0: disable, 1: enable. -//VibrancePass -const float Vibrance = 0.150; // Default [0.150] "Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation." -vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); // "A per channel multiplier to the Vibrance strength so you can give more boost to certain colors over others."; - -#define Tech 0 // 0: disable, 1: enable. -//Technicolor -const float Power = 4.0; // Min 0.0 Max 8.0 Default 4.0 -vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); -float Strength = 0.20; // Min 0.0 Max 1.0 Default 0.4 - -#define Techine 0 // 0: disable, 1: enable. -//Technicolor2 -const float Technicolor2_Red_Strength = 0.02; // "Higher means darker and more intense colors." Default 0.2 -const float Technicolor2_Green_Strength = 0.02; // "Higher means darker and more intense colors." Default 0.2 -const float Technicolor2_Blue_Strength = 0.02; // "Higher means darker and more intense colors." Default 0.2 -const float Technicolor2_Brightness = 1.00; // "Higher means brighter image." min 0.5 max 1.5 Default 1.0 -const float Technicolor2_Strength = 1.00; // [Default is 1.0] -const float Technicolor2_Saturation = 1.00; // Default is 1.0 min 0.0 max 1.5 "Additional saturation control since this effect tends to oversaturate the image." - -#define cmatrix 0 -//Color Matrix -vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); -vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); -vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); -float CM_Strength = 1.0; - -//Curves Contrast -#define CurvesPss 0 // 0: disable, 1: enable. -const float Contrast = 0.65; // Default 0.65 min -1.0 max = 1.0 "The amount of contrast you want." - -#define Filmicpass 0 // 0: disable, 1: enable. -//Filmic Pass -const float Filmic_Contrast = 1.0; // Default 1.0 min 0.5 max 2.0 -const float Filmic_Bleach = 0.0; // "More bleach means more contrasted and less colorful image" min -0.5 max 1.0 Default 0.0 -const float Saturation = -0.15; // min -1.0 max 1.0 Default -0.15 - -const float Filmic_Strength = 0.85; // "Strength of the color curve altering"; min 0.0 max 1.5 Default 0.85 -const float Fade = 0.4; // "Decreases contrast to imitate faded image" min 0.0 max 0.6 Default 0.4 -const float Linearization = 0.5; // min 0.5 max 2.0 Default 0.5 - -const float BaseCurve = 1.5; // min 0.0 max 2.0 Default 1.5 -const float BaseGamma = 1.00; // min 0.7 max 2.0 Default 1.0 -const float EffectGamma = 0.68; // min 0.0 max 2.0 Default 0.68 - -#define dpxpass 0 -//DPX -vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); -vec3 RGB_C = vec3(0.36, 0.36, 0.34); - -float DPX_Contrast = 0.1; -float DPX_Saturation = 3.0; -float Colorfulness = 2.5; - -float DPX_Strength = 0.20; - -//########################################################### - -//Do not edit under this line, unless explicitly desired. Keep backups! - -//########################################################### - -//Presets - -#elif (Preset == 1) //Bruz - - #define adjust_bloom 1 - const float bloomFactor = 0.30; - #define HDRpassing 0 - float HDRPower = 1.00; - float radius1 = 1.00; - float radius2 = 0.80; - #define lumapassing 0 - float sharp_strength = 0.45; - float sharp_clamp = 0.085; - float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.17; - const float Bleach = 0.4; - const float Gamma = 1.00; - const float defog = 0.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.000; - const float crushContrast = 0.000; - #define post_process 1 - const float satFactor = 0.25; - #define blacknwhitepass 1 - const int BlackPoint = 1; - const int WhitePoint = 220; - #define lggpass 1 - vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); - vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); - vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); - #define vibpass 0 - const float Vibrance = 0.150; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 1 - const float Power = 8.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.3; - #define Techine 1 - float Technicolor2_Red_Strength = -0.05; - float Technicolor2_Green_Strength = -0.1; - float Technicolor2_Blue_Strength = 0.07; - float Technicolor2_Brightness = 0.0; - float Technicolor2_Strength = 2.0; - float Technicolor2_Saturation = 1.3; //1.13 to completely fix lava - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 0 - const float Contrast = 0.65; - #define Filmicpass 1 - const float Filmic_Strength = 0.60; - const float Filmic_Contrast = 1.03; - const float Fade = 0.0; - const float Linearization = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.3; - const float BaseCurve = 1.5; - const float BaseGamma = 1.0; - const float EffectGamma = 0.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 2.5; - float DPX_Strength = 0.20; - -#elif (Preset == 2) //BSoD Gaming - - #define adjust_bloom 1 - const float bloomFactor = 0.010; - #define HDRpassing 1 - const float HDRPower = 1.085; - const float radius1 = 0.793; - const float radius2 = 0.87; - #define lumapassing 1 - const float sharp_strength = 0.25; - const float sharp_clamp = 0.085; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 0.6; - const float Bleach = 0.3; - const float Gamma = 1.00; - const float defog = 0.004; - vec3 FogColor = vec3(1.0, 1.5, 1.7); - const float sat = 0.050; - const float crushContrast = 0.000; - #define post_process 0 - const float satFactor = 0.25; - #define blacknwhitepass 0 - const int BlackPoint = 8; - const int WhitePoint = 235; - #define lggpass 1 - vec3 RGB_Lift = vec3(0.994, 0.994, 0.994); - vec3 RGB_Gamma = vec3(1.0, 0.990, 1.0); - vec3 RGB_Gain = vec3(1.0, 0.990, 1.00); - #define vibpass 1 - const float Vibrance = 0.113; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 0 - const float Power = 4.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.20; - #define Techine 0 - const float Technicolor2_Red_Strength = 0.000; - const float Technicolor2_Green_Strength = 0.000; - const float Technicolor2_Blue_Strength = 0.000; - const float Technicolor2_Brightness = 1.0; - const float Technicolor2_Strength = 0.40; - const float Technicolor2_Saturation = 0.70; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 0 - const float Contrast = 0.65; - #define Filmicpass 1 - const float Filmic_Contrast = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.15; - const float Filmic_Strength = 0.85; - const float Fade = 0.4; - const float Linearization = 0.5; - const float BaseCurve = 1.5; - const float BaseGamma = 0.7; - const float EffectGamma = 0.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 2.5; - float DPX_Strength = 0.20; - -#elif (Preset == 3) //Jamie - - #define adjust_bloom 1 - const float bloomFactor = 0.020; - #define HDRpassing 1 - const float HDRPower = 1.00; - const float radius1 = 1.00; - const float radius2 = 0.80; - #define lumapassing 1 - const float sharp_strength = 0.35; - const float sharp_clamp = 0.85; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.17; - const float Bleach = 0.4; - const float Gamma = 1.00; - const float defog = 0.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.000; - const float crushContrast = 0.000; - #define post_process 1 - const float satFactor = 0.25; - #define blacknwhitepass 0 - const int BlackPoint = 16; - const int WhitePoint = 235; - #define lggpass 1 - vec3 RGB_Lift = vec3(0.980, 0.980, 0.980); - vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); - vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); - #define vibpass 0 - const float Vibrance = 0.150; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 0 - const float Power = 4.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.20; - #define Techine 0 - const float Technicolor2_Red_Strength = 0.02; - const float Technicolor2_Green_Strength = 0.02; - const float Technicolor2_Blue_Strength = 0.02; - const float Technicolor2_Brightness = 1.00; - const float Technicolor2_Strength = 1.00; - const float Technicolor2_Saturation = 1.00; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 0 - const float Contrast = 0.65; - #define Filmicpass 0 - const float Filmic_Contrast = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.15; - const float Filmic_Strength = 0.85; - const float Fade = 0.4; - const float Linearization = 0.5; - const float BaseCurve = 1.5; - const float BaseGamma = 1.00; - const float EffectGamma = 0.68; - #define dpxpass 1 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 0.0; - float Colorfulness = 1.0; - float DPX_Strength = 0.20; - -#elif (Preset == 4) //Contrasty - - #define adjust_bloom 1 - const float bloomFactor = 0.020; - #define HDRpassing 0 - const float HDRPower = 1.00; - const float radius1 = 1.00; - const float radius2 = 0.80; - #define lumapassing 0 - const float sharp_strength = 0.35; - const float sharp_clamp = 0.85; - const float offset_bias = 1.0; - #define Tone_map 1 - const float Exposure = 1.17; - const float Bleach = 0.3; - const float Gamma = 0.810; - const float defog = 0.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.000; - const float crushContrast = 0.000; - #define post_process 1 - const float satFactor = 0.25; - #define blacknwhitepass 0 - const int BlackPoint = 16; - const int WhitePoint = 235; - #define lggpass 0 - vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); - vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); - vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); - #define vibpass 0 - const float Vibrance = 0.150; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 0 - const float Power = 4.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.20; - #define Techine 0 - const float Technicolor2_Red_Strength = 0.02; - const float Technicolor2_Green_Strength = 0.02; - const float Technicolor2_Blue_Strength = 0.02; - const float Technicolor2_Brightness = 1.00; - const float Technicolor2_Strength = 1.00; - const float Technicolor2_Saturation = 1.00; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 1 - const float Contrast = 0.65; - #define Filmicpass 0 - const float Filmic_Contrast = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.15; - const float Filmic_Strength = 0.85; - const float Fade = 0.4; - const float Linearization = 0.5; - const float BaseCurve = 1.5; - const float BaseGamma = 1.00; - const float EffectGamma = 0.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 2.5; - float DPX_Strength = 0.20; - -#elif (Preset == 5) //The Complaining Gamer - - #define adjust_bloom 1 - const float bloomFactor = 0.33; - #define HDRpassing 1 - const float HDRPower = 1.020; - const float radius1 = 0.793; - const float radius2 = 0.87; - #define lumapassing 1 - const float sharp_strength = 0.25; - const float sharp_clamp = 0.85; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.17; - const float Bleach = 0.4; - const float Gamma = 1.00; - const float defog = 0.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.000; - const float crushContrast = 0.000; - #define post_process 0 - const float satFactor = 0.25; - #define blacknwhitepass 0 - const int BlackPoint = 16; - const int WhitePoint = 235; - #define lggpass 1 - vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); - vec3 RGB_Gamma = vec3(0.600, 0.600, 0.600); - vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); - #define vibpass 1 - const float Vibrance = 0.150; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 0 - const float Power = 4.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.20; - #define Techine 1 - const float Technicolor2_Red_Strength = 0.000; - const float Technicolor2_Green_Strength = 0.000; - const float Technicolor2_Blue_Strength = 0.000; - const float Technicolor2_Brightness = 1.0; - const float Technicolor2_Strength = 0.40; - const float Technicolor2_Saturation = 0.51; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 1 - const float Contrast = 0.65; - #define Filmicpass 0 - const float Filmic_Contrast = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.15; - const float Filmic_Strength = 0.85; - const float Fade = 0.4; - const float Linearization = 0.5; - const float BaseCurve = 1.5; - const float BaseGamma = 1.00; - const float EffectGamma = 0.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 2.5; - float DPX_Strength = 0.20; - -#elif (Preset == 6) //Filmic - - #define adjust_bloom 1 - const float bloomFactor = 0.020; - #define HDRpassing 1 - const float HDRPower = 1.20; - const float radius1 = 1.00; - const float radius2 = 0.80; - #define lumapassing 1 - const float sharp_strength = 0.35; - const float sharp_clamp = 0.85; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.17; - const float Bleach = 0.4; - const float Gamma = 1.00; - const float defog = 0.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.000; - const float crushContrast = 0.000; - #define post_process 1 - const float satFactor = 0.25; - #define blacknwhitepass 0 - const int BlackPoint = 16; - const int WhitePoint = 235; - #define lggpass 0 - vec3 RGB_Lift = vec3(0.990, 0.990, 0.990); - vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); - vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); - #define vibpass 1 - const float Vibrance = 0.150; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 0 - const float Power = 4.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.20; - #define Techine 0 - const float Technicolor2_Red_Strength = 0.02; - const float Technicolor2_Green_Strength = 0.02; - const float Technicolor2_Blue_Strength = 0.02; - const float Technicolor2_Brightness = 1.00; - const float Technicolor2_Strength = 1.00; - const float Technicolor2_Saturation = 1.00; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 1 - const float Contrast = 0.65; - #define Filmicpass 1 - const float Filmic_Contrast = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.15; - const float Filmic_Strength = 0.85; - const float Fade = 0.4; - const float Linearization = 0.5; - const float BaseCurve = 1.5; - const float BaseGamma = 1.00; - const float EffectGamma = 0.68; - #define dpxpass 1 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 2.0; - float Colorfulness = 1.5; - float DPX_Strength = 0.20; - -#elif (Preset == 7) //CellHunter - - #define adjust_bloom 1 - const float bloomFactor = 0.455; - #define HDRpassing 1 - const float HDRPower = 1.000; - const float radius1 = 1.100; - const float radius2 = 1.235; - #define lumapassing 1 - const float sharp_strength = 0.65; - const float sharp_clamp = 0.45; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.17; - const float Bleach = 0.0; - const float Gamma = 1.00; - const float defog = 0.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.000; - const float crushContrast = 0.000; - #define post_process 0 - const float satFactor = 0.25; - #define blacknwhitepass 0 - const int BlackPoint = 16; - const int WhitePoint = 215; - #define lggpass 1 - vec3 RGB_Lift = vec3(0.980, 0.970, 1.000); - vec3 RGB_Gamma = vec3(0.970, 0.965, 1.010); - vec3 RGB_Gain = vec3(0.980, 0.970, 1.005); - #define vibpass 1 - const float Vibrance = 0.385; - vec3 VibranceRGBBalance = vec3(1.10, 1.05, 1.15); - #define Tech 1 - const float Power = 5.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.10; - #define Techine 0 - const float Technicolor2_Red_Strength = 0.02; - const float Technicolor2_Green_Strength = 0.02; - const float Technicolor2_Blue_Strength = 0.02; - const float Technicolor2_Brightness = 1.00; - const float Technicolor2_Strength = 1.00; - const float Technicolor2_Saturation = 1.00; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 1 - const float Contrast = 0.165; - #define Filmicpass 0 - const float Filmic_Contrast = 0.97; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.15; - const float Filmic_Strength = 0.65; - const float Fade = 0.2; - const float Linearization = 0.7; - const float BaseCurve = 1.5; - const float BaseGamma = 0.90; - const float EffectGamma = 0.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 2.5; - float DPX_Strength = 0.20; - -#elif (Preset == 8) //Serfrost (Bright Display) - - #define adjust_bloom 1 - const float bloomFactor = 0.40; - #define HDRpassing 1 - const float HDRPower = 1.20; - const float radius1 = 0.793; - const float radius2 = 0.87; - #define lumapassing 0 - const float sharp_strength = 0.45; - const float sharp_clamp = 0.85; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.17; - const float Bleach = 0.0; - const float Gamma = 0.98; - const float defog = 1.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.00; - const float crushContrast = 0.00; - #define post_process 0 - const float satFactor = 0.07; - #define blacknwhitepass 1 - const int BlackPoint = 2; - const int WhitePoint = 300; - #define lggpass 1 - vec3 RGB_Lift = vec3(1.027, 1.027, 1.027); - vec3 RGB_Gamma = vec3(0.83, 0.83, 0.83); - vec3 RGB_Gain = vec3(1.10, 1.10, 1.10); - #define vibpass 1 - const float Vibrance = 0.15; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 0 - const float Power = 5.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.10; - #define Techine 1 - float Technicolor2_Red_Strength = -0.09; - float Technicolor2_Green_Strength = -0.09; - float Technicolor2_Blue_Strength = -0.00; - float Technicolor2_Brightness = 0.4; - float Technicolor2_Strength = 1.2; - float Technicolor2_Saturation = 1.1; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 0 - const float Contrast = 0.0; - #define Filmicpass 1 - const float Filmic_Contrast = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.17; - const float Filmic_Strength = 0.48; - const float Fade = 0.08; - const float Linearization = 1.0; - const float BaseCurve = 1.0; - const float BaseGamma = 1.0; - const float EffectGamma = 1.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 1.0; - float DPX_Strength = 0.20; - -#elif (Preset == 9) //Serfrost (Dim Display) - - #define adjust_bloom 1 - const float bloomFactor = 0.7; - #define HDRpassing 1 - const float HDRPower = 1.20; - const float radius1 = 0.793; - const float radius2 = 0.87; - #define lumapassing 0 - const float sharp_strength = 0.45; - const float sharp_clamp = 0.85; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.17; - const float Bleach = 0.0; - const float Gamma = 1.05; - const float defog = 1.00; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.0; - const float crushContrast = 0.00; - #define post_process 0 - const float satFactor = 0.07; - #define blacknwhitepass 1 - const int BlackPoint = 1; - const int WhitePoint = 235; - #define lggpass 1 - vec3 RGB_Lift = vec3(1.027, 1.027, 1.027); - vec3 RGB_Gamma = vec3(0.83, 0.83, 0.83); - vec3 RGB_Gain = vec3(1.10, 1.10, 1.10); - #define vibpass 1 - const float Vibrance = 0.45; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); - #define Tech 0 - const float Power = 5.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.10; - #define Techine 1 - float Technicolor2_Red_Strength = -0.09; - float Technicolor2_Green_Strength = -0.09; - float Technicolor2_Blue_Strength = -0.00; - float Technicolor2_Brightness = 0.4; - float Technicolor2_Strength = 1.2; - float Technicolor2_Saturation = 1.15; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 0 - const float Contrast = 0.0; - #define Filmicpass 1 - const float Filmic_Contrast = 1.0; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.17; - const float Filmic_Strength = 0.48; - const float Fade = 0.08; - const float Linearization = 1.0; - const float BaseCurve = 1.0; - const float BaseGamma = 1.0; - const float EffectGamma = 1.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 1.0; - float DPX_Strength = 0.20; - -#elif (Preset == 10) //Serfrost (Other) - - #define adjust_bloom 1 - const float bloomFactor = 0.3; - #define HDRpassing 1 - const float HDRPower = 1.15; - const float radius1 = 0.793; - const float radius2 = 0.87; - #define lumapassing 1 - const float sharp_strength = 0.45; - const float sharp_clamp = 0.085; - const float offset_bias = 1.0; - #define Tone_map 8 - const float Exposure = 1.10; - const float Bleach = 0.1; - const float Gamma = 1.0; - const float defog = 0.0; - vec3 FogColor = vec3(1.0, 1.0, 1.0); - const float sat = 0.0; - const float crushContrast = 0.00; - #define post_process 0 - const float satFactor = 0.07; - #define blacknwhitepass 1 - const int BlackPoint = 5; - const int WhitePoint = 210; - #define lggpass 1 - vec3 RGB_Lift = vec3(1.027, 1.027, 1.027); - vec3 RGB_Gamma = vec3(0.83, 0.83, 0.83); - vec3 RGB_Gain = vec3(1.10, 1.10, 1.10); - #define vibpass 1 - const float Vibrance = 0.45; - vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.3); - #define Tech 1 - const float Power = 6.0; - vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); - float Strength = 0.3; - #define Techine 1 - float Technicolor2_Red_Strength = -0.12; - float Technicolor2_Green_Strength = -0.25; - float Technicolor2_Blue_Strength = -0.15; - float Technicolor2_Brightness = 0.4; - float Technicolor2_Strength = 1.0; - float Technicolor2_Saturation = 0.90; - #define cmatrix 0 - vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); - vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); - vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); - float CM_Strength = 1.0; - #define CurvesPss 0 - const float Contrast = 0.5; - #define Filmicpass 1 - const float Filmic_Contrast = 1.03; - const float Filmic_Bleach = 0.0; - const float Saturation = -0.35; - const float Filmic_Strength = 0.60; - const float Fade = 0.1; - const float Linearization = 1.0; - const float BaseCurve = 1.5; - const float BaseGamma = 1.0; - const float EffectGamma = 0.68; - #define dpxpass 0 - vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); - vec3 RGB_C = vec3(0.36, 0.36, 0.34); - float DPX_Contrast = 0.1; - float DPX_Saturation = 3.0; - float Colorfulness = 1.0; - float DPX_Strength = 0.20; - -#endif - -//########################################################### - -//Never touch anything below this line unless you plan to break and fix things. - -//########################################################### - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0; // Bloom -layout(binding = 1) uniform sampler2D textureUnitPS1;// HDR LumaShapening. -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; - -//ToneMapping - -vec3 linearToneMapping(vec3 color) -{ - float exposure = 1.; - color = clamp(exposure * color, 0., 1.); - color = pow(color, vec3(1. / Gamma)); - return color; -} - -vec3 simpleReinhardToneMapping(vec3 color) -{ - float exposure = 1.5; - color *= exposure / (1. + color / exposure); - color = pow(color, vec3(1. / Gamma)); - return color; -} - -vec3 lumaBasedReinhardToneMapping(vec3 color) -{ - float luma = dot(color, vec3(0.2126, 0.7152, 0.0722)); - float toneMappedLuma = luma / (1. + luma); - color *= toneMappedLuma / luma; - color = pow(color, vec3(1. / Gamma)); - return color; -} - -vec3 whitePreservingLumaBasedReinhardToneMapping(vec3 color) -{ - float white = 2.; - float luma = dot(color, vec3(0.2126, 0.7152, 0.0722)); - float toneMappedLuma = luma * (1. + luma / (white*white)) / (1. + luma); - color *= toneMappedLuma / luma; - color = pow(color, vec3(1. / Gamma)); - return color; -} - -vec3 RomBinDaHouseToneMapping(vec3 color) -{ - color = exp(-1.0 / (2.72*color + 0.15)); - color = pow(color, vec3(1. / Gamma)); - return color; -} - -vec3 filmicToneMapping(vec3 color) -{ - color = max(vec3(0.), color - vec3(0.004)); - color = (color * (6.2 * color + .5)) / (color * (6.2 * color + 1.7) + 0.06); - return color; -} - -vec3 Uncharted2ToneMapping(vec3 color) -{ - float A = 0.15; - float B = 0.50; - float C = 0.10; - float D = 0.20; - float E = 0.02; - float F = 0.30; - float W = 11.2; - float exposure = 2.; - color *= exposure; - color = ((color * (A * color + C * B) + D * E) / (color * (A * color + B) + D * F)) - E / F; - float white = ((W * (A * W + C * B) + D * E) / (W * (A * W + B) + D * F)) - E / F; - color /= white; - color = pow(color, vec3(1. / Gamma)); - return color; -} - -vec3 ReshadeToneMap(vec3 inputColor) { - vec3 color = inputColor; - color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= Exposure / (1.0 + color / Exposure); - color = pow(color, vec3(1. / Gamma)); // Gamma - - const vec3 coefLuma = vec3(0.2126, 0.7152, 0.0722); - float lum = dot(coefLuma, color); - - float L = clamp(10.0 * (lum - 0.45), 0.0, 1.0); - vec3 A2 = Bleach * color; - - vec3 result1 = 2.0f * color * lum; - vec3 result2 = 1.0f - 2.0f * (1.0f - lum) * (1.0f - color); - - vec3 newColor = mix(result1, result2, L); - vec3 mixRGB = A2 * newColor; - color += ((1.0f - A2) * mixRGB); - - vec3 middlegray = vec3(dot(color, vec3(1.0 / 3.0))); - vec3 diffcolor = color - middlegray; - - color = (color + diffcolor * sat) / (1 + (diffcolor * sat)); // saturation - - return color; -} - -float getL601(vec3 rgb) { - return dot(rgb, vec3(0.2989, 0.5866, 0.1145)); -} - -float getL709(vec3 rgb) { - return dot(rgb, vec3(0.2126, 0.7152, 0.0722)); -} - -vec3 BotWToneMap(vec3 color) { - float Lumn = getL601(color); - vec4 exptm = 1.0 - exp(-vec4(color, Lumn)); - vec3 cpre = exptm.w / Lumn * color; - vec3 colorldr = mix(cpre, exptm.rgb, vec3(pow(exptm.w, 2.0)));//refine - return colorldr; -} -vec3 ACESFilm(vec3 color) { - color *= Exposure; - float Lumn = getL709(color); - vec4 tm = vec4(color, Lumn); - tm = (tm*(2.51*tm + 0.03)) / (tm*(2.43*tm + 0.59) + 0.14); // tonemap - vec3 cpre = tm.w / Lumn * color; - vec3 colorldr = mix(cpre, tm.rgb, vec3(pow(tm.w, 2.0)));//refine - return colorldr; -} - -//Curves - -vec3 CurvesPass(vec3 inputColor) { - vec3 colorInput = inputColor; - float Contrast_blend = Contrast * 2.0; //I multiply by two to give it a strength closer to the other curves. - vec3 x = colorInput.rgb; //if the curve should be applied to both Luma and Chroma - x = x * (x * (1.5 - x) + 0.5); //horner form - fastest version - vec3 color = x; //if the curve should be applied to both Luma and Chroma - colorInput.rgb = mix(colorInput.rgb, color, Contrast_blend); //Blend by Contrast - return colorInput; -} - -//TECHNICOLOR2 - -vec3 Technicolor2(vec3 inputColor) { - vec3 color = inputColor; - vec3 Color_Strength = vec3(Technicolor2_Red_Strength, Technicolor2_Green_Strength, Technicolor2_Blue_Strength); - vec3 source = color; - vec3 temp = 1.0 - source; - vec3 target = temp.grg; - vec3 target2 = temp.bbr; - vec3 temp2 = source * target; - temp2 *= target2; - - temp = temp2 * Color_Strength; - temp2 *= Technicolor2_Brightness; - - target = temp.grg; - target2 = temp.bbr; - - temp = source - target; - temp += temp2; - temp2 = temp - target2; - - color = mix(source, temp2, Technicolor2_Strength); - - color = mix(vec3(dot(color, vec3(0.333))), color, Technicolor2_Saturation); - - return color; -} - -//Technicolor -vec3 TechnicolorPass(vec3 color) -{ - - const vec3 cyanfilter = vec3(0.0, 1.30, 1.0); - const vec3 magentafilter = vec3(1.0, 0.0, 1.05); - const vec3 yellowfilter = vec3(1.6, 1.6, 0.05); - const vec2 redorangefilter = vec2(1.05, 0.620); // RG_ - const vec2 greenfilter = vec2(0.30, 1.0); // RG_ - const vec2 magentafilter2 = magentafilter.rb; // R_B - - vec3 tcol = color.rgb; - - vec2 negative_mul_r = tcol.rg * (1.0 / (RGBNegativeAmount.r * Power)); - vec2 negative_mul_g = tcol.rg * (1.0 / (RGBNegativeAmount.g * Power)); - vec2 negative_mul_b = tcol.rb * (1.0 / (RGBNegativeAmount.b * Power)); - vec3 output_r = dot(redorangefilter, negative_mul_r).xxx + cyanfilter; - vec3 output_g = dot(greenfilter, negative_mul_g).xxx + magentafilter; - vec3 output_b = dot(magentafilter2, negative_mul_b).xxx + yellowfilter; - - return mix(tcol, output_r * output_g * output_b, Strength); -} - -//ColorMatrix -vec3 ColorMatrixPass(vec3 inputColor) -{ - vec3 color = inputColor; - - const mat3 ColorMatrix = mat3(ColorMatrix_Red, ColorMatrix_Green, ColorMatrix_Blue); - //color = mix(color, * (ColorMatrix, color), CM_Strength); - color *= mix(color, (ColorMatrix, color), CM_Strength); - return clamp(color, 0.0, 1.); -} - -// Contrasty - -vec3 BotWVibrance(vec3 color) { - float avg = (color.r + color.g + color.b) / 3.0; - float maxc = max(color.r, max(color.g, color.b)); - float w = 1.0 - pow(1.0 - 2.0 * avg, 2.0); - float weight = 1.0 + w * satFactor; - vec3 satcolor = mix(vec3(maxc), color, weight); - return satcolor; -} - -vec3 ReshadeVibrance(vec3 color) { - float max_color = max(color.r, max(color.g, color.b)); // Find the strongest color - float min_color = min(color.r, min(color.g, color.b)); // Find the weakest color - float luma = getL709(color); - float color_saturation = max_color - min_color; // The difference between the two is the saturation - vec3 coeffVibrance = VibranceRGBBalance * Vibrance; - color = mix(vec3(luma), color, 1.0 + (coeffVibrance * (1.0 - (sign(coeffVibrance) * color_saturation)))); - return color; -} - -vec3 Contrasty(vec3 fColour) { - fColour = max(vec3(0.0), fColour - vec3(crushContrast)); - fColour = clamp(Exposure * fColour, 0.0, 1.0); - fColour = pow(fColour, vec3(1.0 / Gamma)); - fColour = ReshadeVibrance(fColour); // reshade's identical, only a little stronger when at same setting - return fColour; -} - -// Levels - -vec3 LevelsPass(vec3 inputColor) { - float black_point_float = BlackPoint / 255.0; - float white_point_float = WhitePoint == BlackPoint ? (255.0 / 0.00025) : (255.0 / (WhitePoint - BlackPoint)); // Avoid division by zero if the white and black point are the same - - vec3 color = inputColor; - color = color * white_point_float - (black_point_float * white_point_float); - - return color; -} - -//FilmPass -vec3 FilmPass(vec3 inputColor) { - - vec3 B = inputColor.rgb; - vec3 G = B; - vec3 H = vec3(0.01); - - B = clamp(B, 0.0, 1.); - B = pow(vec3(B), vec3(Linearization)); - B = mix(H, B, Filmic_Contrast); - - vec3 LumCoeff = vec3(0.2126, 0.7152, 0.0722); - float A = dot(B.rgb, LumCoeff); - vec3 D = vec3(A); - - B = pow(B, 1.0 / vec3(BaseGamma)); - - float RedCurve = 1.0; - float GreenCurve = 1.0; - float BlueCurve = 1.0; - float a = RedCurve; - float b = GreenCurve; - float c = BlueCurve; - float d = BaseCurve; - - float y = 1.0 / (1.0 + exp(a / 2.0)); - float z = 1.0 / (1.0 + exp(b / 2.0)); - float w = 1.0 / (1.0 + exp(c / 2.0)); - float v = 1.0 / (1.0 + exp(d / 2.0)); - - vec3 C = B; - - D.r = (1.0 / (1.0 + exp(-a * (D.r - 0.5))) - y) / (1.0 - 2.0 * y); - D.g = (1.0 / (1.0 + exp(-b * (D.g - 0.5))) - z) / (1.0 - 2.0 * z); - D.b = (1.0 / (1.0 + exp(-c * (D.b - 0.5))) - w) / (1.0 - 2.0 * w); - - D = pow(D, 1.0 / vec3(EffectGamma)); - - vec3 Di = 1.0 - D; - - D = mix(D, Di, Filmic_Bleach); - float EffectGammaR = 1.0; - float EffectGammaG = 1.0; - float EffectGammaB = 1.0; - D.r = pow(abs(D.r), 1.0 / EffectGammaR); - D.g = pow(abs(D.g), 1.0 / EffectGammaG); - D.b = pow(abs(D.b), 1.0 / EffectGammaB); - - if (D.r < 0.5) - C.r = (2.0 * D.r - 1.0) * (B.r - B.r * B.r) + B.r; - else - C.r = (2.0 * D.r - 1.0) * (sqrt(B.r) - B.r) + B.r; - - if (D.g < 0.5) - C.g = (2.0 * D.g - 1.0) * (B.g - B.g * B.g) + B.g; - else - C.g = (2.0 * D.g - 1.0) * (sqrt(B.g) - B.g) + B.g; - - if (D.b < 0.5) - C.b = (2.0 * D.b - 1.0) * (B.b - B.b * B.b) + B.b; - else - C.b = (2.0 * D.b - 1.0) * (sqrt(B.b) - B.b) + B.b; - - vec3 F = mix(B, C, Filmic_Strength); - - F = (1.0 / (1.0 + exp(-d * (F - 0.5))) - v) / (1.0 - 2.0 * v); - - float r2R = 1.0 - Saturation; - float g2R = 0.0 + Saturation; - float b2R = 0.0 + Saturation; - - float r2G = 0.0 + Saturation; - float g2G = (1.0 - Fade) - Saturation; - float b2G = (0.0 + Fade) + Saturation; - - float r2B = 0.0 + Saturation; - float g2B = (0.0 + Fade) + Saturation; - float b2B = (1.0 - Fade) - Saturation; - - vec3 iF = F; - - F.r = (iF.r * r2R + iF.g * g2R + iF.b * b2R); - F.g = (iF.r * r2G + iF.g * g2G + iF.b * b2G); - F.b = (iF.r * r2B + iF.g * g2B + iF.b * b2B); - - float N = dot(F.rgb, LumCoeff); - vec3 Cn = F; - - if (N < 0.5) - Cn = (2.0 * N - 1.0) * (F - F * F) + F; - else - Cn = (2.0 * N - 1.0) * (sqrt(F) - F) + F; - - Cn = pow(max(Cn, 0), 1.0 / vec3(Linearization)); - - vec3 Fn = mix(B, Cn, Filmic_Strength); - return Fn; -} - -//DPX -const mat3 RGB = mat3( - 2.6714711726599600, -1.2672360578624100, -0.4109956021722270, - -1.0251070293466400, 1.9840911624108900, 0.0439502493584124, - 0.0610009456429445, -0.2236707508128630, 1.1590210416706100 -); -const mat3 XYZ = mat3( - 0.5003033835433160, 0.3380975732227390, 0.1645897795458570, - 0.2579688942747580, 0.6761952591447060, 0.0658358459823868, - 0.0234517888692628, 0.1126992737203000, 0.8668396731242010 -); -vec3 DPXPass(vec3 inputColor) -{ - vec3 color = inputColor; - - vec3 B = color; - B = B * (1.0 - DPX_Contrast) + (0.5 * DPX_Contrast); - vec3 Btemp = (1.0 / (1.0 + exp(RGB_Curve / 2.0))); - B = ((1.0 / (1.0 + exp(-RGB_Curve * (B - RGB_C)))) / (-2.0 * Btemp + 1.0)) + (-Btemp / (-2.0 * Btemp + 1.0)); - - float value = max(max(B.r, B.g), B.b); - vec3 Ztemp = B / value; - color = pow(abs(color), 1. / vec3(Colorfulness)); - - vec3 c0 = Ztemp * value; - c0 *= (XYZ, c0); - float luma = dot(c0, vec3(0.30, 0.59, 0.11)); - c0 = (1.0 - DPX_Saturation) * luma + DPX_Saturation * c0; - c0 *= (RGB, c0); - - return mix(color, c0, DPX_Strength); -} - -//Lift Gamma Gain - -vec3 LiftGammaGainPass(vec3 colorInput) -{ - // -- Get input -- - vec3 color = colorInput; - - // -- Lift -- - - color = color * (1.5 - 0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5; - color = clamp(color, 0.0, 1.0); //isn't strictly necessary, but doesn't cost performance. - - // -- Gain -- - color *= RGB_Gain; - - // -- Gamma -- - color = pow(color, 1.0 / RGB_Gamma); //Gamma - - // -- Return output -- - return clamp(color, 0.0, 1.0); -} - -//VibrancePass -vec3 VibrancePass(vec3 color) { - - const vec3 coefLuma = vec3(0.2126, 0.7152, 0.0722); - float luma = dot(coefLuma, color); - - float max_color = max(color.r, max(color.g, color.b)); // Find the strongest color - float min_color = min(color.r, min(color.g, color.b)); // Find the weakest color - - float color_saturation = max_color - min_color; // The difference between the two is the saturation - - // Extrapolate between luma and original by 1 + (1-saturation) - current - vec3 coeffVibrance = VibranceRGBBalance * Vibrance; - - color = mix(vec3(luma), color, 1.0 + (coeffVibrance * (1.0 - (sign(coeffVibrance) * color_saturation)))); - - return color; -} - -//LumaShapening - -#define px (1.0/1280.0*uf_fragCoordScale.x) -#define py (1.0/720.0*uf_fragCoordScale.y) -#define CoefLuma vec3(0.2126, 0.7152, 0.0722) - -float lumasharping(sampler2D tex, vec2 pos) { - vec4 colorInput = texture(tex, pos); - - vec3 ori = colorInput.rgb; - - // -- Combining the strength and luma multipliers -- - vec3 sharp_strength_luma = (CoefLuma * sharp_strength); - - // -- Gaussian filter -- - // [ .25, .50, .25] [ 1 , 2 , 1 ] - // [ .50, 1, .50] = [ 2 , 4 , 2 ] - // [ .25, .50, .25] [ 1 , 2 , 1 ] - - vec3 blur_ori = texture(tex, pos + vec2(px, -py) * 0.5 * offset_bias).rgb; // South East - blur_ori += texture(tex, pos + vec2(-px, -py) * 0.5 * offset_bias).rgb; // South West - blur_ori += texture(tex, pos + vec2(px, py) * 0.5 * offset_bias).rgb; // North East - blur_ori += texture(tex, pos + vec2(-px, py) * 0.5 * offset_bias).rgb; // North West - - blur_ori *= 0.25; // ( /= 4) Divide by the number of texture fetches - - // -- Calculate the sharpening -- - vec3 sharp = ori - blur_ori; //Subtracting the blurred image from the original image - - // -- Adjust strength of the sharpening and clamp it-- - vec4 sharp_strength_luma_clamp = vec4(sharp_strength_luma * (0.5 / sharp_clamp), 0.5); //Roll part of the clamp into the dot - - float sharp_luma = clamp((dot(vec4(sharp, 1.0), sharp_strength_luma_clamp)), 0.0, 1.0); //Calculate the luma, adjust the strength, scale up and clamp - sharp_luma = (sharp_clamp * 2.0) * sharp_luma - sharp_clamp; //scale down - - return sharp_luma; -} - -//Fake High Dynamic Range. - -vec3 HDRPass(sampler2D tex, vec2 pos) { - vec3 color = texture(tex, pos).rgb; - - vec3 bloom_sum1 = texture(tex, pos + vec2(1.5, -1.5) * radius1 * vec2(px, py)).rgb; - bloom_sum1 += texture(tex, pos + vec2(-1.5, -1.5) * radius1 * vec2(px, py)).rgb; - bloom_sum1 += texture(tex, pos + vec2(1.5, 1.5) * radius1 * vec2(px, py)).rgb; - bloom_sum1 += texture(tex, pos + vec2(-1.5, 1.5) * radius1 * vec2(px, py)).rgb; - bloom_sum1 += texture(tex, pos + vec2(0.0, -2.5) * radius1 * vec2(px, py)).rgb; - bloom_sum1 += texture(tex, pos + vec2(0.0, 2.5) * radius1 * vec2(px, py)).rgb; - bloom_sum1 += texture(tex, pos + vec2(-2.5, 0.0) * radius1 * vec2(px, py)).rgb; - bloom_sum1 += texture(tex, pos + vec2(2.5, 0.0) * radius1 * vec2(px, py)).rgb; - - bloom_sum1 *= 0.005; - - vec3 bloom_sum2 = texture(tex, pos + vec2(1.5, -1.5) * radius2 * vec2(px, py)).rgb; - bloom_sum2 += texture(tex, pos + vec2(-1.5, -1.5) * radius2 * vec2(px, py)).rgb; - bloom_sum2 += texture(tex, pos + vec2(1.5, 1.5) * radius2 * vec2(px, py)).rgb; - bloom_sum2 += texture(tex, pos + vec2(-1.5, 1.5) * radius2 * vec2(px, py)).rgb; - bloom_sum2 += texture(tex, pos + vec2(0.0, -2.5) * radius2 * vec2(px, py)).rgb; - bloom_sum2 += texture(tex, pos + vec2(0.0, 2.5) * radius2 * vec2(px, py)).rgb; - bloom_sum2 += texture(tex, pos + vec2(-2.5, 0.0) * radius2 * vec2(px, py)).rgb; - bloom_sum2 += texture(tex, pos + vec2(2.5, 0.0) * radius2 * vec2(px, py)).rgb; - - bloom_sum2 *= 0.010; - - float dist = radius2 - radius1; - vec3 HDR = (color + (bloom_sum2 - bloom_sum1)) * dist; - - vec3 blend = HDR + color; - color = pow(abs(blend), vec3(abs(HDRPower))) + HDR; - - return color; -} - -void main() -{ - //Bloom - vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; -#if (adjust_bloom == 1) - bloom *= bloomFactor; -#endif - - //HDR and LumaShapening -#if (HDRpassing == 1) - passPixelColor0.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy).xyz; -#endif -#if (HDRpassing == 0) - passPixelColor0.xyz = texture(textureUnitPS1, passParameterSem0.xy).xyz; -#endif -#if (lumapassing == 1) - float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); - passPixelColor0.xyz += vec3(smask); -#endif - - // Do not edit this - vec3 color = (passPixelColor0.xyz); - color += bloom; - //++++++++++++++++++++++++++++++++++ - - // Tonemapping -#if (Tone_map == -1) - color = clamp(color*Exposure, 0.0, 1.0); -#elif (Tone_map == 0) - color = BotWToneMap(color); -#elif (Tone_map == 1) - color = ReshadeToneMap(color); -#elif (Tone_map == 2) - color = linearToneMapping(color); -#elif (Tone_map == 3) - color = simpleReinhardToneMapping(color); -#elif (Tone_map == 4) - color = lumaBasedReinhardToneMapping(color); -#elif (Tone_map == 5) - color = whitePreservingLumaBasedReinhardToneMapping(color); -#elif (Tone_map == 6) - color = RomBinDaHouseToneMapping(color); -#elif (Tone_map == 7) - color = filmicToneMapping(color); -#elif (Tone_map == 8) - color = Uncharted2ToneMapping(color); -#elif (tone_mapping == 9) - color = ACESFilm(color); -#endif - - // Levels Control if we tone map to 16-235 , 0 - 255 or usr defined range. -#if (blacknwhitepass == 1) - color = LevelsPass(color); -#endif - - // Color matrix -#if (cmatrix == 1) - color = ColorMatrixPass(color); -#endif - - - // Post Processing -#if (Tech == 1) - color = TechnicolorPass(color); -#endif -#if (Techine == 1) - color = Technicolor2(color); -#endif -#if (post_process == 0) - color = BotWVibrance(color); -#endif -#if (post_process == 1) - color = Contrasty(color); -#endif -#if (dpxpass == 1) - color = DPXPass(color); -#endif -#if (Filmicpass == 1) - color = FilmPass(color); -#endif -#if (lggpass == 1) - color = LiftGammaGainPass(color); -#endif -#if (CurvesPss == 1) - color = CurvesPass(color); -#endif -#if (vibpass == 1) - color = VibrancePass(color); -#endif - passPixelColor0 = vec4(color, passParameterSem0.w); -} +#version 420 +#extension GL_ARB_texture_gather : enable +// shader 37040a485a29d54e + +//########################################################## + +// Being below game update version 1.4.0 will give you double-vision with recent graphic packs. + +// Clarity GFX +// Credit to Jamie for main coding. +// Credit to Kiri coding & Reshade logic. +// Credit to Crementif for additional assistance. +// Credit to all other creators for their time in making alternative presets. + +// Shader dumped from Cemu 1.11.2 from BotW 1.4.0 +// Added Cemu 1.13.x Preset support +// v 2.3 Final + +//########################################################## + +#define Preset $preset + + // User Defined Preset 0 + // Bruz Preset 1 + // BSOD Gaming Preset 2 + // Jamie Preset 3 + // Contrasty Preset 4 + // The Complaining Gamer Preset 5 + // Filmic Preset Preset 6 + // CellHunter Preset 7 + // Serfrost Preset (Bright Display) 8 + // Serfrost Preset (Dim Display) 9 + // Serfrost Preset (Default) 10 + +//########################################################## + +#if (Preset == 0) + +// User Defined, values to change are below. End before main presets. + +//########################################################## + +#define adjust_bloom 1 // 0: disable, 1: enable. + +//BloomFactor +const float bloomFactor = 0.020; // Default is 0.020 (rough estimate based on Switch) + +#define HDRpassing 0 // 0: disable, 1: enable. + +//Fake High Dynamic Range. +const float HDRPower = 1.00; // 0.0 to 8.0 Default 1.30. +const float radius1 = 1.00; // 0.0 to 8.0 Default 0.793 +const float radius2 = 0.80; // 0.0 to 8.0 Default 0.87 "Raising this seems to make the effect stronger and also brighter." + +#define lumapassing 0 // 0: disable, 1: enable. + +//LumaShapening +const float sharp_strength = 0.35; //[0.10 to 3.00] Strength of the sharpening Default is 0.65 +const float sharp_clamp = 0.85; //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 + +//Advanced sharpening settings +const float offset_bias = 1.0; //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. + +#define Tone_map 0 + + // 0: disable, -1 to 9: enable. + // -1: disable, loss of bright detail/color but keep [0,1] intact + // 0: (Wii U) BotW original + // Reshade ToneMap Option 1 + // linearToneMapping Option 2 + // simpleReinhardToneMapping Option 3 + // lumaBasedReinhardToneMapping Option 4 + // whitePreservingLumaBasedReinhardToneMapping Option 5 + // RomBinDaHouseToneMapping Option 6 + // filmicToneMapping Option 7 + // Uncharted2ToneMapping Option 8 + // ACES Filmic Option 9 + // Reshade ToneMap Controls / "Contrasty" Parameters + +const float Exposure = 1.17; // [0.0, 1.0+] Adjust exposure +const float Bleach = 0.4; // "More bleach means more contrasted and less colorful image" min -0.5 max 1.0 Default 0.0 +const float Gamma = 1.00; // "Adjust midtones. 1.000 is neutral. This setting does exactly the same as the one in Lift Gamma Gain, only with less control." +const float defog = 0.00; // Default is 0.0 //How much of the overall color you want removed form the values of FogColor. +vec3 FogColor = vec3(1.0, 1.0, 1.0); // Color you want to Add or Remove 0.25 would add .25 percent of that color 1.25 would remove .25 percent of the color." +const float sat = 0.000; // "Adjust saturation" min -1.0 max 1.0 Default 0.0 +const float crushContrast = 0.000; // 0.0 is neutral. Use small increments, loss of shadow detail + +#define post_process 0 + +//----------------"BotW original" vibrance adjust-------------// +const float satFactor = 0.25; // 0.18 is neutral. Experimental, adjust native saturation +//------------------------------------------------------------// + +#define blacknwhitepass 0 // 0: disable, 1: enable. +// Levels Control +const int BlackPoint = 16; // [0, 255] The black point is the new black - literally. Everything darker than this will become completely black +const int WhitePoint = 235; // [0, 255] The new white point. Everything brighter than this becomes completely white + +#define lggpass 0 // 0: disable, 1: enable. +//Lift Gamma Gain +vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); // [0.000 to 2.000] Adjust shadows for Red, Green and Blue. +vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); // [0.000 to 2.000] Adjust midtones for Red, Green and Blue +vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue + // Note that a value of 1.0 is a neutral setting that leave the color unchanged. + +#define vibpass 0 // 0: disable, 1: enable. +//VibrancePass +const float Vibrance = 0.150; // Default [0.150] "Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation." +vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); // "A per channel multiplier to the Vibrance strength so you can give more boost to certain colors over others."; + +#define Tech 0 // 0: disable, 1: enable. +//Technicolor +const float Power = 4.0; // Min 0.0 Max 8.0 Default 4.0 +vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); +float Strength = 0.20; // Min 0.0 Max 1.0 Default 0.4 + +#define Techine 0 // 0: disable, 1: enable. +//Technicolor2 +const float Technicolor2_Red_Strength = 0.02; // "Higher means darker and more intense colors." Default 0.2 +const float Technicolor2_Green_Strength = 0.02; // "Higher means darker and more intense colors." Default 0.2 +const float Technicolor2_Blue_Strength = 0.02; // "Higher means darker and more intense colors." Default 0.2 +const float Technicolor2_Brightness = 1.00; // "Higher means brighter image." min 0.5 max 1.5 Default 1.0 +const float Technicolor2_Strength = 1.00; // [Default is 1.0] +const float Technicolor2_Saturation = 1.00; // Default is 1.0 min 0.0 max 1.5 "Additional saturation control since this effect tends to oversaturate the image." + +#define cmatrix 0 +//Color Matrix +vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); +vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); +vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); +float CM_Strength = 1.0; + +//Curves Contrast +#define CurvesPss 0 // 0: disable, 1: enable. +const float Contrast = 0.65; // Default 0.65 min -1.0 max = 1.0 "The amount of contrast you want." + +#define Filmicpass 0 // 0: disable, 1: enable. +//Filmic Pass +const float Filmic_Contrast = 1.0; // Default 1.0 min 0.5 max 2.0 +const float Filmic_Bleach = 0.0; // "More bleach means more contrasted and less colorful image" min -0.5 max 1.0 Default 0.0 +const float Saturation = -0.15; // min -1.0 max 1.0 Default -0.15 + +const float Filmic_Strength = 0.85; // "Strength of the color curve altering"; min 0.0 max 1.5 Default 0.85 +const float Fade = 0.4; // "Decreases contrast to imitate faded image" min 0.0 max 0.6 Default 0.4 +const float Linearization = 0.5; // min 0.5 max 2.0 Default 0.5 + +const float BaseCurve = 1.5; // min 0.0 max 2.0 Default 1.5 +const float BaseGamma = 1.00; // min 0.7 max 2.0 Default 1.0 +const float EffectGamma = 0.68; // min 0.0 max 2.0 Default 0.68 + +#define dpxpass 0 +//DPX +vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); +vec3 RGB_C = vec3(0.36, 0.36, 0.34); + +float DPX_Contrast = 0.1; +float DPX_Saturation = 3.0; +float Colorfulness = 2.5; + +float DPX_Strength = 0.20; + +//########################################################### + +//Do not edit under this line, unless explicitly desired. Keep backups! + +//########################################################### + +//Presets + +#elif (Preset == 1) //Bruz + + #define adjust_bloom 1 + const float bloomFactor = 0.30; + #define HDRpassing 0 + float HDRPower = 1.00; + float radius1 = 1.00; + float radius2 = 0.80; + #define lumapassing 0 + float sharp_strength = 0.45; + float sharp_clamp = 0.085; + float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.17; + const float Bleach = 0.4; + const float Gamma = 1.00; + const float defog = 0.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.000; + const float crushContrast = 0.000; + #define post_process 1 + const float satFactor = 0.25; + #define blacknwhitepass 1 + const int BlackPoint = 1; + const int WhitePoint = 220; + #define lggpass 1 + vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); + vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); + vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); + #define vibpass 0 + const float Vibrance = 0.150; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 1 + const float Power = 8.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.3; + #define Techine 1 + float Technicolor2_Red_Strength = -0.05; + float Technicolor2_Green_Strength = -0.1; + float Technicolor2_Blue_Strength = 0.07; + float Technicolor2_Brightness = 0.0; + float Technicolor2_Strength = 2.0; + float Technicolor2_Saturation = 1.3; //1.13 to completely fix lava + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 0 + const float Contrast = 0.65; + #define Filmicpass 1 + const float Filmic_Strength = 0.60; + const float Filmic_Contrast = 1.03; + const float Fade = 0.0; + const float Linearization = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.3; + const float BaseCurve = 1.5; + const float BaseGamma = 1.0; + const float EffectGamma = 0.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 2.5; + float DPX_Strength = 0.20; + +#elif (Preset == 2) //BSoD Gaming + + #define adjust_bloom 1 + const float bloomFactor = 0.010; + #define HDRpassing 1 + const float HDRPower = 1.085; + const float radius1 = 0.793; + const float radius2 = 0.87; + #define lumapassing 1 + const float sharp_strength = 0.25; + const float sharp_clamp = 0.085; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 0.6; + const float Bleach = 0.3; + const float Gamma = 1.00; + const float defog = 0.004; + vec3 FogColor = vec3(1.0, 1.5, 1.7); + const float sat = 0.050; + const float crushContrast = 0.000; + #define post_process 0 + const float satFactor = 0.25; + #define blacknwhitepass 0 + const int BlackPoint = 8; + const int WhitePoint = 235; + #define lggpass 1 + vec3 RGB_Lift = vec3(0.994, 0.994, 0.994); + vec3 RGB_Gamma = vec3(1.0, 0.990, 1.0); + vec3 RGB_Gain = vec3(1.0, 0.990, 1.00); + #define vibpass 1 + const float Vibrance = 0.113; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 0 + const float Power = 4.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.20; + #define Techine 0 + const float Technicolor2_Red_Strength = 0.000; + const float Technicolor2_Green_Strength = 0.000; + const float Technicolor2_Blue_Strength = 0.000; + const float Technicolor2_Brightness = 1.0; + const float Technicolor2_Strength = 0.40; + const float Technicolor2_Saturation = 0.70; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 0 + const float Contrast = 0.65; + #define Filmicpass 1 + const float Filmic_Contrast = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.15; + const float Filmic_Strength = 0.85; + const float Fade = 0.4; + const float Linearization = 0.5; + const float BaseCurve = 1.5; + const float BaseGamma = 0.7; + const float EffectGamma = 0.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 2.5; + float DPX_Strength = 0.20; + +#elif (Preset == 3) //Jamie + + #define adjust_bloom 1 + const float bloomFactor = 0.020; + #define HDRpassing 1 + const float HDRPower = 1.00; + const float radius1 = 1.00; + const float radius2 = 0.80; + #define lumapassing 1 + const float sharp_strength = 0.35; + const float sharp_clamp = 0.85; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.17; + const float Bleach = 0.4; + const float Gamma = 1.00; + const float defog = 0.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.000; + const float crushContrast = 0.000; + #define post_process 1 + const float satFactor = 0.25; + #define blacknwhitepass 0 + const int BlackPoint = 16; + const int WhitePoint = 235; + #define lggpass 1 + vec3 RGB_Lift = vec3(0.980, 0.980, 0.980); + vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); + vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); + #define vibpass 0 + const float Vibrance = 0.150; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 0 + const float Power = 4.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.20; + #define Techine 0 + const float Technicolor2_Red_Strength = 0.02; + const float Technicolor2_Green_Strength = 0.02; + const float Technicolor2_Blue_Strength = 0.02; + const float Technicolor2_Brightness = 1.00; + const float Technicolor2_Strength = 1.00; + const float Technicolor2_Saturation = 1.00; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 0 + const float Contrast = 0.65; + #define Filmicpass 0 + const float Filmic_Contrast = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.15; + const float Filmic_Strength = 0.85; + const float Fade = 0.4; + const float Linearization = 0.5; + const float BaseCurve = 1.5; + const float BaseGamma = 1.00; + const float EffectGamma = 0.68; + #define dpxpass 1 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 0.0; + float Colorfulness = 1.0; + float DPX_Strength = 0.20; + +#elif (Preset == 4) //Contrasty + + #define adjust_bloom 1 + const float bloomFactor = 0.020; + #define HDRpassing 0 + const float HDRPower = 1.00; + const float radius1 = 1.00; + const float radius2 = 0.80; + #define lumapassing 0 + const float sharp_strength = 0.35; + const float sharp_clamp = 0.85; + const float offset_bias = 1.0; + #define Tone_map 1 + const float Exposure = 1.17; + const float Bleach = 0.3; + const float Gamma = 0.810; + const float defog = 0.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.000; + const float crushContrast = 0.000; + #define post_process 1 + const float satFactor = 0.25; + #define blacknwhitepass 0 + const int BlackPoint = 16; + const int WhitePoint = 235; + #define lggpass 0 + vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); + vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); + vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); + #define vibpass 0 + const float Vibrance = 0.150; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 0 + const float Power = 4.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.20; + #define Techine 0 + const float Technicolor2_Red_Strength = 0.02; + const float Technicolor2_Green_Strength = 0.02; + const float Technicolor2_Blue_Strength = 0.02; + const float Technicolor2_Brightness = 1.00; + const float Technicolor2_Strength = 1.00; + const float Technicolor2_Saturation = 1.00; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 1 + const float Contrast = 0.65; + #define Filmicpass 0 + const float Filmic_Contrast = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.15; + const float Filmic_Strength = 0.85; + const float Fade = 0.4; + const float Linearization = 0.5; + const float BaseCurve = 1.5; + const float BaseGamma = 1.00; + const float EffectGamma = 0.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 2.5; + float DPX_Strength = 0.20; + +#elif (Preset == 5) //The Complaining Gamer + + #define adjust_bloom 1 + const float bloomFactor = 0.33; + #define HDRpassing 1 + const float HDRPower = 1.020; + const float radius1 = 0.793; + const float radius2 = 0.87; + #define lumapassing 1 + const float sharp_strength = 0.25; + const float sharp_clamp = 0.85; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.17; + const float Bleach = 0.4; + const float Gamma = 1.00; + const float defog = 0.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.000; + const float crushContrast = 0.000; + #define post_process 0 + const float satFactor = 0.25; + #define blacknwhitepass 0 + const int BlackPoint = 16; + const int WhitePoint = 235; + #define lggpass 1 + vec3 RGB_Lift = vec3(1.000, 1.000, 1.000); + vec3 RGB_Gamma = vec3(0.600, 0.600, 0.600); + vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); + #define vibpass 1 + const float Vibrance = 0.150; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 0 + const float Power = 4.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.20; + #define Techine 1 + const float Technicolor2_Red_Strength = 0.000; + const float Technicolor2_Green_Strength = 0.000; + const float Technicolor2_Blue_Strength = 0.000; + const float Technicolor2_Brightness = 1.0; + const float Technicolor2_Strength = 0.40; + const float Technicolor2_Saturation = 0.51; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 1 + const float Contrast = 0.65; + #define Filmicpass 0 + const float Filmic_Contrast = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.15; + const float Filmic_Strength = 0.85; + const float Fade = 0.4; + const float Linearization = 0.5; + const float BaseCurve = 1.5; + const float BaseGamma = 1.00; + const float EffectGamma = 0.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 2.5; + float DPX_Strength = 0.20; + +#elif (Preset == 6) //Filmic + + #define adjust_bloom 1 + const float bloomFactor = 0.020; + #define HDRpassing 1 + const float HDRPower = 1.20; + const float radius1 = 1.00; + const float radius2 = 0.80; + #define lumapassing 1 + const float sharp_strength = 0.35; + const float sharp_clamp = 0.85; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.17; + const float Bleach = 0.4; + const float Gamma = 1.00; + const float defog = 0.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.000; + const float crushContrast = 0.000; + #define post_process 1 + const float satFactor = 0.25; + #define blacknwhitepass 0 + const int BlackPoint = 16; + const int WhitePoint = 235; + #define lggpass 0 + vec3 RGB_Lift = vec3(0.990, 0.990, 0.990); + vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000); + vec3 RGB_Gain = vec3(1.000, 1.000, 1.000); + #define vibpass 1 + const float Vibrance = 0.150; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 0 + const float Power = 4.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.20; + #define Techine 0 + const float Technicolor2_Red_Strength = 0.02; + const float Technicolor2_Green_Strength = 0.02; + const float Technicolor2_Blue_Strength = 0.02; + const float Technicolor2_Brightness = 1.00; + const float Technicolor2_Strength = 1.00; + const float Technicolor2_Saturation = 1.00; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 1 + const float Contrast = 0.65; + #define Filmicpass 1 + const float Filmic_Contrast = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.15; + const float Filmic_Strength = 0.85; + const float Fade = 0.4; + const float Linearization = 0.5; + const float BaseCurve = 1.5; + const float BaseGamma = 1.00; + const float EffectGamma = 0.68; + #define dpxpass 1 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 2.0; + float Colorfulness = 1.5; + float DPX_Strength = 0.20; + +#elif (Preset == 7) //CellHunter + + #define adjust_bloom 1 + const float bloomFactor = 0.455; + #define HDRpassing 1 + const float HDRPower = 1.000; + const float radius1 = 1.100; + const float radius2 = 1.235; + #define lumapassing 1 + const float sharp_strength = 0.65; + const float sharp_clamp = 0.45; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.17; + const float Bleach = 0.0; + const float Gamma = 1.00; + const float defog = 0.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.000; + const float crushContrast = 0.000; + #define post_process 0 + const float satFactor = 0.25; + #define blacknwhitepass 0 + const int BlackPoint = 16; + const int WhitePoint = 215; + #define lggpass 1 + vec3 RGB_Lift = vec3(0.980, 0.970, 1.000); + vec3 RGB_Gamma = vec3(0.970, 0.965, 1.010); + vec3 RGB_Gain = vec3(0.980, 0.970, 1.005); + #define vibpass 1 + const float Vibrance = 0.385; + vec3 VibranceRGBBalance = vec3(1.10, 1.05, 1.15); + #define Tech 1 + const float Power = 5.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.10; + #define Techine 0 + const float Technicolor2_Red_Strength = 0.02; + const float Technicolor2_Green_Strength = 0.02; + const float Technicolor2_Blue_Strength = 0.02; + const float Technicolor2_Brightness = 1.00; + const float Technicolor2_Strength = 1.00; + const float Technicolor2_Saturation = 1.00; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 1 + const float Contrast = 0.165; + #define Filmicpass 0 + const float Filmic_Contrast = 0.97; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.15; + const float Filmic_Strength = 0.65; + const float Fade = 0.2; + const float Linearization = 0.7; + const float BaseCurve = 1.5; + const float BaseGamma = 0.90; + const float EffectGamma = 0.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 2.5; + float DPX_Strength = 0.20; + +#elif (Preset == 8) //Serfrost (Bright Display) + + #define adjust_bloom 1 + const float bloomFactor = 0.40; + #define HDRpassing 1 + const float HDRPower = 1.20; + const float radius1 = 0.793; + const float radius2 = 0.87; + #define lumapassing 0 + const float sharp_strength = 0.45; + const float sharp_clamp = 0.85; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.17; + const float Bleach = 0.0; + const float Gamma = 0.98; + const float defog = 1.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.00; + const float crushContrast = 0.00; + #define post_process 0 + const float satFactor = 0.07; + #define blacknwhitepass 1 + const int BlackPoint = 2; + const int WhitePoint = 300; + #define lggpass 1 + vec3 RGB_Lift = vec3(1.027, 1.027, 1.027); + vec3 RGB_Gamma = vec3(0.83, 0.83, 0.83); + vec3 RGB_Gain = vec3(1.10, 1.10, 1.10); + #define vibpass 1 + const float Vibrance = 0.15; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 0 + const float Power = 5.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.10; + #define Techine 1 + float Technicolor2_Red_Strength = -0.09; + float Technicolor2_Green_Strength = -0.09; + float Technicolor2_Blue_Strength = -0.00; + float Technicolor2_Brightness = 0.4; + float Technicolor2_Strength = 1.2; + float Technicolor2_Saturation = 1.1; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 0 + const float Contrast = 0.0; + #define Filmicpass 1 + const float Filmic_Contrast = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.17; + const float Filmic_Strength = 0.48; + const float Fade = 0.08; + const float Linearization = 1.0; + const float BaseCurve = 1.0; + const float BaseGamma = 1.0; + const float EffectGamma = 1.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 1.0; + float DPX_Strength = 0.20; + +#elif (Preset == 9) //Serfrost (Dim Display) + + #define adjust_bloom 1 + const float bloomFactor = 0.7; + #define HDRpassing 1 + const float HDRPower = 1.20; + const float radius1 = 0.793; + const float radius2 = 0.87; + #define lumapassing 0 + const float sharp_strength = 0.45; + const float sharp_clamp = 0.85; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.17; + const float Bleach = 0.0; + const float Gamma = 1.05; + const float defog = 1.00; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.0; + const float crushContrast = 0.00; + #define post_process 0 + const float satFactor = 0.07; + #define blacknwhitepass 1 + const int BlackPoint = 1; + const int WhitePoint = 235; + #define lggpass 1 + vec3 RGB_Lift = vec3(1.027, 1.027, 1.027); + vec3 RGB_Gamma = vec3(0.83, 0.83, 0.83); + vec3 RGB_Gain = vec3(1.10, 1.10, 1.10); + #define vibpass 1 + const float Vibrance = 0.45; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0); + #define Tech 0 + const float Power = 5.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.10; + #define Techine 1 + float Technicolor2_Red_Strength = -0.09; + float Technicolor2_Green_Strength = -0.09; + float Technicolor2_Blue_Strength = -0.00; + float Technicolor2_Brightness = 0.4; + float Technicolor2_Strength = 1.2; + float Technicolor2_Saturation = 1.15; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 0 + const float Contrast = 0.0; + #define Filmicpass 1 + const float Filmic_Contrast = 1.0; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.17; + const float Filmic_Strength = 0.48; + const float Fade = 0.08; + const float Linearization = 1.0; + const float BaseCurve = 1.0; + const float BaseGamma = 1.0; + const float EffectGamma = 1.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 1.0; + float DPX_Strength = 0.20; + +#elif (Preset == 10) //Serfrost (Other) + + #define adjust_bloom 1 + const float bloomFactor = 0.3; + #define HDRpassing 1 + const float HDRPower = 1.15; + const float radius1 = 0.793; + const float radius2 = 0.87; + #define lumapassing 1 + const float sharp_strength = 0.45; + const float sharp_clamp = 0.085; + const float offset_bias = 1.0; + #define Tone_map 8 + const float Exposure = 1.10; + const float Bleach = 0.1; + const float Gamma = 1.0; + const float defog = 0.0; + vec3 FogColor = vec3(1.0, 1.0, 1.0); + const float sat = 0.0; + const float crushContrast = 0.00; + #define post_process 0 + const float satFactor = 0.07; + #define blacknwhitepass 1 + const int BlackPoint = 5; + const int WhitePoint = 210; + #define lggpass 1 + vec3 RGB_Lift = vec3(1.027, 1.027, 1.027); + vec3 RGB_Gamma = vec3(0.83, 0.83, 0.83); + vec3 RGB_Gain = vec3(1.10, 1.10, 1.10); + #define vibpass 1 + const float Vibrance = 0.45; + vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.3); + #define Tech 1 + const float Power = 6.0; + vec3 RGBNegativeAmount = vec3(0.88, 0.88, 0.88); + float Strength = 0.3; + #define Techine 1 + float Technicolor2_Red_Strength = -0.12; + float Technicolor2_Green_Strength = -0.25; + float Technicolor2_Blue_Strength = -0.15; + float Technicolor2_Brightness = 0.4; + float Technicolor2_Strength = 1.0; + float Technicolor2_Saturation = 0.90; + #define cmatrix 0 + vec3 ColorMatrix_Red = vec3(0.817, 0.183, 0.000); + vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000); + vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875); + float CM_Strength = 1.0; + #define CurvesPss 0 + const float Contrast = 0.5; + #define Filmicpass 1 + const float Filmic_Contrast = 1.03; + const float Filmic_Bleach = 0.0; + const float Saturation = -0.35; + const float Filmic_Strength = 0.60; + const float Fade = 0.1; + const float Linearization = 1.0; + const float BaseCurve = 1.5; + const float BaseGamma = 1.0; + const float EffectGamma = 0.68; + #define dpxpass 0 + vec3 RGB_Curve = vec3(8.0, 8.0, 8.0); + vec3 RGB_C = vec3(0.36, 0.36, 0.34); + float DPX_Contrast = 0.1; + float DPX_Saturation = 3.0; + float Colorfulness = 1.0; + float DPX_Strength = 0.20; + +#endif + +//########################################################### + +//Never touch anything below this line unless you plan to break and fix things. + +//########################################################### + +uniform ivec4 uf_remappedPS[1]; +layout(binding = 0) uniform sampler2D textureUnitPS0; // Bloom +layout(binding = 1) uniform sampler2D textureUnitPS1;// HDR LumaShapening. +layout(location = 0) in vec4 passParameterSem0; +layout(location = 0) out vec4 passPixelColor0; +uniform vec2 uf_fragCoordScale; + +//ToneMapping + +vec3 linearToneMapping(vec3 color) +{ + float exposure = 1.; + color = clamp(exposure * color, 0., 1.); + color = pow(color, vec3(1. / Gamma)); + return color; +} + +vec3 simpleReinhardToneMapping(vec3 color) +{ + float exposure = 1.5; + color *= exposure / (1. + color / exposure); + color = pow(color, vec3(1. / Gamma)); + return color; +} + +vec3 lumaBasedReinhardToneMapping(vec3 color) +{ + float luma = dot(color, vec3(0.2126, 0.7152, 0.0722)); + float toneMappedLuma = luma / (1. + luma); + color *= toneMappedLuma / luma; + color = pow(color, vec3(1. / Gamma)); + return color; +} + +vec3 whitePreservingLumaBasedReinhardToneMapping(vec3 color) +{ + float white = 2.; + float luma = dot(color, vec3(0.2126, 0.7152, 0.0722)); + float toneMappedLuma = luma * (1. + luma / (white*white)) / (1. + luma); + color *= toneMappedLuma / luma; + color = pow(color, vec3(1. / Gamma)); + return color; +} + +vec3 RomBinDaHouseToneMapping(vec3 color) +{ + color = exp(-1.0 / (2.72*color + 0.15)); + color = pow(color, vec3(1. / Gamma)); + return color; +} + +vec3 filmicToneMapping(vec3 color) +{ + color = max(vec3(0.), color - vec3(0.004)); + color = (color * (6.2 * color + .5)) / (color * (6.2 * color + 1.7) + 0.06); + return color; +} + +vec3 Uncharted2ToneMapping(vec3 color) +{ + float A = 0.15; + float B = 0.50; + float C = 0.10; + float D = 0.20; + float E = 0.02; + float F = 0.30; + float W = 11.2; + float exposure = 2.; + color *= exposure; + color = ((color * (A * color + C * B) + D * E) / (color * (A * color + B) + D * F)) - E / F; + float white = ((W * (A * W + C * B) + D * E) / (W * (A * W + B) + D * F)) - E / F; + color /= white; + color = pow(color, vec3(1. / Gamma)); + return color; +} + +vec3 ReshadeToneMap(vec3 inputColor) { + vec3 color = inputColor; + color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog + color *= Exposure / (1.0 + color / Exposure); + color = pow(color, vec3(1. / Gamma)); // Gamma + + const vec3 coefLuma = vec3(0.2126, 0.7152, 0.0722); + float lum = dot(coefLuma, color); + + float L = clamp(10.0 * (lum - 0.45), 0.0, 1.0); + vec3 A2 = Bleach * color; + + vec3 result1 = 2.0f * color * lum; + vec3 result2 = 1.0f - 2.0f * (1.0f - lum) * (1.0f - color); + + vec3 newColor = mix(result1, result2, L); + vec3 mixRGB = A2 * newColor; + color += ((1.0f - A2) * mixRGB); + + vec3 middlegray = vec3(dot(color, vec3(1.0 / 3.0))); + vec3 diffcolor = color - middlegray; + + color = (color + diffcolor * sat) / (1 + (diffcolor * sat)); // saturation + + return color; +} + +float getL601(vec3 rgb) { + return dot(rgb, vec3(0.2989, 0.5866, 0.1145)); +} + +float getL709(vec3 rgb) { + return dot(rgb, vec3(0.2126, 0.7152, 0.0722)); +} + +vec3 BotWToneMap(vec3 color) { + float Lumn = getL601(color); + vec4 exptm = 1.0 - exp(-vec4(color, Lumn)); + vec3 cpre = exptm.w / Lumn * color; + vec3 colorldr = mix(cpre, exptm.rgb, vec3(pow(exptm.w, 2.0)));//refine + return colorldr; +} +vec3 ACESFilm(vec3 color) { + color *= Exposure; + float Lumn = getL709(color); + vec4 tm = vec4(color, Lumn); + tm = (tm*(2.51*tm + 0.03)) / (tm*(2.43*tm + 0.59) + 0.14); // tonemap + vec3 cpre = tm.w / Lumn * color; + vec3 colorldr = mix(cpre, tm.rgb, vec3(pow(tm.w, 2.0)));//refine + return colorldr; +} + +//Curves + +vec3 CurvesPass(vec3 inputColor) { + vec3 colorInput = inputColor; + float Contrast_blend = Contrast * 2.0; //I multiply by two to give it a strength closer to the other curves. + vec3 x = colorInput.rgb; //if the curve should be applied to both Luma and Chroma + x = x * (x * (1.5 - x) + 0.5); //horner form - fastest version + vec3 color = x; //if the curve should be applied to both Luma and Chroma + colorInput.rgb = mix(colorInput.rgb, color, Contrast_blend); //Blend by Contrast + return colorInput; +} + +//TECHNICOLOR2 + +vec3 Technicolor2(vec3 inputColor) { + vec3 color = inputColor; + vec3 Color_Strength = vec3(Technicolor2_Red_Strength, Technicolor2_Green_Strength, Technicolor2_Blue_Strength); + vec3 source = color; + vec3 temp = 1.0 - source; + vec3 target = temp.grg; + vec3 target2 = temp.bbr; + vec3 temp2 = source * target; + temp2 *= target2; + + temp = temp2 * Color_Strength; + temp2 *= Technicolor2_Brightness; + + target = temp.grg; + target2 = temp.bbr; + + temp = source - target; + temp += temp2; + temp2 = temp - target2; + + color = mix(source, temp2, Technicolor2_Strength); + + color = mix(vec3(dot(color, vec3(0.333))), color, Technicolor2_Saturation); + + return color; +} + +//Technicolor +vec3 TechnicolorPass(vec3 color) +{ + + const vec3 cyanfilter = vec3(0.0, 1.30, 1.0); + const vec3 magentafilter = vec3(1.0, 0.0, 1.05); + const vec3 yellowfilter = vec3(1.6, 1.6, 0.05); + const vec2 redorangefilter = vec2(1.05, 0.620); // RG_ + const vec2 greenfilter = vec2(0.30, 1.0); // RG_ + const vec2 magentafilter2 = magentafilter.rb; // R_B + + vec3 tcol = color.rgb; + + vec2 negative_mul_r = tcol.rg * (1.0 / (RGBNegativeAmount.r * Power)); + vec2 negative_mul_g = tcol.rg * (1.0 / (RGBNegativeAmount.g * Power)); + vec2 negative_mul_b = tcol.rb * (1.0 / (RGBNegativeAmount.b * Power)); + vec3 output_r = dot(redorangefilter, negative_mul_r).xxx + cyanfilter; + vec3 output_g = dot(greenfilter, negative_mul_g).xxx + magentafilter; + vec3 output_b = dot(magentafilter2, negative_mul_b).xxx + yellowfilter; + + return mix(tcol, output_r * output_g * output_b, Strength); +} + +//ColorMatrix +vec3 ColorMatrixPass(vec3 inputColor) +{ + vec3 color = inputColor; + + const mat3 ColorMatrix = mat3(ColorMatrix_Red, ColorMatrix_Green, ColorMatrix_Blue); + //color = mix(color, * (ColorMatrix, color), CM_Strength); + color *= mix(color, (ColorMatrix, color), CM_Strength); + return clamp(color, 0.0, 1.); +} + +// Contrasty + +vec3 BotWVibrance(vec3 color) { + float avg = (color.r + color.g + color.b) / 3.0; + float maxc = max(color.r, max(color.g, color.b)); + float w = 1.0 - pow(1.0 - 2.0 * avg, 2.0); + float weight = 1.0 + w * satFactor; + vec3 satcolor = mix(vec3(maxc), color, weight); + return satcolor; +} + +vec3 ReshadeVibrance(vec3 color) { + float max_color = max(color.r, max(color.g, color.b)); // Find the strongest color + float min_color = min(color.r, min(color.g, color.b)); // Find the weakest color + float luma = getL709(color); + float color_saturation = max_color - min_color; // The difference between the two is the saturation + vec3 coeffVibrance = VibranceRGBBalance * Vibrance; + color = mix(vec3(luma), color, 1.0 + (coeffVibrance * (1.0 - (sign(coeffVibrance) * color_saturation)))); + return color; +} + +vec3 Contrasty(vec3 fColour) { + fColour = max(vec3(0.0), fColour - vec3(crushContrast)); + fColour = clamp(Exposure * fColour, 0.0, 1.0); + fColour = pow(fColour, vec3(1.0 / Gamma)); + fColour = ReshadeVibrance(fColour); // reshade's identical, only a little stronger when at same setting + return fColour; +} + +// Levels + +vec3 LevelsPass(vec3 inputColor) { + float black_point_float = BlackPoint / 255.0; + float white_point_float = WhitePoint == BlackPoint ? (255.0 / 0.00025) : (255.0 / (WhitePoint - BlackPoint)); // Avoid division by zero if the white and black point are the same + + vec3 color = inputColor; + color = color * white_point_float - (black_point_float * white_point_float); + + return color; +} + +//FilmPass +vec3 FilmPass(vec3 inputColor) { + + vec3 B = inputColor.rgb; + vec3 G = B; + vec3 H = vec3(0.01); + + B = clamp(B, 0.0, 1.); + B = pow(vec3(B), vec3(Linearization)); + B = mix(H, B, Filmic_Contrast); + + vec3 LumCoeff = vec3(0.2126, 0.7152, 0.0722); + float A = dot(B.rgb, LumCoeff); + vec3 D = vec3(A); + + B = pow(B, 1.0 / vec3(BaseGamma)); + + float RedCurve = 1.0; + float GreenCurve = 1.0; + float BlueCurve = 1.0; + float a = RedCurve; + float b = GreenCurve; + float c = BlueCurve; + float d = BaseCurve; + + float y = 1.0 / (1.0 + exp(a / 2.0)); + float z = 1.0 / (1.0 + exp(b / 2.0)); + float w = 1.0 / (1.0 + exp(c / 2.0)); + float v = 1.0 / (1.0 + exp(d / 2.0)); + + vec3 C = B; + + D.r = (1.0 / (1.0 + exp(-a * (D.r - 0.5))) - y) / (1.0 - 2.0 * y); + D.g = (1.0 / (1.0 + exp(-b * (D.g - 0.5))) - z) / (1.0 - 2.0 * z); + D.b = (1.0 / (1.0 + exp(-c * (D.b - 0.5))) - w) / (1.0 - 2.0 * w); + + D = pow(D, 1.0 / vec3(EffectGamma)); + + vec3 Di = 1.0 - D; + + D = mix(D, Di, Filmic_Bleach); + float EffectGammaR = 1.0; + float EffectGammaG = 1.0; + float EffectGammaB = 1.0; + D.r = pow(abs(D.r), 1.0 / EffectGammaR); + D.g = pow(abs(D.g), 1.0 / EffectGammaG); + D.b = pow(abs(D.b), 1.0 / EffectGammaB); + + if (D.r < 0.5) + C.r = (2.0 * D.r - 1.0) * (B.r - B.r * B.r) + B.r; + else + C.r = (2.0 * D.r - 1.0) * (sqrt(B.r) - B.r) + B.r; + + if (D.g < 0.5) + C.g = (2.0 * D.g - 1.0) * (B.g - B.g * B.g) + B.g; + else + C.g = (2.0 * D.g - 1.0) * (sqrt(B.g) - B.g) + B.g; + + if (D.b < 0.5) + C.b = (2.0 * D.b - 1.0) * (B.b - B.b * B.b) + B.b; + else + C.b = (2.0 * D.b - 1.0) * (sqrt(B.b) - B.b) + B.b; + + vec3 F = mix(B, C, Filmic_Strength); + + F = (1.0 / (1.0 + exp(-d * (F - 0.5))) - v) / (1.0 - 2.0 * v); + + float r2R = 1.0 - Saturation; + float g2R = 0.0 + Saturation; + float b2R = 0.0 + Saturation; + + float r2G = 0.0 + Saturation; + float g2G = (1.0 - Fade) - Saturation; + float b2G = (0.0 + Fade) + Saturation; + + float r2B = 0.0 + Saturation; + float g2B = (0.0 + Fade) + Saturation; + float b2B = (1.0 - Fade) - Saturation; + + vec3 iF = F; + + F.r = (iF.r * r2R + iF.g * g2R + iF.b * b2R); + F.g = (iF.r * r2G + iF.g * g2G + iF.b * b2G); + F.b = (iF.r * r2B + iF.g * g2B + iF.b * b2B); + + float N = dot(F.rgb, LumCoeff); + vec3 Cn = F; + + if (N < 0.5) + Cn = (2.0 * N - 1.0) * (F - F * F) + F; + else + Cn = (2.0 * N - 1.0) * (sqrt(F) - F) + F; + + Cn = pow(max(Cn, 0), 1.0 / vec3(Linearization)); + + vec3 Fn = mix(B, Cn, Filmic_Strength); + return Fn; +} + +//DPX +const mat3 RGB = mat3( + 2.6714711726599600, -1.2672360578624100, -0.4109956021722270, + -1.0251070293466400, 1.9840911624108900, 0.0439502493584124, + 0.0610009456429445, -0.2236707508128630, 1.1590210416706100 +); +const mat3 XYZ = mat3( + 0.5003033835433160, 0.3380975732227390, 0.1645897795458570, + 0.2579688942747580, 0.6761952591447060, 0.0658358459823868, + 0.0234517888692628, 0.1126992737203000, 0.8668396731242010 +); +vec3 DPXPass(vec3 inputColor) +{ + vec3 color = inputColor; + + vec3 B = color; + B = B * (1.0 - DPX_Contrast) + (0.5 * DPX_Contrast); + vec3 Btemp = (1.0 / (1.0 + exp(RGB_Curve / 2.0))); + B = ((1.0 / (1.0 + exp(-RGB_Curve * (B - RGB_C)))) / (-2.0 * Btemp + 1.0)) + (-Btemp / (-2.0 * Btemp + 1.0)); + + float value = max(max(B.r, B.g), B.b); + vec3 Ztemp = B / value; + color = pow(abs(color), 1. / vec3(Colorfulness)); + + vec3 c0 = Ztemp * value; + c0 *= (XYZ, c0); + float luma = dot(c0, vec3(0.30, 0.59, 0.11)); + c0 = (1.0 - DPX_Saturation) * luma + DPX_Saturation * c0; + c0 *= (RGB, c0); + + return mix(color, c0, DPX_Strength); +} + +//Lift Gamma Gain + +vec3 LiftGammaGainPass(vec3 colorInput) +{ + // -- Get input -- + vec3 color = colorInput; + + // -- Lift -- + + color = color * (1.5 - 0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5; + color = clamp(color, 0.0, 1.0); //isn't strictly necessary, but doesn't cost performance. + + // -- Gain -- + color *= RGB_Gain; + + // -- Gamma -- + color = pow(color, 1.0 / RGB_Gamma); //Gamma + + // -- Return output -- + return clamp(color, 0.0, 1.0); +} + +//VibrancePass +vec3 VibrancePass(vec3 color) { + + const vec3 coefLuma = vec3(0.2126, 0.7152, 0.0722); + float luma = dot(coefLuma, color); + + float max_color = max(color.r, max(color.g, color.b)); // Find the strongest color + float min_color = min(color.r, min(color.g, color.b)); // Find the weakest color + + float color_saturation = max_color - min_color; // The difference between the two is the saturation + + // Extrapolate between luma and original by 1 + (1-saturation) - current + vec3 coeffVibrance = VibranceRGBBalance * Vibrance; + + color = mix(vec3(luma), color, 1.0 + (coeffVibrance * (1.0 - (sign(coeffVibrance) * color_saturation)))); + + return color; +} + +//LumaShapening + +#define px (1.0/1280.0*uf_fragCoordScale.x) +#define py (1.0/720.0*uf_fragCoordScale.y) +#define CoefLuma vec3(0.2126, 0.7152, 0.0722) + +float lumasharping(sampler2D tex, vec2 pos) { + vec4 colorInput = texture(tex, pos); + + vec3 ori = colorInput.rgb; + + // -- Combining the strength and luma multipliers -- + vec3 sharp_strength_luma = (CoefLuma * sharp_strength); + + // -- Gaussian filter -- + // [ .25, .50, .25] [ 1 , 2 , 1 ] + // [ .50, 1, .50] = [ 2 , 4 , 2 ] + // [ .25, .50, .25] [ 1 , 2 , 1 ] + + vec3 blur_ori = texture(tex, pos + vec2(px, -py) * 0.5 * offset_bias).rgb; // South East + blur_ori += texture(tex, pos + vec2(-px, -py) * 0.5 * offset_bias).rgb; // South West + blur_ori += texture(tex, pos + vec2(px, py) * 0.5 * offset_bias).rgb; // North East + blur_ori += texture(tex, pos + vec2(-px, py) * 0.5 * offset_bias).rgb; // North West + + blur_ori *= 0.25; // ( /= 4) Divide by the number of texture fetches + + // -- Calculate the sharpening -- + vec3 sharp = ori - blur_ori; //Subtracting the blurred image from the original image + + // -- Adjust strength of the sharpening and clamp it-- + vec4 sharp_strength_luma_clamp = vec4(sharp_strength_luma * (0.5 / sharp_clamp), 0.5); //Roll part of the clamp into the dot + + float sharp_luma = clamp((dot(vec4(sharp, 1.0), sharp_strength_luma_clamp)), 0.0, 1.0); //Calculate the luma, adjust the strength, scale up and clamp + sharp_luma = (sharp_clamp * 2.0) * sharp_luma - sharp_clamp; //scale down + + return sharp_luma; +} + +//Fake High Dynamic Range. + +vec3 HDRPass(sampler2D tex, vec2 pos) { + vec3 color = texture(tex, pos).rgb; + + vec3 bloom_sum1 = texture(tex, pos + vec2(1.5, -1.5) * radius1 * vec2(px, py)).rgb; + bloom_sum1 += texture(tex, pos + vec2(-1.5, -1.5) * radius1 * vec2(px, py)).rgb; + bloom_sum1 += texture(tex, pos + vec2(1.5, 1.5) * radius1 * vec2(px, py)).rgb; + bloom_sum1 += texture(tex, pos + vec2(-1.5, 1.5) * radius1 * vec2(px, py)).rgb; + bloom_sum1 += texture(tex, pos + vec2(0.0, -2.5) * radius1 * vec2(px, py)).rgb; + bloom_sum1 += texture(tex, pos + vec2(0.0, 2.5) * radius1 * vec2(px, py)).rgb; + bloom_sum1 += texture(tex, pos + vec2(-2.5, 0.0) * radius1 * vec2(px, py)).rgb; + bloom_sum1 += texture(tex, pos + vec2(2.5, 0.0) * radius1 * vec2(px, py)).rgb; + + bloom_sum1 *= 0.005; + + vec3 bloom_sum2 = texture(tex, pos + vec2(1.5, -1.5) * radius2 * vec2(px, py)).rgb; + bloom_sum2 += texture(tex, pos + vec2(-1.5, -1.5) * radius2 * vec2(px, py)).rgb; + bloom_sum2 += texture(tex, pos + vec2(1.5, 1.5) * radius2 * vec2(px, py)).rgb; + bloom_sum2 += texture(tex, pos + vec2(-1.5, 1.5) * radius2 * vec2(px, py)).rgb; + bloom_sum2 += texture(tex, pos + vec2(0.0, -2.5) * radius2 * vec2(px, py)).rgb; + bloom_sum2 += texture(tex, pos + vec2(0.0, 2.5) * radius2 * vec2(px, py)).rgb; + bloom_sum2 += texture(tex, pos + vec2(-2.5, 0.0) * radius2 * vec2(px, py)).rgb; + bloom_sum2 += texture(tex, pos + vec2(2.5, 0.0) * radius2 * vec2(px, py)).rgb; + + bloom_sum2 *= 0.010; + + float dist = radius2 - radius1; + vec3 HDR = (color + (bloom_sum2 - bloom_sum1)) * dist; + + vec3 blend = HDR + color; + color = pow(abs(blend), vec3(abs(HDRPower))) + HDR; + + return color; +} + +void main() +{ + //Bloom + vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; +#if (adjust_bloom == 1) + bloom *= bloomFactor; +#endif + + //HDR and LumaShapening +#if (HDRpassing == 1) + passPixelColor0.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy).xyz; +#endif +#if (HDRpassing == 0) + passPixelColor0.xyz = texture(textureUnitPS1, passParameterSem0.xy).xyz; +#endif +#if (lumapassing == 1) + float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); + passPixelColor0.xyz += vec3(smask); +#endif + + // Do not edit this + vec3 color = (passPixelColor0.xyz); + color += bloom; + //++++++++++++++++++++++++++++++++++ + + // Tonemapping +#if (Tone_map == -1) + color = clamp(color*Exposure, 0.0, 1.0); +#elif (Tone_map == 0) + color = BotWToneMap(color); +#elif (Tone_map == 1) + color = ReshadeToneMap(color); +#elif (Tone_map == 2) + color = linearToneMapping(color); +#elif (Tone_map == 3) + color = simpleReinhardToneMapping(color); +#elif (Tone_map == 4) + color = lumaBasedReinhardToneMapping(color); +#elif (Tone_map == 5) + color = whitePreservingLumaBasedReinhardToneMapping(color); +#elif (Tone_map == 6) + color = RomBinDaHouseToneMapping(color); +#elif (Tone_map == 7) + color = filmicToneMapping(color); +#elif (Tone_map == 8) + color = Uncharted2ToneMapping(color); +#elif (tone_mapping == 9) + color = ACESFilm(color); +#endif + + // Levels Control if we tone map to 16-235 , 0 - 255 or usr defined range. +#if (blacknwhitepass == 1) + color = LevelsPass(color); +#endif + + // Color matrix +#if (cmatrix == 1) + color = ColorMatrixPass(color); +#endif + + + // Post Processing +#if (Tech == 1) + color = TechnicolorPass(color); +#endif +#if (Techine == 1) + color = Technicolor2(color); +#endif +#if (post_process == 0) + color = BotWVibrance(color); +#endif +#if (post_process == 1) + color = Contrasty(color); +#endif +#if (dpxpass == 1) + color = DPXPass(color); +#endif +#if (Filmicpass == 1) + color = FilmPass(color); +#endif +#if (lggpass == 1) + color = LiftGammaGainPass(color); +#endif +#if (CurvesPss == 1) + color = CurvesPass(color); +#endif +#if (vibpass == 1) + color = VibrancePass(color); +#endif + passPixelColor0 = vec4(color, passParameterSem0.w); +} diff --git a/Enhancements/BreathOfTheWild_Clarity/how_to_make_your_own_preset.txt b/Enhancements/BreathOfTheWild_Clarity/how_to_make_your_own_preset.txt index 808688ae..912e70f1 100644 --- a/Enhancements/BreathOfTheWild_Clarity/how_to_make_your_own_preset.txt +++ b/Enhancements/BreathOfTheWild_Clarity/how_to_make_your_own_preset.txt @@ -1,53 +1,53 @@ - - -- How to set up your own Clarity Preset -- - -=================================================================== - - Hey, it's Serfrost. I'm writing this out because it's come to our attention that no matter what we really do for presets, it won't really matter in the long run. Every user has a unique monitor / display they use with their PC, yeah? A lot of them are calibrated differently, and they often come with numerous presets that alter colors, brightness, contrast, you name it. Because of this, the presets that look good to me might not look good to you--the presets that look good to Jamie might not look good to you; you get the idea. So I'm writing this hoping you'll take the time to do a few short steps to get you on your way to making the game look the way YOU want it to look on YOUR display! - - Jamie has coded this faithfully and diligently, and he's added a lot of different functions that were previously unavailable with these newer updates. We hope you enjoy this and use it to it's fullest potential. - - This tutorial has been shortened by Slash in order to make use of the new graphic pack to its full potential. - -=================================================================== - - There are 6 steps total. Please read very carefully and with your full attention. As long as you do that, it's relatively just "point and click" and the rest is changing the numbers on your own and testing them to see what they do. - -=================================================================== - - -1) Open up Cemu that's at least version 1.13.0. - - -2) After Cemu opens itself, load the game and your save file. - - -3) Open up the graphic pack menu and select Clarity under Breath of the Wild. - - -4) Open up 37040a485a29d54e_00000000000003c9_ps.txt in the Clarity graphic pack folder. - - -5) You may now edit all the variables in realtime. To view your changes hit "Reload shaders" - - -===============\ - - Note: "Realtime", as in, you can view your changes by using the button. You do not have to stop the game, etc. - - Pro Tip: If time changes too fast for you, you can use Cemuhook's custom timer option (Debug > Custom Timer) to slow down time to 0.125x! - - MAKE SURE YOU CHECK VARIOUS AREAS IN THE GAME TO MAKE SURE YOUR COLOR / SHADOW BALANCING IS CORRECT. - -===============/ - - -6) When you have your variables for your preset where you want them, you don't have to do anything! The file with your preset is already saved. - - -- Make backups of files before making changes. Keep track of your work! -- - - === - - MAKE SURE YOU CHECK VARIOUS AREAS IN THE GAME TO MAKE SURE YOUR COLOR / SHADOW BALANCING IS CORRECT. - + + -- How to set up your own Clarity Preset -- + +=================================================================== + + Hey, it's Serfrost. I'm writing this out because it's come to our attention that no matter what we really do for presets, it won't really matter in the long run. Every user has a unique monitor / display they use with their PC, yeah? A lot of them are calibrated differently, and they often come with numerous presets that alter colors, brightness, contrast, you name it. Because of this, the presets that look good to me might not look good to you--the presets that look good to Jamie might not look good to you; you get the idea. So I'm writing this hoping you'll take the time to do a few short steps to get you on your way to making the game look the way YOU want it to look on YOUR display! + + Jamie has coded this faithfully and diligently, and he's added a lot of different functions that were previously unavailable with these newer updates. We hope you enjoy this and use it to it's fullest potential. + + This tutorial has been shortened by Slash in order to make use of the new graphic pack to its full potential. + +=================================================================== + + There are 6 steps total. Please read very carefully and with your full attention. As long as you do that, it's relatively just "point and click" and the rest is changing the numbers on your own and testing them to see what they do. + +=================================================================== + + +1) Open up Cemu that's at least version 1.13.0. + + +2) After Cemu opens itself, load the game and your save file. + + +3) Open up the graphic pack menu and select Clarity under Breath of the Wild. + + +4) Open up 37040a485a29d54e_00000000000003c9_ps.txt in the Clarity graphic pack folder. + + +5) You may now edit all the variables in realtime. To view your changes hit "Reload shaders" + + +===============\ + + Note: "Realtime", as in, you can view your changes by using the button. You do not have to stop the game, etc. + + Pro Tip: If time changes too fast for you, you can use Cemuhook's custom timer option (Debug > Custom Timer) to slow down time to 0.125x! + + MAKE SURE YOU CHECK VARIOUS AREAS IN THE GAME TO MAKE SURE YOUR COLOR / SHADOW BALANCING IS CORRECT. + +===============/ + + +6) When you have your variables for your preset where you want them, you don't have to do anything! The file with your preset is already saved. + + -- Make backups of files before making changes. Keep track of your work! -- + + === + + MAKE SURE YOU CHECK VARIOUS AREAS IN THE GAME TO MAKE SURE YOUR COLOR / SHADOW BALANCING IS CORRECT. + === \ No newline at end of file diff --git a/Enhancements/BreathOfTheWild_Clarity/rules.txt b/Enhancements/BreathOfTheWild_Clarity/rules.txt index 52490d34..756f25df 100644 --- a/Enhancements/BreathOfTheWild_Clarity/rules.txt +++ b/Enhancements/BreathOfTheWild_Clarity/rules.txt @@ -1,50 +1,50 @@ -[Definition] -titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "Clarity (NOT COMPATIBLE WITH MONOCHROMIA)" -path = "The Legend of Zelda: Breath of the Wild/Enhancements/Clarity" -description = "NOT COMPATIBLE WITH MONOCHROMIA! Select the visual look of the game that you'll like with these hand-made presets that adjusts saturation, vibrance, colors and more. You can select a preset. Selecting "User Defined" requires having made your own preset, check the "BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt" file in your graphicPack folder to create one." -version = 3 - -[Preset] -name = Serfrost Preset (Default) -$preset:int = 10 - -[Preset] -name = Serfrost Preset (Dim Display) -$preset:int = 9 - -[Preset] -name = Serfrost Preset (Bright Display) -$preset:int = 8 - -[Preset] -name = Bruz Preset -$preset:int = 1 - -[Preset] -name = CellHunter Preset -$preset:int = 7 - -[Preset] -name = Jamie Preset -$preset:int = 3 - -[Preset] -name = BSoD Gaming Preset -$preset:int = 2 - -[Preset] -name = The Complaining Gamer Preset -$preset:int = 5 - -[Preset] -name = Contrasty Preset -$preset:int = 4 - -[Preset] -name = Filmic Preset Preset -$preset:int = 6 - -[Preset] -name = User Defined Preset -$preset:int = 0 +[Definition] +titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 +name = "Clarity (NOT COMPATIBLE WITH MONOCHROMIA)" +path = "The Legend of Zelda: Breath of the Wild/Enhancements/Clarity" +description = "NOT COMPATIBLE WITH MONOCHROMIA! Select the visual look of the game that you'll like with these hand-made presets that adjusts saturation, vibrance, colors and more. You can select a preset. Selecting "User Defined" requires having made your own preset, check the "BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt" file in your graphicPack folder to create one." +version = 3 + +[Preset] +name = Serfrost Preset (Default) +$preset:int = 10 + +[Preset] +name = Serfrost Preset (Dim Display) +$preset:int = 9 + +[Preset] +name = Serfrost Preset (Bright Display) +$preset:int = 8 + +[Preset] +name = Bruz Preset +$preset:int = 1 + +[Preset] +name = CellHunter Preset +$preset:int = 7 + +[Preset] +name = Jamie Preset +$preset:int = 3 + +[Preset] +name = BSoD Gaming Preset +$preset:int = 2 + +[Preset] +name = The Complaining Gamer Preset +$preset:int = 5 + +[Preset] +name = Contrasty Preset +$preset:int = 4 + +[Preset] +name = Filmic Preset Preset +$preset:int = 6 + +[Preset] +name = User Defined Preset +$preset:int = 0 diff --git a/Enhancements/BreathOfTheWild_LODBias/rules.txt b/Enhancements/BreathOfTheWild_LODBias/rules.txt new file mode 100644 index 00000000..564339d9 --- /dev/null +++ b/Enhancements/BreathOfTheWild_LODBias/rules.txt @@ -0,0 +1,40 @@ +[Definition] +titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 +name = "Level Of Detail Bias" +path = "The Legend of Zelda: Breath of the Wild/Enhancements/LOD Bias" +description = "Level of details adjustment" +version = 3 + +[Preset] +name = Normal (Default) +$lodBias = 0 + +[Preset] +name = Lowest +$lodBias = +16 + +[Preset] +name = Very Low +$lodBias = +8 + +[Preset] +name = Low +$lodBias = +4 + +[Preset] +name = High +$lodBias = -4 + +[Preset] +name = Ultra +$lodBias = -8 + +[Preset] +name = Extreme +$lodBias = -16 + + + +[TextureRedefine] +formats = 0x31,0x32,0x34,0x35,0x431,0x432,0x433,0x234,0x235 +overwriteRelativeLodBias = $lodBias diff --git a/Enhancements/FatalFrameProjectZero_FilmGrain/rules.txt b/Enhancements/FatalFrameProjectZero_FilmGrain/rules.txt new file mode 100644 index 00000000..13028cc1 --- /dev/null +++ b/Enhancements/FatalFrameProjectZero_FilmGrain/rules.txt @@ -0,0 +1,50 @@ +[Definition] +titleIds = 00050000101D0300,00050000101D0600,000500001014D200,00050000101D3F00 +name = Film Grain +path = "Fatal Frame - Project Zero: Maiden of Black Water/Enhancements/Film Grain" +description = Allows you to adjust how strong the film grain effect is. +version = 3 + +[Preset] +name = Default Size +$width = 1280 +$height = 720 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = Medium Size +$width = 960 +$height = 540 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = Big Size +$width = 640 +$height = 360 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = Disabled +$width = 0 +$height = 0 +$gameWidth = 1280 +$gameHeight = 720 + +#------------------------------------ + +[TextureRedefine] +width = 320 +height = 192 +formats = 0x806 +overwriteWidth = ($width/$gameWidth)*320 +overwriteHeight = ($height/$gameHeight)*192 + +[TextureRedefine] +width = 320 +height = 180 +formats = 0x806 +overwriteWidth = ($width/$gameWidth)*320 +overwriteHeight = ($height/$gameHeight)*180 diff --git a/Enhancements/FatalFrameProjectZero_LODBias/rules.txt b/Enhancements/FatalFrameProjectZero_LODBias/rules.txt new file mode 100644 index 00000000..16331d64 --- /dev/null +++ b/Enhancements/FatalFrameProjectZero_LODBias/rules.txt @@ -0,0 +1,38 @@ +[Definition] +titleIds = 00050000101D0300,00050000101D0600,000500001014D200,00050000101D3F00 +name = "LOD Bias" +path = "Fatal Frame - Project Zero: Maiden of Black Water/Enhancements/LOD Bias" +description = "Level of details adjustment" +version = 3 + +[Preset] +name = Normal (Default) +$lodBias = 0 + +[Preset] +name = Lowest +$lodBias = +16 + +[Preset] +name = Very Low +$lodBias = +8 + +[Preset] +name = Low +$lodBias = +4 + +[Preset] +name = High +$lodBias = -4 + +[Preset] +name = Ultra +$lodBias = -8 + +[Preset] +name = Extreme +$lodBias = -16 + +[TextureRedefine] +formats = 0x31,0x32,0x34,0x35,0x431,0x432,0x433,0x234,0x235 +overwriteRelativeLodBias = $lodBias diff --git a/Source/BreathOfTheWild_Resolution/rules.txt b/Source/BreathOfTheWild_Resolution/rules.txt index 6fffcea1..3354a277 100644 --- a/Source/BreathOfTheWild_Resolution/rules.txt +++ b/Source/BreathOfTheWild_Resolution/rules.txt @@ -220,10 +220,10 @@ $gameHeight = 720 # - 0x019=Menu Interface/GUI # - 0x01a=Normals # - 0x41a=Geometry rendering -# - 0x806=World Fog +# - 0x806=Wind/Fog # - 0x80e=Depth stencil buffer # - 0x816=Weapon and Objects Bloom -# - 0x820=Fog/Wind +# - 0x820=Field Fog # Depth/Geometry/Shading Rendering [TextureRedefine] @@ -260,9 +260,9 @@ overwriteHeight = ($height/$gameHeight)* 480 # - 0x019=GUI # - 0x01a=Blurs and Normals # - 0x80e=World and Objects Depth 32bit -# - 0x806=World Fog +# - 0x806=Wind/Fog # - 0x816=World & Weapon Bloom -# - 0x820=Fog/Wind? +# - 0x820=Fog # Required 1/2 resolutions [TextureRedefine] @@ -450,7 +450,7 @@ overwriteHeight = ($height/$gameHeight)* 75 [TextureRedefine] width = 128 height = 48 -formats = 0x806 +formats = 0x806,0x816,0x005,0x820 overwriteWidth = ($width/$gameWidth) * 128 overwriteHeight = ($height/$gameHeight) * 48 @@ -594,6 +594,76 @@ formats = 0x005 overwriteWidth = ($width/$gameWidth) * 2048 overwriteHeight = ($height/$gameHeight) * 2048 +# Select-Menu Map +[TextureRedefine] +width = 1504 +height = 720 +formats = 0x019 +overwriteWidth = ($width/$gameWidth) * 1504 +overwriteHeight = ($height/$gameHeight) * 720 + +# Select-Menu Map +[TextureRedefine] +width = 1500 +height = 720 +formats = 0x019 +overwriteWidth = ($width/$gameWidth) * 1500 +overwriteHeight = ($height/$gameHeight) * 720 + +# Select-Menu Map Overlay +[TextureRedefine] +width = 1280 +height = 608 +formats = 0x019 +overwriteWidth = ($width/$gameWidth) * 1280 +overwriteHeight = ($height/$gameHeight) * 608 + +# Mini-map GUI +[TextureRedefine] +width = 192 +height = 192 +formats = 0x019 +overwriteWidth = ($width/$gameWidth) * 192 +overwriteHeight = ($height/$gameHeight) * 192 + +# Red Viewport +[TextureRedefine] +width = 1920 +height = 912 +formats = 0x001 +overwriteWidth = ($width/$gameWidth) * 1920 +overwriteHeight = ($height/$gameHeight) * 912 + +# Red Viewports Smaller Scales +[TextureRedefine] +width = 64 +height = 45 +formats = 0x806 +overwriteWidth = ($width/$gameWidth) * 64 +overwriteHeight = ($height/$gameHeight) * 45 + +[TextureRedefine] +width = 64 +height = 48 +formats = 0x806 +overwriteWidth = ($width/$gameWidth) * 64 +overwriteHeight = ($height/$gameHeight) * 48 + +[TextureRedefine] +width = 64 +height = 32 +formats = 0x806 +overwriteWidth = ($width/$gameWidth) * 64 +overwriteHeight = ($height/$gameHeight) * 32 + +[TextureRedefine] +width = 32 +height = 23 +formats = 0x806 +overwriteWidth = ($width/$gameWidth) * 32 +overwriteHeight = ($height/$gameHeight) * 23 + + # Disabled since they break stuff # Minimap diff --git a/Source/FatalFrameProjectZero_Resolution/patches.txt b/Source/FatalFrameProjectZero_Resolution/patches.txt new file mode 100644 index 00000000..d1155d07 --- /dev/null +++ b/Source/FatalFrameProjectZero_Resolution/patches.txt @@ -0,0 +1,61 @@ +[USAFatalFrameV0] +moduleMatches = 0xE93B31F6 + +codeCaveSize = 0x4 + +_pointSpriteSize = 0x00000000 +0x00000000 = .int $width + +0x026D0674 = lis r12, _pointSpriteSize@ha +0x026D067C = lwz r5, _pointSpriteSize@l(r12) +0x026D0680 = lwz r6, _pointSpriteSize@l(r12) + + +[EuropeFatalFrameV0] +moduleMatches = 0xB54DBEB0 + +codeCaveSize = 0x4 + +_pointSpriteSize = 0x00000000 +0x00000000 = .int $width + +0x026CF508 = lis r12, _pointSpriteSize@ha +0x026CF510 = lwz r5, _pointSpriteSize@l(r12) +0x026CF514 = lwz r6, _pointSpriteSize@l(r12) + + +[EuropeProjectZeroV0P1] +moduleMatches = 0x5A9D6D31 + +codeCaveSize = 0x4 + +_pointSpriteSize = 0x00000000 +0x00000000 = .int $width + +0x026CF508 = lis r12, _pointSpriteSize@ha +0x026CF510 = lwz r5, _pointSpriteSize@l(r12) +0x026CF514 = lwz r6, _pointSpriteSize@l(r12) + +[EuropeProjectZeroV0P2] +moduleMatches = 0x360FA109 + +codeCaveSize = 0x4 + +_pointSpriteSize = 0x00000000 +0x00000000 = .int $width + +0x026CF508 = lis r12, _pointSpriteSize@ha +0x026CF510 = lwz r5, _pointSpriteSize@l(r12) +0x026CF514 = lwz r6, _pointSpriteSize@l(r12) + +[EuropeProjectZeroV0P3] +moduleMatches = 0x9D96F19B + +codeCaveSize = 0x4 + +_pointSpriteSize = 0x00000000 +0x00000000 = .int $width + +0x026CF508 = lis r12, _pointSpriteSize@ha +0x026CF510 = lwz r5, _pointSpriteSize@l(r12) +0x026CF514 = lwz r6, _pointSpriteSize@l(r12) \ No newline at end of file diff --git a/Source/FatalFrameProjectZero_Resolution/rules.txt b/Source/FatalFrameProjectZero_Resolution/rules.txt new file mode 100644 index 00000000..6d6aab25 --- /dev/null +++ b/Source/FatalFrameProjectZero_Resolution/rules.txt @@ -0,0 +1,226 @@ +[Definition] +titleIds = 00050000101D0600,00050000101D0300,000500001014D200,00050000101D3F00 +name = Resolution +path = "Fatal Frame - Project Zero: Maiden of Black Water/Graphics/Resolution" +description = Changes the games resolution. You cannot change resolutions on the fly. +version = 3 + +[Preset] +name = 1280x720 (Default) +$width = 1280 +$height = 720 +$gameWidth = 1280 +$gameHeight = 720 + +// For [16:9], choose resolutions that are multiples of 320x180 +// Performance + +[Preset] +name = 320x180 +$width = 320 +$height = 180 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 640x360 +$width = 640 +$height = 360 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 960x540 +$width = 960 +$height = 540 +$gameWidth = 1280 +$gameHeight = 720 + +// Quality + +[Preset] +name = 1920x1080 +$width = 1920 +$height = 1080 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 2560x1440 +$width = 2560 +$height = 1440 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 3200x1800 +$width = 3200 +$height = 1800 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 3840x2160 +$width = 3840 +$height = 2160 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 5120x2880 +$width = 5120 +$height = 2880 +$gameWidth = 1280 +$gameHeight = 720 + +// Enthusiast + +[Preset] +name = 7680x4320 +$width = 7680 +$height = 4320 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 10240x5760 +$width = 10240 +$height = 5760 +$gameWidth = 1280 +$gameHeight = 720 + + +# ----------------------------------------------------------------------------------------------------------------------------------------------- +# ----------------------------------------------------------------------------------------------------------------------------------------------- + +# All Formats- 0x001,0x011,0x01a,0x41a,0x816,0x80e,0x81e,0x820,0x806 +# 0x001=(Color-Red8) +# 0x011=(Color-Red32F) +# 0x011d=(Depth24_Stencil8) +# 0x01a=(Normals/Color-RGBA8) +# 0x41a=(Color-SRGBA8) +# 0x816=(RGB11F) +# 0x80e=(Depth32) +# 0x81e=(RedGreen32F) +# 0x820=(RGBA16) + +# Depth/Geometry/Shading Rendering +[TextureRedefine] +width = 1280 +height = 720 +formats = 0x001,0x011,0x01a,0x41a,0x816 +tileModesExcluded = 0x001 # For Video Playback +overwriteWidth = ($width/$gameWidth) * 1280 +overwriteHeight = ($height/$gameHeight) * 720 + +# Gamepad - background +[TextureRedefine] +width = 864 +height = 480 +formats = 0x41a +overwriteWidth = ($width / $gameWidth) * 864 +overwriteHeight = ($height / $gameHeight) * 480 + +# Gamepad - game render size +[TextureRedefine] +width = 854 +height = 480 +formats = 0x41a +overwriteWidth = ($width / $gameWidth) * 854 +overwriteHeight = ($height / $gameHeight) * 480 + +# ----------------------------------------------------------------------------------------------------------------------------------------------- +# ----------------------------------------------------------------------------------------------------------------------------------------------- + +# 1/2 - Resolutions +[TextureRedefine] +width = 640 +height = 368 +formats = 0x011,0x01a,0x41a,0x816,0x820 +overwriteWidth = ($width/$gameWidth) * 640 +overwriteHeight = ($height/$gameHeight) * 368 + +# 1/2 - Resolutions +[TextureRedefine] +width = 640 +height = 360 +formats = 0x011,0x01a,0x41a,0x816,0x820 +formatsExcluded = 0x007 # For Video Playback +overwriteWidth = ($width/$gameWidth) * 640 +overwriteHeight = ($height/$gameHeight) * 360 + +# 1/4 - Resolutions +[TextureRedefine] +width = 320 +height = 192 +formats = 0x01a,0x41a,0x80e,0x81e,0x816 # Skip 0x806 for film gran pack +overwriteWidth = ($width/$gameWidth) * 320 +overwriteHeight = ($height/$gameHeight) * 192 + +# 1/4 Resolutions +[TextureRedefine] +width = 320 +height = 180 +formats = 0x01a,0x41a,0x80e,0x81e,0x816 # Skip 0x806 for film gran pack +overwriteWidth = ($width/$gameWidth) * 320 +overwriteHeight = ($height/$gameHeight) * 180 + +# Depth +[TextureRedefine] +width = 1024 +height = 1024 +formats = 0x005 +overwriteWidth = ($width / $gameWidth) * 1024 +overwriteHeight = ($height / $gameHeight) * 1024 + +# Depth +[TextureRedefine] +width = 1024 +height = 2048 +formats = 0x005 +overwriteWidth = ($width / $gameWidth) * 1024 +overwriteHeight = ($height / $gameHeight) * 2048 + +# Probably not needed +[TextureRedefine] +width = 96 +height = 48 +formats = 0x816,0x81e +overwriteWidth = ($width/$gameWidth) * 96 +overwriteHeight = ($height/$gameHeight) * 48 + +# 816s +[TextureRedefine] +width = 160 +height = 96 +formats = 0x816 +overwriteWidth = ($width/$gameWidth) * 160 +overwriteHeight = ($height/$gameHeight) * 96 + +[TextureRedefine] +width = 160 +height = 90 +formats = 0x816 +overwriteWidth = ($width/$gameWidth) * 160 +overwriteHeight = ($height/$gameHeight) * 90 + +[TextureRedefine] +width = 80 +height = 45 +formats = 0x816 +overwriteWidth = ($width/$gameWidth) * 80 +overwriteHeight = ($height/$gameHeight) * 45 + +[TextureRedefine] +width = 40 +height = 22 +formats = 0x816 +overwriteWidth = ($width/$gameWidth) * 40 +overwriteHeight = ($height/$gameHeight) * 22 + +[TextureRedefine] +width = 64 +height = 32 +formats = 0x816 +overwriteWidth = ($width/$gameWidth) * 64 +overwriteHeight = ($height/$gameHeight) * 32 \ No newline at end of file diff --git a/docs/_data/GameTitles.yml b/docs/_data/GameTitles.yml index 76ace57a..bdf78275 100644 --- a/docs/_data/GameTitles.yml +++ b/docs/_data/GameTitles.yml @@ -225,7 +225,7 @@ - title: "Project Zero: Maiden of Black Water" nativeRes: 720 compatLink: "http://compat.cemu.info/wiki/Project_Zero:_Maiden_of_Black_Water" - version3: false + version3: true - title: "Puyo Puyo Tetris" nativeRes: 1080 compatLink: "http://compat.cemu.info/wiki/Puyo_Puyo_Tetris"