diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/37040a485a29d54e_00000000000003c9_ps.txt index 3a131733..96d1bf3d 100644 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/37040a485a29d54e_00000000000003c9_ps.txt +++ b/Enhancement/BreathOfTheWild_ClarityGFXv176/37040a485a29d54e_00000000000003c9_ps.txt @@ -3,73 +3,82 @@ // shader 37040a485a29d54e // Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. +// Being below 1.3.3 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. // If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader. -//(Thank you NAVras for debugging and answering silly questions.) -// Couldn't have got this far without you. - -// Credit to getdls for adding exposure & Original Contrasty. - // Clarity GFX // Credit to Jamie for main coding. // Credit to Kiri coding & Reshade logic. +// Credit to Cremtif for Help. // Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -// v0.10 -// Add 1.3.3 support +// Shader dumped from Cemu 1.11.2 from BotW 1.4.0 +// v 2.0 +// Add 1.4.0 support //########################################################## - -//ToneMapping -float bloomFactor = 0.2; //Default is 1.0 -float Bleach = 0.3; //Default is 0.0 -float exposure = 1.13; //Default is 1.0 -float defog = 0.004; //Default is 0.0 - -//Lift Gamma Gain -#define RGB_Lift vec3(1.05, 1.05, 1.05) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.70, 0.70, 0.70) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.05, 1.05, 1.05) //[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. - -//Curves -float Contrast = 0.50; //[-1.0, 1.0] The amount of contrast you want - -//Levels Control -const int BlackPoint = 0; //[0, 255] The black point is the new black - literally. Everything darker than this will become completely black -const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter than this becomes completely white - -//LumaShapening -#define sharp_strength 0.65 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.035 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 - -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength 0.0 //Default is 0.0 -#define Technicolor2_Green_Strength 0.0 //Default is 0.0 -#define Technicolor2_Blue_Strength 0.0 //Default is 0.0 -#define Technicolor2_Brightness 0.50 //Default is 1.0 -#define Technicolor2_Strength 1.0 //Default is 1.0 -#define Technicolor2_Saturation 0.70 //Default is 1.0 +//BloomFactor + float bloomFactor = 0.17; //Default is 0.20 (rough estimate based on Switch) //Fake High Dynamic Range. -#define HDRPower 1.15 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." + float HDRPower = 1.035; // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." + float radius1 = 0.793; // 0.0 to 8.0 "Default 0.793 , will affect FX." + float radius2 = 0.87; // 0.0 to 8.0 "Default 0.87 , will affect FX." + +//LumaShapening + float sharp_strength = 0.25; //[0.10 to 3.00] Strength of the sharpening Default is 0.65 + float sharp_clamp = 0.085; //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 + +//Advanced sharpening settings + float offset_bias = 1.0; //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. + +//ToneMapping + float Bleach = 0.3; //Default is 0.0 + float defog = 0.004; //Default is 0.0 //How much of the overall color you want removed form the values of FogColor. + vec3 FogColor = vec3(1.0, 1.5, 1.5); //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." + +//Levels Control + const int BlackPoint = 6; //[0, 255] The black point is the new black - literally. Everything darker than this will become completely black + const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter than this becomes completely white + +//Lift Gamma Gain + vec3 RGB_Lift = vec3(1.01, 1.01, 1.01); //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. + vec3 RGB_Gamma = vec3(0.90, 0.90, 0.90); //[0.000 to 2.000] Adjust midtones for Red, Green and Blue + vec3 RGB_Gain = vec3(0.96, 0.96, 0.96); //[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. + +//VibrancePass + float Vibrance = 0.15; //"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."; + +//Technicolor2 + float Technicolor2_Red_Strength = 0.51; //Default is 0.0 + float Technicolor2_Green_Strength = 0.51; //Default is 0.0 + float Technicolor2_Blue_Strength = 0.51; //Default is 0.0 + float Technicolor2_Brightness = 2.13; //Default is 1.0 + float Technicolor2_Strength = 0.80; //Default is 1.0 + float Technicolor2_Saturation = 0.34; //Default is 1.0 + +//Filmic Pass + float Strength = 0.85; + float Fade = 0.4; + float Contrast = 0.80; + float Linearization = 0.7; + float Saturation = -0.15; + + float RedCurve = 1.0; + float GreenCurve = 1.0; + float BlueCurve = 1.0; + float BaseCurve = 1.5; + + float BaseGamma = 0.98; + float EffectGamma = 0.97; + float EffectGammaR = 1.0; + float EffectGammaG = 1.0; + float EffectGammaB = 1.0; //########################################################### //Do not edit under this line. -float sat = 0.0; - -const vec3 FogColor = vec3(1.0, 1.5, 1.0); //defog Color"; - uniform ivec4 uf_remappedPS[1]; layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 @@ -91,7 +100,7 @@ float mul_nonIEEE(float a, float b) { if (a == 0.0 || b == 0.0) return 0.0; retu vec3 TonemapPass(vec3 inputColor) { vec3 color = inputColor; color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= exposure / (1.0 + color / exposure); + const vec3 coefLuma = vec3(0.2126, 0.7152, 0.0722); float lum = dot(coefLuma, color); @@ -108,23 +117,13 @@ vec3 TonemapPass(vec3 inputColor) { vec3 middlegray = vec3(dot(color, vec3(1.0 / 3.0))); vec3 diffcolor = color - middlegray; + + float sat = 0.0; color = (color + diffcolor * sat) / (1 + (diffcolor * sat)); // saturation return color; } -// 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; -} - //Curves vec3 CurvesPass(vec3 inputColor) { @@ -137,7 +136,6 @@ vec3 CurvesPass(vec3 inputColor) { return colorInput; } - //TECHNICOLOR2 vec3 Technicolor2(vec3 inputColor) { @@ -167,6 +165,111 @@ vec3 Technicolor2(vec3 inputColor) { return color; } +// 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, Contrast); + + vec3 LumCoeff = vec3(0.212656, 0.715158, 0.072186); + float A = dot(B.rgb, LumCoeff); + vec3 D = vec3(A); + + B = pow(B, 1.0 / vec3(BaseGamma)); + + 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, Bleach); + + 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, 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, Strength); + return Fn; +} //Lift Gamma Gain @@ -180,16 +283,35 @@ vec3 LiftGammaGainPass(vec3 colorInput) 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 -- + // -- Gain -- color *= RGB_Gain; // -- Gamma -- color = pow(color, 1.0 / RGB_Gamma); //Gamma - // -- Return output -- +// -- 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) @@ -209,10 +331,6 @@ float lumasharping(sampler2D tex, vec2 pos) { // [ .50, 1, .50] = [ 2 , 4 , 2 ] // [ .25, .50, .25] [ 1 , 2 , 1 ] - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 @@ -220,19 +338,15 @@ float lumasharping(sampler2D tex, vec2 pos) { blur_ori *= 0.25; // ( /= 4) Divide by the number of texture fetches - // -- Calculate the sharpening -- + // -- Calculate the sharpening -- vec3 sharp = ori - blur_ori; //Subtracting the blurred image from the original image - // -- Adjust strength of the sharpening and clamp it-- + // -- 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 - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. return sharp_luma; } @@ -291,7 +405,6 @@ void main() vec3 cubeMapSTM; int cubeMapFaceId; R0f = passParameterSem0; - R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; bloom *= bloomFactor; R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); @@ -307,7 +420,7 @@ void main() PV0f.z = R126f.z; R125f.w = 1.0; // 1 - tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(0x3e99096c),intBitsToFloat(0x3f162b6b),intBitsToFloat(0x3dea4a8c),0.0)); + tempf.x = dot(vec4(PV0f.x, PV0f.y, PV0f.z, -0.0), vec4(intBitsToFloat(0x3e99096c), intBitsToFloat(0x3f162b6b), intBitsToFloat(0x3dea4a8c), 0.0)); PV1f.x = tempf.x; PV1f.y = tempf.x; PV1f.z = tempf.x; @@ -322,10 +435,10 @@ void main() // 3 PS1f = exp2(PV0f.y); // 4 - PV0f.x = -(PS1f) + 1.0; + PV0f.x = -(PS1f)+1.0; PS0f = exp2(R127f.x); // 5 - R127f.x = -(PS0f) + 1.0; + R127f.x = -(PS0f)+1.0; R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); PV1f.z = PV0f.x * R126f.w; PS1f = exp2(R127f.w); @@ -333,7 +446,7 @@ void main() backupReg0f = R126f.x; backupReg1f = R127f.z; R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); - PV0f.y = -(PS1f) + 1.0; + PV0f.y = -(PS1f)+1.0; R127f.z = mul_nonIEEE(R126f.z, PV1f.z); PV0f.z = R127f.z; R127f.w = mul_nonIEEE(R127f.y, PV1f.z); @@ -342,24 +455,24 @@ void main() // 7 PV1f.x = R127f.x + -(PV0f.w); PV1f.y = PV0f.y + -(PV0f.z); - PV1f.w = -(PS0f) + 1.0; + PV1f.w = -(PS0f)+1.0; // 8 backupReg0f = R127f.z; - R127f.x = (mul_nonIEEE(PV1f.x,R126f.y) + R127f.w); + R127f.x = (mul_nonIEEE(PV1f.x, R126f.y) + R127f.w); R127f.x = clamp(R127f.x, 0.0, 1.0); PV0f.x = R127f.x; PV0f.y = PV1f.w + -(R126f.x); - R127f.z = (mul_nonIEEE(PV1f.y,R126f.y) + backupReg0f); + R127f.z = (mul_nonIEEE(PV1f.y, R126f.y) + backupReg0f); R127f.z = clamp(R127f.z, 0.0, 1.0); PV0f.z = R127f.z; // 9 backupReg0f = R126f.x; - R126f.x = (mul_nonIEEE(PV0f.y,R126f.y) + backupReg0f); + R126f.x = (mul_nonIEEE(PV0f.y, R126f.y) + backupReg0f); R126f.x = clamp(R126f.x, 0.0, 1.0); PV1f.x = R126f.x; PV1f.w = max(PV0f.x, PV0f.z); // 10 - tempf.x = dot(vec4(PV1f.x,R127f.x,R127f.z,R125f.w),vec4(intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),-(1.0))); + tempf.x = dot(vec4(PV1f.x, R127f.x, R127f.z, R125f.w), vec4(intBitsToFloat(0x3f2aaaab), intBitsToFloat(0x3f2aaaab), intBitsToFloat(0x3f2aaaab), -(1.0))); PV0f.x = tempf.x; PV0f.y = tempf.x; PV0f.z = tempf.x; @@ -370,17 +483,17 @@ void main() backupReg0f = R127f.x; backupReg1f = R127f.z; R127f.x = R126f.x + -(PS0f); - R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); + R123f.y = (mul_nonIEEE(-(PV0f.x), PV0f.x) + 1.0); PV1f.y = R123f.y; R127f.z = backupReg0f + -(PS0f); R125f.w = backupReg1f + -(PS0f); // 12 - R123f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); + R123f.x = (mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); PV0f.x = R123f.x; // 13 - R0f.x = (mul_nonIEEE(R127f.x,PV0f.x) + R126f.z); - R0f.y = (mul_nonIEEE(R127f.z,PV0f.x) + R126f.z); - R0f.z = (mul_nonIEEE(R125f.w,PV0f.x) + R126f.z); + R0f.x = (mul_nonIEEE(R127f.x, PV0f.x) + R126f.z); + R0f.y = (mul_nonIEEE(R127f.z, PV0f.x) + R126f.z); + R0f.z = (mul_nonIEEE(R125f.w, PV0f.x) + R126f.z); // -- End original shader code @@ -389,9 +502,11 @@ void main() vec3 color = (passPixelColor0.xyz); color += bloom; color = TonemapPass(color); - color = Technicolor2(color); color = LevelsPass(color); + color = Technicolor2(color); + color = FilmPass(color); color = CurvesPass(color); color = LiftGammaGainPass(color); + color = VibrancePass(color); passPixelColor0 = vec4(color, R0f.w); } \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Avgluma_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Avgluma_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index 6d0b39eb..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Avgluma_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,335 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader. -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -// Changelog v0.1 -- Special Very Special Edition. -// Added support for 1.3.3! - -//########################################################## - -//Control Pannel -float bloomFactor = 0.4; //Default is 1.0 Affacts Games bloom -float exposure = 2.0; // Exposure setting -float brt = 0.0; //Default is 0.0 Now much brightness to add to the RGB color. -float con = 0.75; // [0.0 ~ 1.5] [0.5 Default] Contrast Adjustment - or + values work -float sat = 0.50; // [0.1 ~ 1.5] [0.0 Default] Color Saturation Adjustment. - or + values work -float defog = 0.0; // [0.0 ~ 1.0] [0.0 Default] How much of the far distance fog to "remove." - -//Lift Gamma Gain -#define RGB_Lift vec3(1.0, 1.0, 1.0) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.60, 0.60, 0.60) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.0, 1.0, 1.0) //[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. - -//Luma Values -float AvgLumR = 0.0; // [0.0 ~ 1.5] [0.0 Default] Use very small increments, as it changes RGB values. -float AvgLumG = -0.003; // [0.0 ~ 1.5] [0.0 Default] Use very small increments, as it changes RGB values. -float AvgLumB = 0.0; // [0.0 ~ 1.5] [0.0 Default] Use very small increments, as it changes RGB values. - -//LumaShapening -#define sharp_strength 0.25 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.085 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Fake High Dynamic Range. -#define HDRPower 1.20 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." -//----------------------------------------------------------- - -//End of adjustable values - -//########################################################### - -//Do not edit under this line. -const vec3 FogColor = vec3(0.0, 0.0, 0.0); //defog Color"; - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ -if( v == 0x7FFFFFFF ) - return floatBitsToInt(1.0); -else if( v == 0xFFFFFFFF ) - return floatBitsToInt(0.0); -return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } - -//----------------------------------------------------------- -// Based on CeeJay.dk's original GLSL/HLSL. -//----------------------------------------------------------- - -vec3 ContrastSaturationBrightness( vec3 color, float brt, float sat, float con) { - - //Luminace Coefficients for brightness of image - vec3 LuminaceCoeff = vec3(0.2125,0.7154,0.0721); - - //Brigntess calculations - vec3 AvgLumin = vec3(AvgLumR, AvgLumG, AvgLumB); - vec3 brtColor = color * brt; - float intensityf = dot(brtColor, LuminaceCoeff); - vec3 intensity = vec3(intensityf, intensityf, intensityf); - - //Saturation calculation - vec3 satColor = mix(intensity, brtColor, sat); - - //Contrast calculations - vec3 conColor = mix(AvgLumin, satColor, con); - - return color; -} - -//Clarity Tone Map - -vec3 claritytonemap(vec3 color) { - color = max(vec3(0.), color - vec3(0.004)); - color = (color * (6.2 * color + .5)) / (color * (6.2 * color + 1.7) + 0.06); - float luma = dot(color, vec3(0.2126, 0.7152, 0.0722)); - float toneMappedLuma = luma / (1. + luma); - color *= toneMappedLuma / luma; - color *= exposure/(1. + color / exposure); - return color; -} - -//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); -} - -//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 ] - - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 - - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. - 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() -{ -vec4 R0f = vec4(0.0); -vec4 R1f = vec4(0.0); -vec4 R123f = vec4(0.0); -vec4 R125f = vec4(0.0); -vec4 R126f = vec4(0.0); -vec4 R127f = vec4(0.0); -float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; -vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); -float PS0f = 0.0, PS1f = 0.0; -vec4 tempf = vec4(0.0); -float tempResultf; -int tempResulti; -ivec4 ARi = ivec4(0); -bool predResult = true; -vec3 cubeMapSTM; -int cubeMapFaceId; -R0f = passParameterSem0; -R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); -R1f.xyz *= bloomFactor; -R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); -float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); -R0f.xyz += vec3(smask); -// -- Original shader code -// 0 -R126f.x = R1f.x + R0f.x; -PV0f.x = R126f.x; -R127f.y = R1f.y + R0f.y; -PV0f.y = R127f.y; -R126f.z = R1f.z + R0f.z; -PV0f.z = R126f.z; -R125f.w = 1.0; -// 1 -tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(0x3e99096c),intBitsToFloat(0x3f162b6b),intBitsToFloat(0x3dea4a8c),0.0)); -PV1f.x = tempf.x; -PV1f.y = tempf.x; -PV1f.z = tempf.x; -PV1f.w = tempf.x; -// 2 -R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); -PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); -R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); -R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); -R126f.w = 1.0 / PV1f.x; -PS0f = R126f.w; -// 3 -PS1f = exp2(PV0f.y); -// 4 -PV0f.x = -(PS1f) + 1.0; -PS0f = exp2(R127f.x); -// 5 -R127f.x = -(PS0f) + 1.0; -R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); -PV1f.z = PV0f.x * R126f.w; -PS1f = exp2(R127f.w); -// 6 -backupReg0f = R126f.x; -backupReg1f = R127f.z; -R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); -PV0f.y = -(PS1f) + 1.0; -R127f.z = mul_nonIEEE(R126f.z, PV1f.z); -PV0f.z = R127f.z; -R127f.w = mul_nonIEEE(R127f.y, PV1f.z); -PV0f.w = R127f.w; -PS0f = exp2(backupReg1f); -// 7 -PV1f.x = R127f.x + -(PV0f.w); -PV1f.y = PV0f.y + -(PV0f.z); -PV1f.w = -(PS0f) + 1.0; -// 8 -backupReg0f = R127f.z; -R127f.x = (mul_nonIEEE(PV1f.x,R126f.y) + R127f.w); -R127f.x = clamp(R127f.x, 0.0, 1.0); -PV0f.x = R127f.x; -PV0f.y = PV1f.w + -(R126f.x); -R127f.z = (mul_nonIEEE(PV1f.y,R126f.y) + backupReg0f); -R127f.z = clamp(R127f.z, 0.0, 1.0); -PV0f.z = R127f.z; -// 9 -backupReg0f = R126f.x; -R126f.x = (mul_nonIEEE(PV0f.y,R126f.y) + backupReg0f); -R126f.x = clamp(R126f.x, 0.0, 1.0); -PV1f.x = R126f.x; -PV1f.w = max(PV0f.x, PV0f.z); -// 10 -tempf.x = dot(vec4(PV1f.x,R127f.x,R127f.z,R125f.w),vec4(intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),-(1.0))); -PV0f.x = tempf.x; -PV0f.y = tempf.x; -PV0f.z = tempf.x; -PV0f.w = tempf.x; -R126f.z = max(PV1f.x, PV1f.w); -PS0f = R126f.z; -// 11 -backupReg0f = R127f.x; -backupReg1f = R127f.z; -R127f.x = R126f.x + -(PS0f); -R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); -PV1f.y = R123f.y; -R127f.z = backupReg0f + -(PS0f); -R125f.w = backupReg1f + -(PS0f); -// 12 -R123f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); -PV0f.x = R123f.x; -// 13 -R0f.x = (mul_nonIEEE(R127f.x,PV0f.x) + R126f.z); -R0f.y = (mul_nonIEEE(R127f.z,PV0f.x) + R126f.z); -R0f.z = (mul_nonIEEE(R125f.w,PV0f.x) + R126f.z); - -// -- End original shader code - -passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); - -vec3 color = (passPixelColor0.xyz); -color = claritytonemap(color); -color = ContrastSaturationBrightness(color, brt, sat, con); -color = LiftGammaGainPass(color); -passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_BSOD_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_BSOD_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index 1b11c5b2..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_BSOD_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,402 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader. -//(Thank you NAVras for debugging and answering silly questions.) -// Couldn't have got this far without you. - -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -//v0.10 -// Added support for 1.3.3! - -//########################################################## - -//ToneMapping -float bloomFactor = 0.2; //Default is 1.0 -float Bleach = 0.3; //Default is 0.0 -float exposure = 1.13; //Default is 1.0 -float defog = 0.004; //Default is 0.0 - -//Lift Gamma Gain -#define RGB_Lift vec3(1.05, 1.05, 1.05) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.70, 0.70, 0.70) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.05, 1.00, 1.05) //[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. - -//Curves -float Contrast = 0.50; //[-1.0, 1.0] The amount of contrast you want - -//Levels Control -const int BlackPoint = 0; //[0, 255] The black point is the new black - literally. Everything darker than this will become completely black -const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter than this becomes completely white - -//LumaShapening -#define sharp_strength 0.65 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.035 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 - -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength 0.0 //Default is 0.0 -#define Technicolor2_Green_Strength 0.0 //Default is 0.0 -#define Technicolor2_Blue_Strength 0.0 //Default is 0.0 -#define Technicolor2_Brightness 0.50 //Default is 1.0 -#define Technicolor2_Strength 1.0 //Default is 1.0 -#define Technicolor2_Saturation 0.70 //Default is 1.0 - -//Fake High Dynamic Range. -#define HDRPower 1.15 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." - -//########################################################### - -//Do not edit under this line. - -float sat = 0.0; - -const vec3 FogColor = vec3(1.0, 1.5, 1.0); //defog Color"; - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ - if (v == 0x7FFFFFFF) - return floatBitsToInt(1.0); - else if (v == 0xFFFFFFFF) - return floatBitsToInt(0.0); - return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b) { if (a == 0.0 || b == 0.0) return 0.0; return a*b; } - -//ToneMapping - -vec3 TonemapPass(vec3 inputColor) { - vec3 color = inputColor; - color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= exposure / (1.0 + color / exposure); - - 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; -} - -// 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; -} - -//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; -} - - -//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); -} - -//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 ] - - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 - - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. - 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() -{ - vec4 R0f = vec4(0.0); - vec4 R1f = vec4(0.0); - vec4 R123f = vec4(0.0); - vec4 R125f = vec4(0.0); - vec4 R126f = vec4(0.0); - vec4 R127f = vec4(0.0); - float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; - vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); - float PS0f = 0.0, PS1f = 0.0; - vec4 tempf = vec4(0.0); - float tempResultf; - int tempResulti; - ivec4 ARi = ivec4(0); - bool predResult = true; - vec3 cubeMapSTM; - int cubeMapFaceId; - R0f = passParameterSem0; - R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); - vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; - bloom *= bloomFactor; - R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); - float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); - R0f.xyz += vec3(smask); - // 0 - R126f.x = R1f.x + R0f.x; - PV0f.x = R126f.x; - R127f.y = R1f.y + R0f.y; - PV0f.y = R127f.y; - R126f.z = R1f.z + R0f.z; - PV0f.z = R126f.z; - R125f.w = 1.0; - // 1 - tempf.x = dot(vec4(PV0f.x, PV0f.y, PV0f.z, -0.0), vec4(intBitsToFloat(0x3e99096c), intBitsToFloat(0x3f162b6b), intBitsToFloat(0x3dea4a8c), 0.0)); - PV1f.x = tempf.x; - PV1f.y = tempf.x; - PV1f.z = tempf.x; - PV1f.w = tempf.x; - // 2 - R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); - PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); - R126f.w = 1.0 / PV1f.x; - PS0f = R126f.w; - // 3 - PS1f = exp2(PV0f.y); - // 4 - PV0f.x = -(PS1f)+1.0; - PS0f = exp2(R127f.x); - // 5 - R127f.x = -(PS0f)+1.0; - R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); - PV1f.z = PV0f.x * R126f.w; - PS1f = exp2(R127f.w); - // 6 - backupReg0f = R126f.x; - backupReg1f = R127f.z; - R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); - PV0f.y = -(PS1f)+1.0; - R127f.z = mul_nonIEEE(R126f.z, PV1f.z); - PV0f.z = R127f.z; - R127f.w = mul_nonIEEE(R127f.y, PV1f.z); - PV0f.w = R127f.w; - PS0f = exp2(backupReg1f); - // 7 - PV1f.x = R127f.x + -(PV0f.w); - PV1f.y = PV0f.y + -(PV0f.z); - PV1f.w = -(PS0f)+1.0; - // 8 - backupReg0f = R127f.z; - R127f.x = (mul_nonIEEE(PV1f.x, R126f.y) + R127f.w); - R127f.x = clamp(R127f.x, 0.0, 1.0); - PV0f.x = R127f.x; - PV0f.y = PV1f.w + -(R126f.x); - R127f.z = (mul_nonIEEE(PV1f.y, R126f.y) + backupReg0f); - R127f.z = clamp(R127f.z, 0.0, 1.0); - PV0f.z = R127f.z; - // 9 - backupReg0f = R126f.x; - R126f.x = (mul_nonIEEE(PV0f.y, R126f.y) + backupReg0f); - R126f.x = clamp(R126f.x, 0.0, 1.0); - PV1f.x = R126f.x; - R126f.y = max(PV0f.x, PV0f.z); - PV1f.w = min(PV0f.x, PV0f.z); - // 10 - tempf.x = dot(vec4(PV1f.x, R127f.x, R127f.z, R125f.w), vec4(intBitsToFloat(0x3f2aaaab), intBitsToFloat(0x3f2aaaab), intBitsToFloat(0x3f2aaaab), -(1.0))); - PV0f.x = tempf.x; - PV0f.y = tempf.x; - PV0f.z = tempf.x; - PV0f.w = tempf.x; - R126f.z = min(PV1f.x, PV1f.w); - PS0f = R126f.z; - // 11 - backupReg0f = R127f.x; - backupReg1f = R127f.z; - R127f.x = max(R126f.x, R126f.y); - PV1f.x = R127f.x; - R123f.y = (mul_nonIEEE(-(PV0f.x), PV0f.x) + 1.0); - PV1f.y = R123f.y; - R127f.z = backupReg0f + -(PS0f); - R125f.w = R126f.x + -(PS0f); - R126f.y = backupReg1f + -(PS0f); - PS1f = R126f.y; - // 12 - R126f.x = (mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); - PV0f.x = R126f.x; - PV0f.y = -(R126f.z) + PV1f.x; - // 13 - R123f.w = (mul_nonIEEE(-(PV0f.x), PV0f.y) + R127f.x); - PV1f.w = R123f.w; - // 14 - R0f.x = (mul_nonIEEE(R126f.x, R125f.w) + PV1f.w); - R0f.y = (mul_nonIEEE(R126f.x, R127f.z) + PV1f.w); - R0f.z = (mul_nonIEEE(R126f.x, R126f.y) + PV1f.w); - - passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); - - vec3 color = (passPixelColor0.xyz); - color += bloom; - color = TonemapPass(color); - color = Technicolor2(color); - color = LevelsPass(color); - color = CurvesPass(color); - color = LiftGammaGainPass(color); - passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_HDROFF_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_HDROFF_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index afae4c2e..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_HDROFF_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,402 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader. -//(Thank you NAVras for debugging and answering silly questions.) -// Couldn't have got this far without you. - -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -//v0.10 -// Added support for 1.3.3! - -//########################################################## - -//ToneMapping -float bloomFactor = 0.15; //Default is 1.0 -float Bleach = 0.2; //Default is 0.0 -float exposure = 1.25; //Default is 1.0 -float defog = 0.004; //Default is 0.0 - -//Lift Gamma Gain -#define RGB_Lift vec3(1.00, 1.00, 1.00) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.67, 0.67, 0.67) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.00, 0.95, 1.00) //[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. - -//Curves -float Contrast = 0.15; //[-1.0, 1.0] The amount of contrast you want - -//Levels Control -const int BlackPoint = 0; //[0, 255] The black point is the new black - literally. Everything darker than this will become completely black -const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter than this becomes completely white - -//LumaShapening -#define sharp_strength 0.35 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.015 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 - -//Advanced sharpening settings -#define offset_bias 0.5 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength 0.12 //Default is 0.0 -#define Technicolor2_Green_Strength 0.20 //Default is 0.0 -#define Technicolor2_Blue_Strength 0.12 //Default is 0.0 -#define Technicolor2_Brightness 0.45 //Default is 1.0 -#define Technicolor2_Strength 1.0 //Default is 1.0 -#define Technicolor2_Saturation 0.70 //Default is 1.0 - -//Fake High Dynamic Range. -#define HDRPower 1.0 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.15" -#define radius1 0.00 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.00 // 0.0 to 8.0 "Default 0.87 , will affect FX." - -//########################################################### - -//Do not edit under this line. - -float sat = 0.0; - -const vec3 FogColor = vec3(1.0, 1.5, 1.0); //defog Color"; - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ - if (v == 0x7FFFFFFF) - return floatBitsToInt(1.0); - else if (v == 0xFFFFFFFF) - return floatBitsToInt(0.0); - return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b) { if (a == 0.0 || b == 0.0) return 0.0; return a*b; } - -//ToneMapping - -vec3 TonemapPass(vec3 inputColor) { - vec3 color = inputColor; - color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= exposure / (1.0 + color / exposure); - - 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; -} - -// 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; -} - -//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; -} - - -//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); -} - -//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 ] - - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 - - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. - 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() -{ - vec4 R0f = vec4(0.0); - vec4 R1f = vec4(0.0); - vec4 R123f = vec4(0.0); - vec4 R125f = vec4(0.0); - vec4 R126f = vec4(0.0); - vec4 R127f = vec4(0.0); - float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; - vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); - float PS0f = 0.0, PS1f = 0.0; - vec4 tempf = vec4(0.0); - float tempResultf; - int tempResulti; - ivec4 ARi = ivec4(0); - bool predResult = true; - vec3 cubeMapSTM; - int cubeMapFaceId; - R0f = passParameterSem0; - R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); - vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; - bloom *= bloomFactor; - R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); - float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); - R0f.xyz += vec3(smask); - // 0 - R126f.x = R1f.x + R0f.x; - PV0f.x = R126f.x; - R127f.y = R1f.y + R0f.y; - PV0f.y = R127f.y; - R126f.z = R1f.z + R0f.z; - PV0f.z = R126f.z; - R125f.w = 1.0; - // 1 - tempf.x = dot(vec4(PV0f.x, PV0f.y, PV0f.z, -0.0), vec4(intBitsToFloat(0x3e99096c), intBitsToFloat(0x3f162b6b), intBitsToFloat(0x3dea4a8c), 0.0)); - PV1f.x = tempf.x; - PV1f.y = tempf.x; - PV1f.z = tempf.x; - PV1f.w = tempf.x; - // 2 - R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); - PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); - R126f.w = 1.0 / PV1f.x; - PS0f = R126f.w; - // 3 - PS1f = exp2(PV0f.y); - // 4 - PV0f.x = -(PS1f)+1.0; - PS0f = exp2(R127f.x); - // 5 - R127f.x = -(PS0f)+1.0; - R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); - PV1f.z = PV0f.x * R126f.w; - PS1f = exp2(R127f.w); - // 6 - backupReg0f = R126f.x; - backupReg1f = R127f.z; - R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); - PV0f.y = -(PS1f)+1.0; - R127f.z = mul_nonIEEE(R126f.z, PV1f.z); - PV0f.z = R127f.z; - R127f.w = mul_nonIEEE(R127f.y, PV1f.z); - PV0f.w = R127f.w; - PS0f = exp2(backupReg1f); - // 7 - PV1f.x = R127f.x + -(PV0f.w); - PV1f.y = PV0f.y + -(PV0f.z); - PV1f.w = -(PS0f)+1.0; - // 8 - backupReg0f = R127f.z; - R127f.x = (mul_nonIEEE(PV1f.x, R126f.y) + R127f.w); - R127f.x = clamp(R127f.x, 0.0, 1.0); - PV0f.x = R127f.x; - PV0f.y = PV1f.w + -(R126f.x); - R127f.z = (mul_nonIEEE(PV1f.y, R126f.y) + backupReg0f); - R127f.z = clamp(R127f.z, 0.0, 1.0); - PV0f.z = R127f.z; - // 9 - backupReg0f = R126f.x; - R126f.x = (mul_nonIEEE(PV0f.y, R126f.y) + backupReg0f); - R126f.x = clamp(R126f.x, 0.0, 1.0); - PV1f.x = R126f.x; - R126f.y = max(PV0f.x, PV0f.z); - PV1f.w = min(PV0f.x, PV0f.z); - // 10 - tempf.x = dot(vec4(PV1f.x, R127f.x, R127f.z, R125f.w), vec4(intBitsToFloat(0x3f2aaaab), intBitsToFloat(0x3f2aaaab), intBitsToFloat(0x3f2aaaab), -(1.0))); - PV0f.x = tempf.x; - PV0f.y = tempf.x; - PV0f.z = tempf.x; - PV0f.w = tempf.x; - R126f.z = min(PV1f.x, PV1f.w); - PS0f = R126f.z; - // 11 - backupReg0f = R127f.x; - backupReg1f = R127f.z; - R127f.x = max(R126f.x, R126f.y); - PV1f.x = R127f.x; - R123f.y = (mul_nonIEEE(-(PV0f.x), PV0f.x) + 1.0); - PV1f.y = R123f.y; - R127f.z = backupReg0f + -(PS0f); - R125f.w = R126f.x + -(PS0f); - R126f.y = backupReg1f + -(PS0f); - PS1f = R126f.y; - // 12 - R126f.x = (mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); - PV0f.x = R126f.x; - PV0f.y = -(R126f.z) + PV1f.x; - // 13 - R123f.w = (mul_nonIEEE(-(PV0f.x), PV0f.y) + R127f.x); - PV1f.w = R123f.w; - // 14 - R0f.x = (mul_nonIEEE(R126f.x, R125f.w) + PV1f.w); - R0f.y = (mul_nonIEEE(R126f.x, R127f.z) + PV1f.w); - R0f.z = (mul_nonIEEE(R126f.x, R126f.y) + PV1f.w); - - passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); - - vec3 color = (passPixelColor0.xyz); - color += bloom; - color = TonemapPass(color); - color = Technicolor2(color); - color = LevelsPass(color); - color = CurvesPass(color); - color = LiftGammaGainPass(color); - passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Original_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Original_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index cafe1944..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Original_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,397 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader. -//(Thank you NAVras for debugging and answering silly questions.) -// Couldn't have got this far without you. - -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -//v0.10 -// Added support for 1.3.3! - -//########################################################## - -//ToneMapping -float bloomFactor = 0.2; //Default is 1.0 -float Bleach = 0.3; //Default is 0.0 -float exposure = 1.13; //Default is 1.0 -float defog = 0.004; //Default is 0.0 - -//Lift Gamma Gain -#define RGB_Lift vec3(1.05, 1.05, 1.05) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.70, 0.70, 0.70) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.05, 1.00, 1.05) //[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. - -//Curves -float Contrast = 0.50; //[-1.0, 1.0] The amount of contrast you want - -//Levels Control -const int BlackPoint = 0; //[0, 255] The black point is the new black - literally. Everything darker than this will become completely black -const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter than this becomes completely white - -//LumaShapening -#define sharp_strength 0.65 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.035 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 - -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength 0.0 //Default is 0.0 -#define Technicolor2_Green_Strength 0.0 //Default is 0.0 -#define Technicolor2_Blue_Strength 0.0 //Default is 0.0 -#define Technicolor2_Brightness 0.50 //Default is 1.0 -#define Technicolor2_Strength 1.0 //Default is 1.0 -#define Technicolor2_Saturation 0.70 //Default is 1.0 - -//Fake High Dynamic Range. -#define HDRPower 1.15 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." - -//########################################################### - -//Do not edit under this line. - -float sat = 0.0; - -const vec3 FogColor = vec3(1.0, 1.5, 1.0); //defog Color"; - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ - if (v == 0x7FFFFFFF) - return floatBitsToInt(1.0); - else if (v == 0xFFFFFFFF) - return floatBitsToInt(0.0); - return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b) { if (a == 0.0 || b == 0.0) return 0.0; return a*b; } - -//ToneMapping - -vec3 TonemapPass(vec3 inputColor) { - vec3 color = inputColor; - color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= exposure / (1.0 + color / exposure); - - 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; -} - -// 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; -} - -//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; -} - - -//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); -} - -//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 ] - - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 - - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. - 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() -{ - vec4 R0f = vec4(0.0); - vec4 R1f = vec4(0.0); - vec4 R123f = vec4(0.0); - vec4 R125f = vec4(0.0); - vec4 R126f = vec4(0.0); - vec4 R127f = vec4(0.0); - float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; - vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); - float PS0f = 0.0, PS1f = 0.0; - vec4 tempf = vec4(0.0); - float tempResultf; - int tempResulti; - ivec4 ARi = ivec4(0); - bool predResult = true; - vec3 cubeMapSTM; - int cubeMapFaceId; - R0f = passParameterSem0; - R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); - vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; - bloom *= bloomFactor; - R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); - float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); - R0f.xyz += vec3(smask); - // -- Original shader code - // 0 - R126f.x = R1f.x + R0f.x; - PV0f.x = R126f.x; - R127f.y = R1f.y + R0f.y; - PV0f.y = R127f.y; - R126f.z = R1f.z + R0f.z; - PV0f.z = R126f.z; - R125f.w = 1.0; - // 1 - tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(0x3e99096c),intBitsToFloat(0x3f162b6b),intBitsToFloat(0x3dea4a8c),0.0)); - PV1f.x = tempf.x; - PV1f.y = tempf.x; - PV1f.z = tempf.x; - PV1f.w = tempf.x; - // 2 - R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); - PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); - R126f.w = 1.0 / PV1f.x; - PS0f = R126f.w; - // 3 - PS1f = exp2(PV0f.y); - // 4 - PV0f.x = -(PS1f) + 1.0; - PS0f = exp2(R127f.x); - // 5 - R127f.x = -(PS0f) + 1.0; - R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); - PV1f.z = PV0f.x * R126f.w; - PS1f = exp2(R127f.w); - // 6 - backupReg0f = R126f.x; - backupReg1f = R127f.z; - R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); - PV0f.y = -(PS1f) + 1.0; - R127f.z = mul_nonIEEE(R126f.z, PV1f.z); - PV0f.z = R127f.z; - R127f.w = mul_nonIEEE(R127f.y, PV1f.z); - PV0f.w = R127f.w; - PS0f = exp2(backupReg1f); - // 7 - PV1f.x = R127f.x + -(PV0f.w); - PV1f.y = PV0f.y + -(PV0f.z); - PV1f.w = -(PS0f) + 1.0; - // 8 - backupReg0f = R127f.z; - R127f.x = (mul_nonIEEE(PV1f.x,R126f.y) + R127f.w); - R127f.x = clamp(R127f.x, 0.0, 1.0); - PV0f.x = R127f.x; - PV0f.y = PV1f.w + -(R126f.x); - R127f.z = (mul_nonIEEE(PV1f.y,R126f.y) + backupReg0f); - R127f.z = clamp(R127f.z, 0.0, 1.0); - PV0f.z = R127f.z; - // 9 - backupReg0f = R126f.x; - R126f.x = (mul_nonIEEE(PV0f.y,R126f.y) + backupReg0f); - R126f.x = clamp(R126f.x, 0.0, 1.0); - PV1f.x = R126f.x; - PV1f.w = max(PV0f.x, PV0f.z); - // 10 - tempf.x = dot(vec4(PV1f.x,R127f.x,R127f.z,R125f.w),vec4(intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),-(1.0))); - PV0f.x = tempf.x; - PV0f.y = tempf.x; - PV0f.z = tempf.x; - PV0f.w = tempf.x; - R126f.z = max(PV1f.x, PV1f.w); - PS0f = R126f.z; - // 11 - backupReg0f = R127f.x; - backupReg1f = R127f.z; - R127f.x = R126f.x + -(PS0f); - R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); - PV1f.y = R123f.y; - R127f.z = backupReg0f + -(PS0f); - R125f.w = backupReg1f + -(PS0f); - // 12 - R123f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); - PV0f.x = R123f.x; - // 13 - R0f.x = (mul_nonIEEE(R127f.x,PV0f.x) + R126f.z); - R0f.y = (mul_nonIEEE(R127f.z,PV0f.x) + R126f.z); - R0f.z = (mul_nonIEEE(R125f.w,PV0f.x) + R126f.z); - - // -- End original shader code - - passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); - - vec3 color = (passPixelColor0.xyz); - color += bloom; - color = TonemapPass(color); - color = Technicolor2(color); - color = LevelsPass(color); - color = CurvesPass(color); - color = LiftGammaGainPass(color); - passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Frost_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Frost_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index 634cfe4e..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Frost_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,397 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader. -//(Thank you NAVras for debugging and answering silly questions.) -// Couldn't have got this far without you. - -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -//v0.10 -// Added support for 1.3.3! - -//########################################################## - -//ToneMapping -float bloomFactor = 0.15; //Default is 1.0 -float Bleach = 0.3; //Default is 0.0 -float exposure = 1.10; //Default is 1.0 -float defog = 0.001; //Default is 0.0 - -//Lift Gamma Gain -#define RGB_Lift vec3(1.00, 1.00, 1.00) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.70, 0.70, 0.70) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.00, 1.00, 1.00) //[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. - -//Curves -float Contrast = 0.30; //[-1.0, 1.0] The amount of contrast you want - -//Levels Control -const int BlackPoint = 0; //[0, 255] The black point is the new black - literally. Everything darker than this will become completely black -const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter than this becomes completely white - -//LumaShapening -#define sharp_strength 0.65 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.035 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 - -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength -0.40 //Default is 0.0 -#define Technicolor2_Green_Strength -0.40 //Default is 0.0 -#define Technicolor2_Blue_Strength -0.40 //Default is 0.0 -#define Technicolor2_Brightness 0.10 //Default is 1.0 -#define Technicolor2_Strength 1.0 //Default is 1.0 -#define Technicolor2_Saturation 0.80 //Default is 1.0 - -//Fake High Dynamic Range. -#define HDRPower 1.05 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." - -//########################################################### - -//Do not edit under this line. - -float sat = 0.0; - -const vec3 FogColor = vec3(1.0, 1.5, 1.0); //defog Color"; - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ - if (v == 0x7FFFFFFF) - return floatBitsToInt(1.0); - else if (v == 0xFFFFFFFF) - return floatBitsToInt(0.0); - return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b) { if (a == 0.0 || b == 0.0) return 0.0; return a*b; } - -//ToneMapping - -vec3 TonemapPass(vec3 inputColor) { - vec3 color = inputColor; - color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= exposure / (1.0 + color / exposure); - - 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; -} - -// 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; -} - -//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; -} - - -//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); -} - -//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 ] - - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 - - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. - 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() -{ - vec4 R0f = vec4(0.0); - vec4 R1f = vec4(0.0); - vec4 R123f = vec4(0.0); - vec4 R125f = vec4(0.0); - vec4 R126f = vec4(0.0); - vec4 R127f = vec4(0.0); - float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; - vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); - float PS0f = 0.0, PS1f = 0.0; - vec4 tempf = vec4(0.0); - float tempResultf; - int tempResulti; - ivec4 ARi = ivec4(0); - bool predResult = true; - vec3 cubeMapSTM; - int cubeMapFaceId; - R0f = passParameterSem0; - R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); - vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; - bloom *= bloomFactor; - R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); - float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); - R0f.xyz += vec3(smask); - // -- Original shader code - // 0 - R126f.x = R1f.x + R0f.x; - PV0f.x = R126f.x; - R127f.y = R1f.y + R0f.y; - PV0f.y = R127f.y; - R126f.z = R1f.z + R0f.z; - PV0f.z = R126f.z; - R125f.w = 1.0; - // 1 - tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(0x3e99096c),intBitsToFloat(0x3f162b6b),intBitsToFloat(0x3dea4a8c),0.0)); - PV1f.x = tempf.x; - PV1f.y = tempf.x; - PV1f.z = tempf.x; - PV1f.w = tempf.x; - // 2 - R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); - PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); - R126f.w = 1.0 / PV1f.x; - PS0f = R126f.w; - // 3 - PS1f = exp2(PV0f.y); - // 4 - PV0f.x = -(PS1f) + 1.0; - PS0f = exp2(R127f.x); - // 5 - R127f.x = -(PS0f) + 1.0; - R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); - PV1f.z = PV0f.x * R126f.w; - PS1f = exp2(R127f.w); - // 6 - backupReg0f = R126f.x; - backupReg1f = R127f.z; - R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); - PV0f.y = -(PS1f) + 1.0; - R127f.z = mul_nonIEEE(R126f.z, PV1f.z); - PV0f.z = R127f.z; - R127f.w = mul_nonIEEE(R127f.y, PV1f.z); - PV0f.w = R127f.w; - PS0f = exp2(backupReg1f); - // 7 - PV1f.x = R127f.x + -(PV0f.w); - PV1f.y = PV0f.y + -(PV0f.z); - PV1f.w = -(PS0f) + 1.0; - // 8 - backupReg0f = R127f.z; - R127f.x = (mul_nonIEEE(PV1f.x,R126f.y) + R127f.w); - R127f.x = clamp(R127f.x, 0.0, 1.0); - PV0f.x = R127f.x; - PV0f.y = PV1f.w + -(R126f.x); - R127f.z = (mul_nonIEEE(PV1f.y,R126f.y) + backupReg0f); - R127f.z = clamp(R127f.z, 0.0, 1.0); - PV0f.z = R127f.z; - // 9 - backupReg0f = R126f.x; - R126f.x = (mul_nonIEEE(PV0f.y,R126f.y) + backupReg0f); - R126f.x = clamp(R126f.x, 0.0, 1.0); - PV1f.x = R126f.x; - PV1f.w = max(PV0f.x, PV0f.z); - // 10 - tempf.x = dot(vec4(PV1f.x,R127f.x,R127f.z,R125f.w),vec4(intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),-(1.0))); - PV0f.x = tempf.x; - PV0f.y = tempf.x; - PV0f.z = tempf.x; - PV0f.w = tempf.x; - R126f.z = max(PV1f.x, PV1f.w); - PS0f = R126f.z; - // 11 - backupReg0f = R127f.x; - backupReg1f = R127f.z; - R127f.x = R126f.x + -(PS0f); - R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); - PV1f.y = R123f.y; - R127f.z = backupReg0f + -(PS0f); - R125f.w = backupReg1f + -(PS0f); - // 12 - R123f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); - PV0f.x = R123f.x; - // 13 - R0f.x = (mul_nonIEEE(R127f.x,PV0f.x) + R126f.z); - R0f.y = (mul_nonIEEE(R127f.z,PV0f.x) + R126f.z); - R0f.z = (mul_nonIEEE(R125f.w,PV0f.x) + R126f.z); - - // -- End original shader code - - passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); - - vec3 color = (passPixelColor0.xyz); - color += bloom; - color = TonemapPass(color); - color = Technicolor2(color); - color = LevelsPass(color); - color = CurvesPass(color); - color = LiftGammaGainPass(color); - passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Jamie_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Jamie_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index 4168100a..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Jamie_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,360 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader.(specal Note Thank you NAVras, For Helping Debug and answering silly questions.) -// Could not have got this far without you. -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -// Changelog v0.8 -// Add support for 1.3.3! - -//########################################################## - -///ToneMapping -float bloomFactor = 0.33; //Default is 1.0 -float Bleach = 0.0002; //Default is 0.0 -float exposure = 1.25; //Default is 1.0 -float defog = 0.003; //Default is 0.0 - -//LumaShapening -#define sharp_strength 0.25 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.085 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength 0.0 //Default is 0.0 -#define Technicolor2_Green_Strength 0.0 //Default is 0.0 -#define Technicolor2_Blue_Strength 0.0 //Default is 0.0 -#define Technicolor2_Brightness 1.00 //Default is 1.0 -#define Technicolor2_Strength 0.40 //Default is 1.0 -#define Technicolor2_Saturation 0.51 //Default is 1.0 - -//Lift Gamma Gain -#define RGB_Lift vec3(1.0, 1.0, 1.0) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.60, 0.60, 0.60) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.0, 1.0, 1.0) //[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. - -//Fake High Dynamic Range. -#define HDRPower 1.20 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." -//----------------------------------------------------------- - -//End of adjustable values - -//########################################################### - -//Do not edit under this line. -float sat = 0.0; -const vec3 FogColor = vec3(0.0, 1.03, 0.0); //defog Color"; - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Bloom -layout(binding = 1) uniform sampler2D textureUnitPS1;// LumaShapening, HDR -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ -if( v == 0x7FFFFFFF ) - return floatBitsToInt(1.0); -else if( v == 0xFFFFFFFF ) - return floatBitsToInt(0.0); -return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } - -//ToneMapping - -vec3 TonemapPass(vec3 inputColor) { - vec3 color = inputColor; - color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= exposure/(1.0+ color / exposure); - - 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; -} - -//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; -} - -//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); -} - -//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 ] - - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 - - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. - 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() -{ -vec4 R0f = vec4(0.0); -vec4 R1f = vec4(0.0); -vec4 R123f = vec4(0.0); -vec4 R125f = vec4(0.0); -vec4 R126f = vec4(0.0); -vec4 R127f = vec4(0.0); -float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; -vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); -float PS0f = 0.0, PS1f = 0.0; -vec4 tempf = vec4(0.0); -float tempResultf; -int tempResulti; -ivec4 ARi = ivec4(0); -bool predResult = true; -vec3 cubeMapSTM; -int cubeMapFaceId; -R0f = passParameterSem0; -R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); -vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; -bloom *= bloomFactor; -R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); -float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); -R0f.xyz += vec3(smask); -// -- Original shader code -// 0 -R126f.x = R1f.x + R0f.x; -PV0f.x = R126f.x; -R127f.y = R1f.y + R0f.y; -PV0f.y = R127f.y; -R126f.z = R1f.z + R0f.z; -PV0f.z = R126f.z; -R125f.w = 1.0; -// 1 -tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(0x3e99096c),intBitsToFloat(0x3f162b6b),intBitsToFloat(0x3dea4a8c),0.0)); -PV1f.x = tempf.x; -PV1f.y = tempf.x; -PV1f.z = tempf.x; -PV1f.w = tempf.x; -// 2 -R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); -PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); -R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); -R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); -R126f.w = 1.0 / PV1f.x; -PS0f = R126f.w; -// 3 -PS1f = exp2(PV0f.y); -// 4 -PV0f.x = -(PS1f) + 1.0; -PS0f = exp2(R127f.x); -// 5 -R127f.x = -(PS0f) + 1.0; -R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); -PV1f.z = PV0f.x * R126f.w; -PS1f = exp2(R127f.w); -// 6 -backupReg0f = R126f.x; -backupReg1f = R127f.z; -R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); -PV0f.y = -(PS1f) + 1.0; -R127f.z = mul_nonIEEE(R126f.z, PV1f.z); -PV0f.z = R127f.z; -R127f.w = mul_nonIEEE(R127f.y, PV1f.z); -PV0f.w = R127f.w; -PS0f = exp2(backupReg1f); -// 7 -PV1f.x = R127f.x + -(PV0f.w); -PV1f.y = PV0f.y + -(PV0f.z); -PV1f.w = -(PS0f) + 1.0; -// 8 -backupReg0f = R127f.z; -R127f.x = (mul_nonIEEE(PV1f.x,R126f.y) + R127f.w); -R127f.x = clamp(R127f.x, 0.0, 1.0); -PV0f.x = R127f.x; -PV0f.y = PV1f.w + -(R126f.x); -R127f.z = (mul_nonIEEE(PV1f.y,R126f.y) + backupReg0f); -R127f.z = clamp(R127f.z, 0.0, 1.0); -PV0f.z = R127f.z; -// 9 -backupReg0f = R126f.x; -R126f.x = (mul_nonIEEE(PV0f.y,R126f.y) + backupReg0f); -R126f.x = clamp(R126f.x, 0.0, 1.0); -PV1f.x = R126f.x; -PV1f.w = max(PV0f.x, PV0f.z); -// 10 -tempf.x = dot(vec4(PV1f.x,R127f.x,R127f.z,R125f.w),vec4(intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),-(1.0))); -PV0f.x = tempf.x; -PV0f.y = tempf.x; -PV0f.z = tempf.x; -PV0f.w = tempf.x; -R126f.z = max(PV1f.x, PV1f.w); -PS0f = R126f.z; -// 11 -backupReg0f = R127f.x; -backupReg1f = R127f.z; -R127f.x = R126f.x + -(PS0f); -R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); -PV1f.y = R123f.y; -R127f.z = backupReg0f + -(PS0f); -R125f.w = backupReg1f + -(PS0f); -// 12 -R123f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); -PV0f.x = R123f.x; -// 13 -R0f.x = (mul_nonIEEE(R127f.x,PV0f.x) + R126f.z); -R0f.y = (mul_nonIEEE(R127f.z,PV0f.x) + R126f.z); -R0f.z = (mul_nonIEEE(R125f.w,PV0f.x) + R126f.z); - -// -- End original shader code - -passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); -vec3 color = (passPixelColor0.xyz); -color += bloom; -color = TonemapPass(color); -color = Technicolor2(color); -color = LiftGammaGainPass(color); -passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Jamie_BETA_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Jamie_BETA_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index dffd2ae6..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_Skyrim_Jamie_BETA_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,409 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader. -//(Thank you NAVras for debugging and answering silly questions.) -// Couldn't have got this far without you. - -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -// v0.10 -// Add 1.3.3 support - -//########################################################## -//ToneMapping -#define bloomFactor 0.2 //Default is 1.0 -#define Bleach 0.3 //Default is 0.0 -#define exposure 1.13 //Default is 1.0 -#define defog 0.004 //Default is 0.0 //How much of the overall color you want removed form the values of FogColor. -#define FogColor vec3(1.0, 1.5, 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." - -//VibrancePass -#define Vibrance 0.15 //"Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation."; -#define 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."; - -//Lift Gamma Gain -#define RGB_Lift vec3(1.05, 1.05, 1.05) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.70, 0.70, 0.70) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.05, 1.05, 1.05) //[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. - -//Curves -#define Contrast 0.50 //[-1.0, 1.0] The amount of contrast you want - -//Levels Control -const int BlackPoint = 0; //[0, 255] The black point is the new black - literally. Everything darker than this will become completely black -const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter than this becomes completely white - -//LumaShapening -#define sharp_strength 0.25 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.085 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 - -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength 0.0 //Default is 0.0 -#define Technicolor2_Green_Strength 0.0 //Default is 0.0 -#define Technicolor2_Blue_Strength 0.0 //Default is 0.0 -#define Technicolor2_Brightness 1.00 //Default is 1.0 -#define Technicolor2_Strength 0.40 //Default is 1.0 -#define Technicolor2_Saturation 0.70 //Default is 1.0 - -//Fake High Dynamic Range. -#define HDRPower 1.20 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." - -//########################################################### - -//Do not edit under this line. - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ - if (v == 0x7FFFFFFF) - return floatBitsToInt(1.0); - else if (v == 0xFFFFFFFF) - return floatBitsToInt(0.0); - return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b) { if (a == 0.0 || b == 0.0) return 0.0; return a*b; } - -//ToneMapping - -vec3 TonemapPass(vec3 inputColor) { - vec3 color = inputColor; - color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog - color *= exposure / (1.0 + color / exposure); - - 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; - - float sat = 0.0; - color = (color + diffcolor * sat) / (1 + (diffcolor * sat)); // saturation - - return color; -} - -// 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; -} - -//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; -} - -//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() -{ - vec4 R0f = vec4(0.0); - vec4 R1f = vec4(0.0); - vec4 R123f = vec4(0.0); - vec4 R125f = vec4(0.0); - vec4 R126f = vec4(0.0); - vec4 R127f = vec4(0.0); - float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; - vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); - float PS0f = 0.0, PS1f = 0.0; - vec4 tempf = vec4(0.0); - float tempResultf; - int tempResulti; - ivec4 ARi = ivec4(0); - bool predResult = true; - vec3 cubeMapSTM; - int cubeMapFaceId; - R0f = passParameterSem0; - R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); - vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; - bloom *= bloomFactor; - R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); - float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); - R0f.xyz += vec3(smask); - // -- Original shader code - // 0 - R126f.x = R1f.x + R0f.x; - PV0f.x = R126f.x; - R127f.y = R1f.y + R0f.y; - PV0f.y = R127f.y; - R126f.z = R1f.z + R0f.z; - PV0f.z = R126f.z; - R125f.w = 1.0; - // 1 - tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(0x3e99096c),intBitsToFloat(0x3f162b6b),intBitsToFloat(0x3dea4a8c),0.0)); - PV1f.x = tempf.x; - PV1f.y = tempf.x; - PV1f.z = tempf.x; - PV1f.w = tempf.x; - // 2 - R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); - PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); - R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); - R126f.w = 1.0 / PV1f.x; - PS0f = R126f.w; - // 3 - PS1f = exp2(PV0f.y); - // 4 - PV0f.x = -(PS1f) + 1.0; - PS0f = exp2(R127f.x); - // 5 - R127f.x = -(PS0f) + 1.0; - R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); - PV1f.z = PV0f.x * R126f.w; - PS1f = exp2(R127f.w); - // 6 - backupReg0f = R126f.x; - backupReg1f = R127f.z; - R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); - PV0f.y = -(PS1f) + 1.0; - R127f.z = mul_nonIEEE(R126f.z, PV1f.z); - PV0f.z = R127f.z; - R127f.w = mul_nonIEEE(R127f.y, PV1f.z); - PV0f.w = R127f.w; - PS0f = exp2(backupReg1f); - // 7 - PV1f.x = R127f.x + -(PV0f.w); - PV1f.y = PV0f.y + -(PV0f.z); - PV1f.w = -(PS0f) + 1.0; - // 8 - backupReg0f = R127f.z; - R127f.x = (mul_nonIEEE(PV1f.x,R126f.y) + R127f.w); - R127f.x = clamp(R127f.x, 0.0, 1.0); - PV0f.x = R127f.x; - PV0f.y = PV1f.w + -(R126f.x); - R127f.z = (mul_nonIEEE(PV1f.y,R126f.y) + backupReg0f); - R127f.z = clamp(R127f.z, 0.0, 1.0); - PV0f.z = R127f.z; - // 9 - backupReg0f = R126f.x; - R126f.x = (mul_nonIEEE(PV0f.y,R126f.y) + backupReg0f); - R126f.x = clamp(R126f.x, 0.0, 1.0); - PV1f.x = R126f.x; - PV1f.w = max(PV0f.x, PV0f.z); - // 10 - tempf.x = dot(vec4(PV1f.x,R127f.x,R127f.z,R125f.w),vec4(intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),-(1.0))); - PV0f.x = tempf.x; - PV0f.y = tempf.x; - PV0f.z = tempf.x; - PV0f.w = tempf.x; - R126f.z = max(PV1f.x, PV1f.w); - PS0f = R126f.z; - // 11 - backupReg0f = R127f.x; - backupReg1f = R127f.z; - R127f.x = R126f.x + -(PS0f); - R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); - PV1f.y = R123f.y; - R127f.z = backupReg0f + -(PS0f); - R125f.w = backupReg1f + -(PS0f); - // 12 - R123f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); - PV0f.x = R123f.x; - // 13 - R0f.x = (mul_nonIEEE(R127f.x,PV0f.x) + R126f.z); - R0f.y = (mul_nonIEEE(R127f.z,PV0f.x) + R126f.z); - R0f.z = (mul_nonIEEE(R125f.w,PV0f.x) + R126f.z); - - // -- End original shader code - - passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); - - vec3 color = (passPixelColor0.xyz); - color += bloom; - color = TonemapPass(color); - color = Technicolor2(color); - color = LevelsPass(color); - color = CurvesPass(color); - color = LiftGammaGainPass(color); - color = VibrancePass(color); - passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_TCG_37040a485a29d54e_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_TCG_37040a485a29d54e_00000000000003c9_ps.txt deleted file mode 100644 index d6328bcd..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/Presets/Preset_TCG_37040a485a29d54e_00000000000003c9_ps.txt +++ /dev/null @@ -1,327 +0,0 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -// shader 37040a485a29d54e - -// Possible problems -// Being below 1.3.0 will give you double-vision with recent graphic packs. Update to 1.3.0 or above. -// If you're experiencing any issues (due to having the previous Clarity shaders installed), please remove and redownload all of the BotW packs. - -// Credit to NAVras for merging to a better shader.(specal Note Thank you NAVras, For Helping Debug and answering silly questions.) -// Could not have got this far without you. -// Credit to getdls for adding exposure & Original Contrasty. - -// Clarity GFX -// Credit to Jamie for main coding. -// Credit to Kiri coding & Reshade logic. -// Credit to Serfrost for preset values. -// Shader dumped from Cemu 1.11.0 from BotW 1.3.3 - -// Changelog v0.8 -// Add support for 1.3.3! - -//########################################################## - -//ToneMapping -float bloomFactor = 0.33; //Default is 1.0 - -//LumaShapening -#define sharp_strength 0.25 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 -#define sharp_clamp 0.085 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 -//Advanced sharpening settings -#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. - -//Technicolor2 -#define Technicolor2_Red_Strength 0.0 //Default is 0.0 -#define Technicolor2_Green_Strength 0.0 //Default is 0.0 -#define Technicolor2_Blue_Strength 0.0 //Default is 0.0 -#define Technicolor2_Brightness 1.00 //Default is 1.0 -#define Technicolor2_Strength 0.40 //Default is 1.0 -#define Technicolor2_Saturation 0.51 //Default is 1.0 - -//Lift Gamma Gain -#define RGB_Lift vec3(1.0, 1.0, 1.0) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue. -#define RGB_Gamma vec3(0.60, 0.60, 0.60) //[0.000 to 2.000] Adjust midtones for Red, Green and Blue -#define RGB_Gain vec3(1.0, 1.0, 1.0) //[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. - -//Fake High Dynamic Range. -#define HDRPower 1.20 // 0.0 to 8.0 "Raising this seems to make the effect stronger and also darker , Default 1.30." -#define radius1 0.793 // 0.0 to 8.0 "Default 0.793 , will affect FX." -#define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX." -//----------------------------------------------------------- - -//End of adjustable values - -//########################################################### - -//Do not edit under this line. - -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Bloom -layout(binding = 1) uniform sampler2D textureUnitPS1;// LumaShapening, HDR -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; -int clampFI32(int v) -{ -if( v == 0x7FFFFFFF ) - return floatBitsToInt(1.0); -else if( v == 0xFFFFFFFF ) - return floatBitsToInt(0.0); -return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); -} -float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } - -//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; -} - -//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); -} - -//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 ] - - - //float px = 1.0/tex_size[0]; - //float py = 1.0/tex_size[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 - - - // -- Combining the values to get the final sharpened pixel -- - - //colorInput.rgb = colorInput.rgb + sharp_luma; // Add the sharpening to the input color. - 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() -{ -vec4 R0f = vec4(0.0); -vec4 R1f = vec4(0.0); -vec4 R123f = vec4(0.0); -vec4 R125f = vec4(0.0); -vec4 R126f = vec4(0.0); -vec4 R127f = vec4(0.0); -float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; -vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); -float PS0f = 0.0, PS1f = 0.0; -vec4 tempf = vec4(0.0); -float tempResultf; -int tempResulti; -ivec4 ARi = ivec4(0); -bool predResult = true; -vec3 cubeMapSTM; -int cubeMapFaceId; -R0f = passParameterSem0; -R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); -vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; -bloom *= bloomFactor; -R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); -float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); -R0f.xyz += vec3(smask); -// -- Original shader code -// 0 -R126f.x = R1f.x + R0f.x; -PV0f.x = R126f.x; -R127f.y = R1f.y + R0f.y; -PV0f.y = R127f.y; -R126f.z = R1f.z + R0f.z; -PV0f.z = R126f.z; -R125f.w = 1.0; -// 1 -tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(0x3e99096c),intBitsToFloat(0x3f162b6b),intBitsToFloat(0x3dea4a8c),0.0)); -PV1f.x = tempf.x; -PV1f.y = tempf.x; -PV1f.z = tempf.x; -PV1f.w = tempf.x; -// 2 -R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); -PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); -R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); -R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); -R126f.w = 1.0 / PV1f.x; -PS0f = R126f.w; -// 3 -PS1f = exp2(PV0f.y); -// 4 -PV0f.x = -(PS1f) + 1.0; -PS0f = exp2(R127f.x); -// 5 -R127f.x = -(PS0f) + 1.0; -R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); -PV1f.z = PV0f.x * R126f.w; -PS1f = exp2(R127f.w); -// 6 -backupReg0f = R126f.x; -backupReg1f = R127f.z; -R126f.x = mul_nonIEEE(backupReg0f, PV1f.z); -PV0f.y = -(PS1f) + 1.0; -R127f.z = mul_nonIEEE(R126f.z, PV1f.z); -PV0f.z = R127f.z; -R127f.w = mul_nonIEEE(R127f.y, PV1f.z); -PV0f.w = R127f.w; -PS0f = exp2(backupReg1f); -// 7 -PV1f.x = R127f.x + -(PV0f.w); -PV1f.y = PV0f.y + -(PV0f.z); -PV1f.w = -(PS0f) + 1.0; -// 8 -backupReg0f = R127f.z; -R127f.x = (mul_nonIEEE(PV1f.x,R126f.y) + R127f.w); -R127f.x = clamp(R127f.x, 0.0, 1.0); -PV0f.x = R127f.x; -PV0f.y = PV1f.w + -(R126f.x); -R127f.z = (mul_nonIEEE(PV1f.y,R126f.y) + backupReg0f); -R127f.z = clamp(R127f.z, 0.0, 1.0); -PV0f.z = R127f.z; -// 9 -backupReg0f = R126f.x; -R126f.x = (mul_nonIEEE(PV0f.y,R126f.y) + backupReg0f); -R126f.x = clamp(R126f.x, 0.0, 1.0); -PV1f.x = R126f.x; -PV1f.w = max(PV0f.x, PV0f.z); -// 10 -tempf.x = dot(vec4(PV1f.x,R127f.x,R127f.z,R125f.w),vec4(intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),intBitsToFloat(0x3f2aaaab),-(1.0))); -PV0f.x = tempf.x; -PV0f.y = tempf.x; -PV0f.z = tempf.x; -PV0f.w = tempf.x; -R126f.z = max(PV1f.x, PV1f.w); -PS0f = R126f.z; -// 11 -backupReg0f = R127f.x; -backupReg1f = R127f.z; -R127f.x = R126f.x + -(PS0f); -R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); -PV1f.y = R123f.y; -R127f.z = backupReg0f + -(PS0f); -R125f.w = backupReg1f + -(PS0f); -// 12 -R123f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); -PV0f.x = R123f.x; -// 13 -R0f.x = (mul_nonIEEE(R127f.x,PV0f.x) + R126f.z); -R0f.y = (mul_nonIEEE(R127f.z,PV0f.x) + R126f.z); -R0f.z = (mul_nonIEEE(R125f.w,PV0f.x) + R126f.z); - -// -- End original shader code - -passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); -vec3 color = (passPixelColor0.xyz); -color += bloom; -color = Technicolor2(color); -color = LiftGammaGainPass(color); -passPixelColor0 = vec4(color, R0f.w); -} \ No newline at end of file diff --git a/Enhancement/BreathOfTheWild_ClarityGFXv176/ReadME.txt b/Enhancement/BreathOfTheWild_ClarityGFXv176/ReadME.txt deleted file mode 100644 index a12555ad..00000000 --- a/Enhancement/BreathOfTheWild_ClarityGFXv176/ReadME.txt +++ /dev/null @@ -1,11 +0,0 @@ -The Preset folder Contains the following Presets -AVGLuma -BSOD -HDROFF -SKYRIM - Frost -Skyrim - Jamie -The Complaining Gamer - TCG -Original -------------------------------- -The Default file is already set to go with the Origonal preset, but feel free to copy paste the contents -from one preset to the one in the main directory, to test diffrent ones or to just make your own.