Fixed DPX, also sould have fixed issue where AMD gpu reports input as a reserved value...  (According to amd Shader Valadator.)
This commit is contained in:
Jamie 2018-01-27 02:06:24 -08:00
parent 47c3e6e991
commit 950f627360

View File

@ -2,7 +2,7 @@
#extension GL_ARB_texture_gather : enable
// shader 37040a485a29d54e
//##########################################################
#define Preset 3 // 0 - 8:
#define Preset 3
// User Defined 0
// Bruz Option 1
// BSOD Option 2
@ -289,7 +289,7 @@ float DPX_Strength = 0.20;
vec3 RGB_Lift = vec3(0.980, 0.980, 0.980);
vec3 RGB_Gamma = vec3(1.000, 1.000, 1.000);
vec3 RGB_Gain = vec3(1.000, 1.000, 1.000);
#define vibpass 1
#define vibpass 0
const float Vibrance = 0.150;
vec3 VibranceRGBBalance = vec3(1.0, 1.0, 1.0);
#define Tech 0
@ -308,7 +308,7 @@ float DPX_Strength = 0.20;
vec3 ColorMatrix_Green = vec3(0.333, 0.667, 0.000);
vec3 ColorMatrix_Blue = vec3(0.000, 0.125, 0.875);
float CM_Strength = 1.0;
#define CurvesPss 1
#define CurvesPss 0
const float Contrast = 0.65;
#define Filmicpass 0
const float Filmic_Contrast = 1.0;
@ -324,8 +324,8 @@ float DPX_Strength = 0.20;
vec3 RGB_Curve = vec3(8.0, 8.0, 8.0);
vec3 RGB_C = vec3(0.36, 0.36, 0.34);
float DPX_Contrast = 0.1;
float DPX_Saturation = 3.0;
float Colorfulness = 2.5;
float DPX_Saturation = 0.0;
float Colorfulness = 1.0;
float DPX_Strength = 0.20;
#elif (Preset == 4)
#define adjust_bloom 1
@ -654,8 +654,8 @@ float DPX_Strength = 0.20;
vec3 RGB_Curve = vec3(8.0, 8.0, 8.0);
vec3 RGB_C = vec3(0.36, 0.36, 0.34);
float DPX_Contrast = 0.1;
float DPX_Saturation = 3.0;
float Colorfulness = 2.5;
float DPX_Saturation = 2.0;
float Colorfulness = 1.5;
float DPX_Strength = 0.20;
#endif
//###########################################################
@ -1015,24 +1015,24 @@ const mat3 XYZ = mat3(
);
vec3 DPXPass(vec3 inputColor)
{
vec3 input = inputColor.rgb;
vec3 color = inputColor;
vec3 B = input;
vec3 B = color;
B = B * (1.0 - DPX_Contrast) + (0.5 * DPX_Contrast);
vec3 Btemp = (1.0 / (1.0 + exp(RGB_Curve / 2.0)));
B = ((1.0 / (1.0 + exp(-RGB_Curve * (B - RGB_C)))) / (-2.0 * Btemp + 1.0)) + (-Btemp / (-2.0 * Btemp + 1.0));
float value = max(max(B.r, B.g), B.b);
vec3 color = B / value;
vec3 input = B / value;
color = pow(abs(color), 1. / vec3(Colorfulness));
vec3 c0 = color * value;
vec3 c0 = input * value;
c0 *= (XYZ, c0);
float luma = dot(c0, vec3(0.30, 0.59, 0.11));
c0 = (1.0 - DPX_Saturation) * luma + DPX_Saturation * c0;
c0 *= (RGB, c0);
return mix(input, c0, DPX_Strength);
return mix(color, c0, DPX_Strength);
}
//Lift Gamma Gain