ClarityGFX

Updated with Serfrost's Defaults for Public.
This commit is contained in:
Jamie 2017-11-10 03:07:43 -08:00
parent fa114060eb
commit d0d4cc57e8

View File

@ -19,32 +19,32 @@
// Credit to Serfrost for preset values. // Credit to Serfrost for preset values.
// Original shader dumped using cemu 1.10.0f, BotW 1.3.1 // Original shader dumped using cemu 1.10.0f, BotW 1.3.1
//v0.9 //v0.9b
//########################################################## //##########################################################
//ToneMapping //ToneMapping
float bloomFactor = 0.35; //Default is 1.0 float bloomFactor = 0.25; //Default is 1.0
float Bleach = 0.0002; //Default is 0.0 float Bleach = 0.3; //Default is 0.0
float exposure = 1.25; //Default is 1.0 float exposure = 1.13; //Default is 1.0
float defog = 0.003; //Default is 0.0 float defog = 0.004; //Default is 0.0
//Lift Gamma Gain //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_Lift vec3(1.05, 1.10, 1.05) //[0.000 to 2.000] Adjust shadows for Red, Green and Blue.
#define RGB_Gamma vec3(0.90, 0.90, 0.90) //[0.000 to 2.000] Adjust midtones 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.0, 1.0, 1.0) //[0.000 to 2.000] Adjust highlights for Red, Green and Blue #define RGB_Gain vec3(1.10, 0.95, 1.15) //[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. //Note that a value of 1.0 is a neutral setting that leave the color unchanged.
//Curves //Curves
float Contrast = 0.80; //[-1.0, 1.0] The amount of contrast you want float Contrast = 0.50; //[-1.0, 1.0] The amount of contrast you want
//Levels Control //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 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 const int WhitePoint = 245; //[0, 255] The new white point. Everything brighter than this becomes completely white
//LumaShapening //LumaShapening
#define sharp_strength 0.60 //[0.10 to 3.00] Strength of the sharpening Default is 0.65 #define sharp_strength 0.65 //[0.10 to 3.00] Strength of the sharpening Default is 0.65
#define sharp_clamp 0.060 //[0.000 to 1.000] Limits maximum amount of sharpening a pixel recieves - Default is 0.035 #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 //Advanced sharpening settings
#define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern. #define offset_bias 1.0 //[0.0 to 6.0] Offset bias adjusts the radius of the sampling pattern.
@ -53,12 +53,12 @@ const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter
#define Technicolor2_Red_Strength 0.0 //Default is 0.0 #define Technicolor2_Red_Strength 0.0 //Default is 0.0
#define Technicolor2_Green_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_Blue_Strength 0.0 //Default is 0.0
#define Technicolor2_Brightness 0.95 //Default is 1.0 #define Technicolor2_Brightness 0.50 //Default is 1.0
#define Technicolor2_Strength 0.40 //Default is 1.0 #define Technicolor2_Strength 1.0 //Default is 1.0
#define Technicolor2_Saturation 0.85 //Default is 1.0 #define Technicolor2_Saturation 0.67 //Default is 1.0
//Fake High Dynamic Range. //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 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 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." #define radius2 0.87 // 0.0 to 8.0 "Default 0.87 , will affect FX."
@ -68,7 +68,7 @@ const int WhitePoint = 255; //[0, 255] The new white point. Everything brighter
float sat = 0.0; float sat = 0.0;
const vec3 FogColor = vec3(0.0, 1.03, 0.0); //defog Color"; const vec3 FogColor = vec3(1.0, 1.5, 1.0); //defog Color";
uniform ivec4 uf_remappedPS[1]; 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 = 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
@ -78,20 +78,20 @@ layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale; uniform vec2 uf_fragCoordScale;
int clampFI32(int v) int clampFI32(int v)
{ {
if( v == 0x7FFFFFFF ) if (v == 0x7FFFFFFF)
return floatBitsToInt(1.0); return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF ) else if (v == 0xFFFFFFFF)
return floatBitsToInt(0.0); return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.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; } float mul_nonIEEE(float a, float b) { if (a == 0.0 || b == 0.0) return 0.0; return a*b; }
//ToneMapping //ToneMapping
vec3 TonemapPass(vec3 inputColor) { vec3 TonemapPass(vec3 inputColor) {
vec3 color = inputColor; vec3 color = inputColor;
color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog color = clamp(color - defog * FogColor * 2.55, 0.0, 1.0); // defog
color *= exposure/(1.0+ color / exposure); color *= exposure / (1.0 + color / exposure);
const vec3 coefLuma = vec3(0.2126, 0.7152, 0.0722); const vec3 coefLuma = vec3(0.2126, 0.7152, 0.0722);
float lum = dot(coefLuma, color); float lum = dot(coefLuma, color);
@ -170,14 +170,14 @@ vec3 Technicolor2(vec3 inputColor) {
//Lift Gamma Gain //Lift Gamma Gain
vec3 LiftGammaGainPass( vec3 colorInput ) vec3 LiftGammaGainPass(vec3 colorInput)
{ {
// -- Get input -- // -- Get input --
vec3 color = colorInput; vec3 color = colorInput;
// -- Lift -- // -- Lift --
color = color * (1.5-0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5; 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. color = clamp(color, 0.0, 1.0); //isn't strictly necessary, but doesn't cost performance.
// -- Gain -- // -- Gain --
@ -187,7 +187,6 @@ vec3 Technicolor2(vec3 inputColor) {
color = pow(color, 1.0 / RGB_Gamma); //Gamma color = pow(color, 1.0 / RGB_Gamma); //Gamma
// -- Return output -- // -- Return output --
return clamp(color, 0.0, 1.0); return clamp(color, 0.0, 1.0);
} }
@ -197,7 +196,7 @@ vec3 Technicolor2(vec3 inputColor) {
#define py (1.0/720.0*uf_fragCoordScale.y) #define py (1.0/720.0*uf_fragCoordScale.y)
#define CoefLuma vec3(0.2126, 0.7152, 0.0722) #define CoefLuma vec3(0.2126, 0.7152, 0.0722)
float lumasharping(sampler2D tex, vec2 pos){ float lumasharping(sampler2D tex, vec2 pos) {
vec4 colorInput = texture(tex, pos); vec4 colorInput = texture(tex, pos);
vec3 ori = colorInput.rgb; vec3 ori = colorInput.rgb;
@ -214,10 +213,10 @@ float lumasharping(sampler2D tex, vec2 pos){
//float px = 1.0/tex_size[0]; //float px = 1.0/tex_size[0];
//float py = 1.0/tex_size[1]; //float py = 1.0/tex_size[1];
vec3 blur_ori = texture(tex, pos + vec2(px,-py) * 0.5 * offset_bias).rgb; // South East 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; // 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 East
blur_ori += texture(tex, pos + vec2(-px,py) * 0.5 * offset_bias).rgb; // North West 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 blur_ori *= 0.25; // ( /= 4) Divide by the number of texture fetches
@ -225,9 +224,9 @@ float lumasharping(sampler2D tex, vec2 pos){
vec3 sharp = ori - blur_ori; //Subtracting the blurred image from the original image 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 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 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 sharp_luma = (sharp_clamp * 2.0) * sharp_luma - sharp_clamp; //scale down
@ -239,28 +238,28 @@ float lumasharping(sampler2D tex, vec2 pos){
//Fake High Dynamic Range. //Fake High Dynamic Range.
vec3 HDRPass(sampler2D tex, vec2 pos){ vec3 HDRPass(sampler2D tex, vec2 pos) {
vec3 color = texture(tex, pos).rgb; vec3 color = texture(tex, pos).rgb;
vec3 bloom_sum1 = texture(tex, pos + vec2(1.5, -1.5) * radius1 * vec2(px,py)).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(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( 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 += 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; bloom_sum1 *= 0.005;
vec3 bloom_sum2 = texture(tex, pos + vec2(1.5, -1.5) * radius2 * vec2(px,py)).rgb; 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(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( 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 += 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; bloom_sum2 *= 0.010;
@ -275,129 +274,129 @@ vec3 HDRPass(sampler2D tex, vec2 pos){
void main() void main()
{ {
vec4 R0f = vec4(0.0); vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0); vec4 R1f = vec4(0.0);
vec4 R123f = vec4(0.0); vec4 R123f = vec4(0.0);
vec4 R125f = vec4(0.0); vec4 R125f = vec4(0.0);
vec4 R126f = vec4(0.0); vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0); vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0; float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0); vec4 tempf = vec4(0.0);
float tempResultf; float tempResultf;
int tempResulti; int tempResulti;
ivec4 ARi = ivec4(0); ivec4 ARi = ivec4(0);
bool predResult = true; bool predResult = true;
vec3 cubeMapSTM; vec3 cubeMapSTM;
int cubeMapFaceId; int cubeMapFaceId;
R0f = passParameterSem0; R0f = passParameterSem0;
R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz; vec3 bloom = texture(textureUnitPS0, passParameterSem0.xy).xyz;
bloom *= bloomFactor; bloom *= bloomFactor;
R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy); R0f.xyz = HDRPass(textureUnitPS1, passParameterSem0.xy);
float smask = lumasharping(textureUnitPS1, passParameterSem0.xy); float smask = lumasharping(textureUnitPS1, passParameterSem0.xy);
R0f.xyz += vec3(smask); R0f.xyz += vec3(smask);
// 0 // 0
R126f.x = R1f.x + R0f.x; R126f.x = R1f.x + R0f.x;
PV0f.x = R126f.x; PV0f.x = R126f.x;
R127f.y = R1f.y + R0f.y; R127f.y = R1f.y + R0f.y;
PV0f.y = R127f.y; PV0f.y = R127f.y;
R126f.z = R1f.z + R0f.z; R126f.z = R1f.z + R0f.z;
PV0f.z = R126f.z; PV0f.z = R126f.z;
R125f.w = 1.0; R125f.w = 1.0;
// 1 // 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.x = tempf.x;
PV1f.y = tempf.x; PV1f.y = tempf.x;
PV1f.z = tempf.x; PV1f.z = tempf.x;
PV1f.w = tempf.x; PV1f.w = tempf.x;
// 2 // 2
R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b); R127f.x = -(R127f.y) * intBitsToFloat(0x3fb8aa3b);
PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b); PV0f.y = -(PV1f.x) * intBitsToFloat(0x3fb8aa3b);
R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b); R127f.z = -(R126f.x) * intBitsToFloat(0x3fb8aa3b);
R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b); R127f.w = -(R126f.z) * intBitsToFloat(0x3fb8aa3b);
R126f.w = 1.0 / PV1f.x; R126f.w = 1.0 / PV1f.x;
PS0f = R126f.w; PS0f = R126f.w;
// 3 // 3
PS1f = exp2(PV0f.y); PS1f = exp2(PV0f.y);
// 4 // 4
PV0f.x = -(PS1f) + 1.0; PV0f.x = -(PS1f)+1.0;
PS0f = exp2(R127f.x); PS0f = exp2(R127f.x);
// 5 // 5
R127f.x = -(PS0f) + 1.0; R127f.x = -(PS0f)+1.0;
R126f.y = mul_nonIEEE(PV0f.x, PV0f.x); R126f.y = mul_nonIEEE(PV0f.x, PV0f.x);
PV1f.z = PV0f.x * R126f.w; PV1f.z = PV0f.x * R126f.w;
PS1f = exp2(R127f.w); PS1f = exp2(R127f.w);
// 6 // 6
backupReg0f = R126f.x; backupReg0f = R126f.x;
backupReg1f = R127f.z; backupReg1f = R127f.z;
R126f.x = mul_nonIEEE(backupReg0f, PV1f.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); R127f.z = mul_nonIEEE(R126f.z, PV1f.z);
PV0f.z = R127f.z; PV0f.z = R127f.z;
R127f.w = mul_nonIEEE(R127f.y, PV1f.z); R127f.w = mul_nonIEEE(R127f.y, PV1f.z);
PV0f.w = R127f.w; PV0f.w = R127f.w;
PS0f = exp2(backupReg1f); PS0f = exp2(backupReg1f);
// 7 // 7
PV1f.x = R127f.x + -(PV0f.w); PV1f.x = R127f.x + -(PV0f.w);
PV1f.y = PV0f.y + -(PV0f.z); PV1f.y = PV0f.y + -(PV0f.z);
PV1f.w = -(PS0f) + 1.0; PV1f.w = -(PS0f)+1.0;
// 8 // 8
backupReg0f = R127f.z; 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); R127f.x = clamp(R127f.x, 0.0, 1.0);
PV0f.x = R127f.x; PV0f.x = R127f.x;
PV0f.y = PV1f.w + -(R126f.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); R127f.z = clamp(R127f.z, 0.0, 1.0);
PV0f.z = R127f.z; PV0f.z = R127f.z;
// 9 // 9
backupReg0f = R126f.x; 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); R126f.x = clamp(R126f.x, 0.0, 1.0);
PV1f.x = R126f.x; PV1f.x = R126f.x;
R126f.y = max(PV0f.x, PV0f.z); R126f.y = max(PV0f.x, PV0f.z);
PV1f.w = min(PV0f.x, PV0f.z); PV1f.w = min(PV0f.x, PV0f.z);
// 10 // 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.x = tempf.x;
PV0f.y = tempf.x; PV0f.y = tempf.x;
PV0f.z = tempf.x; PV0f.z = tempf.x;
PV0f.w = tempf.x; PV0f.w = tempf.x;
R126f.z = min(PV1f.x, PV1f.w); R126f.z = min(PV1f.x, PV1f.w);
PS0f = R126f.z; PS0f = R126f.z;
// 11 // 11
backupReg0f = R127f.x; backupReg0f = R127f.x;
backupReg1f = R127f.z; backupReg1f = R127f.z;
R127f.x = max(R126f.x, R126f.y); R127f.x = max(R126f.x, R126f.y);
PV1f.x = R127f.x; PV1f.x = R127f.x;
R123f.y = (mul_nonIEEE(-(PV0f.x),PV0f.x) + 1.0); R123f.y = (mul_nonIEEE(-(PV0f.x), PV0f.x) + 1.0);
PV1f.y = R123f.y; PV1f.y = R123f.y;
R127f.z = backupReg0f + -(PS0f); R127f.z = backupReg0f + -(PS0f);
R125f.w = R126f.x + -(PS0f); R125f.w = R126f.x + -(PS0f);
R126f.y = backupReg1f + -(PS0f); R126f.y = backupReg1f + -(PS0f);
PS1f = R126f.y; PS1f = R126f.y;
// 12 // 12
R126f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x)); R126f.x = (mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x));
PV0f.x = R126f.x; PV0f.x = R126f.x;
PV0f.y = -(R126f.z) + PV1f.x; PV0f.y = -(R126f.z) + PV1f.x;
// 13 // 13
R123f.w = (mul_nonIEEE(-(PV0f.x),PV0f.y) + R127f.x); R123f.w = (mul_nonIEEE(-(PV0f.x), PV0f.y) + R127f.x);
PV1f.w = R123f.w; PV1f.w = R123f.w;
// 14 // 14
R0f.x = (mul_nonIEEE(R126f.x,R125f.w) + PV1f.w); R0f.x = (mul_nonIEEE(R126f.x, R125f.w) + PV1f.w);
R0f.y = (mul_nonIEEE(R126f.x,R127f.z) + PV1f.w); R0f.y = (mul_nonIEEE(R126f.x, R127f.z) + PV1f.w);
R0f.z = (mul_nonIEEE(R126f.x,R126f.y) + PV1f.w); R0f.z = (mul_nonIEEE(R126f.x, R126f.y) + PV1f.w);
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
vec3 color = (passPixelColor0.xyz); vec3 color = (passPixelColor0.xyz);
color += bloom; color += bloom;
color = TonemapPass(color); color = TonemapPass(color);
color = Technicolor2(color); color = Technicolor2(color);
color = LevelsPass(color); color = LevelsPass(color);
color = CurvesPass(color); color = CurvesPass(color);
color = LiftGammaGainPass(color); color = LiftGammaGainPass(color);
passPixelColor0 = vec4(color, R0f.w); passPixelColor0 = vec4(color, R0f.w);
} }