From 26f9bcfaaa2ba6539cb3fed99958020e35756f11 Mon Sep 17 00:00:00 2001 From: NAVras-Z Date: Wed, 8 Nov 2017 15:09:43 +0800 Subject: [PATCH] [BotW] contrasty remove reshade tonemap Turns out it's not tonemap Credit SkalFate on discord ACES now with a simple exposure that can be tweaked, default 0.6 to match original curve according the author --- .../bd8bba59e2149449_00000000000003c9_ps.txt | 42 +++---------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/Enhancement/BreathOfTheWild_Contrasty/bd8bba59e2149449_00000000000003c9_ps.txt b/Enhancement/BreathOfTheWild_Contrasty/bd8bba59e2149449_00000000000003c9_ps.txt index 4d017f5b..82a882a7 100644 --- a/Enhancement/BreathOfTheWild_Contrasty/bd8bba59e2149449_00000000000003c9_ps.txt +++ b/Enhancement/BreathOfTheWild_Contrasty/bd8bba59e2149449_00000000000003c9_ps.txt @@ -11,14 +11,8 @@ const float bloomFactor = 0.7; // 1.0 is neutral // -1: disable, clamp bright detail but keep [0,1] intact, however clamping could lead to desaturation as well // 0: (Wii U) BotW original // 1: ACES Filmic -// 2: Reshade/Sweetfx Tonemap, also allow color adjusting during tone mapping -//-----------------"Reshade Tonemap" Parameters---------------// -const float Gamma = 1.0; // [ 0.0, 2.0] 1.000 is neutral -const float Exposure = 0.0; // [-1.0, 1.0] Adjust exposure -const float Saturation = 0.0; // [-1.0, 1.0] Adjust saturation -const float Bleach = 0.0; // [ 0.0, 1.0] Brightens the shadows and fades the colors -const float Detint = 0.0; // [ 0.0, 1.0+] How much of the color tint to remove -const vec3 tintColor = vec3(0.0, 0.0, 0.0); // [ 0.0, 1.0+] Which color tint to remove +//--------------------"ACES Filmic" Parameters-----------------// +const float Exposure = 0.6; // [0.0, 1.0+] Adjust exposure //---------------------------------------------------------------// #define post_process 2 @@ -26,7 +20,7 @@ const vec3 tintColor = vec3(0.0, 0.0, 0.0); // [ 0.0, 1.0+] Which color tint to // 0: (Wii U) BotW original, only vibrance // 1: Reshade Vibrance // 2: Contrasty -// 3: experiment, convert rgb to hsv then adjust s +// 3: Experimental, convert rgb to hsv then adjust saturation directly //----------------"BotW original" vibrance adjust-------------// const float satFactor = 0.29; // 0.18 is neutral. Experimental, adjust native saturation //---------------------------------------------------------------// @@ -41,7 +35,7 @@ const float vibrance = 0.45; // 0.0 is neutral const float crushContrast = 0.004; // 0.0 is neutral. Use small increments, loss of shadow detail //---------------------------------------------------------------// //------------------------"hsv experiment"---------------------// -const float satScale = 1.5; +const float satScale = 1.5; // 1.0 is neutral //---------------------------------------------------------------// /*==========================================================================*/ @@ -72,34 +66,10 @@ vec3 BotWToneMap(vec3 color) { } vec3 ACESFilm(vec3 color) { - color *= 0.6; + color *= Exposure; return (color*(2.51*color+0.03))/(color*(2.43*color+0.59)+0.14); } -vec3 ReshadeTM(vec3 color) { - color = clamp(color - Detint * tintColor,0.0,1.0); // Detint, removed 2.55 - color *= pow(2.0f, Exposure); // Exposure - color = pow(color, vec3(1.0/Gamma)); // Reciprocal Gamma, like contrasty, more intuitive, not exactly midtone anyway - - float lum = getL709(color); - - float L = clamp(10.0 * (lum - 0.45),0.0,1.0); - vec3 A2 = Bleach * color; - - vec3 result1 = 2.0 * color * lum; - vec3 result2 = 1.0 - 2.0 * (1.0 - lum) * (1.0 - color); - - vec3 newColor = mix(result1, result2, L); - vec3 mixRGB = A2 * newColor; - color += ((1.0 - A2) * mixRGB); - - vec3 middlegray = vec3(dot(color, vec3(1.0 / 3.0))); - vec3 diffcolor = color - middlegray; - color = (color + diffcolor * Saturation) / (1.0 + (diffcolor * Saturation)); // Saturation - - return color; -} - vec3 BotWVibrance(vec3 color) { float avg = (color.r + color.g + color.b)/3.0; float maxc = max(color.r, max(color.g,color.b)); @@ -172,8 +142,6 @@ color = clamp(color,0.0,1.0); color = BotWToneMap(color); #elif (tone_mapping == 1) color = ACESFilm(color); -#elif (tone_mapping == 2) -color = ReshadeTM(color); #endif #if (post_process == 0)