From 2ddb628734bc345fb821c42a9fc87255e7ba6f68 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Tue, 15 Oct 2024 22:22:07 +0200 Subject: [PATCH] [TPHD] Remove Bloom from Contrasty in favor of dedicated bloom pack --- .../TwilightPrincessHD_Contrasty/rules.txt | 46 +- ..._49865bd2e62efda1_0000000000000079_ps.txt} | 164 ++-- ..._5f422bf63e25be7f_0000000000000079_ps.txt} | 176 ++--- ..._95a5a89d62998e0d_0000000000000079_ps.txt} | 734 +++++++++--------- ..._e334517825fdd599_0000000000000079_ps.txt} | 260 +++---- 5 files changed, 690 insertions(+), 690 deletions(-) rename Enhancements/TwilightPrincessHD_Contrasty/{49865bd2e62efda1_0000000000000079_ps.txt => unused_49865bd2e62efda1_0000000000000079_ps.txt} (97%) rename Enhancements/TwilightPrincessHD_Contrasty/{5f422bf63e25be7f_0000000000000079_ps.txt => unused_5f422bf63e25be7f_0000000000000079_ps.txt} (97%) rename Enhancements/TwilightPrincessHD_Contrasty/{95a5a89d62998e0d_0000000000000079_ps.txt => unused_95a5a89d62998e0d_0000000000000079_ps.txt} (97%) rename Enhancements/TwilightPrincessHD_Contrasty/{_e334517825fdd599_0000000000000079_ps.txt => unused_e334517825fdd599_0000000000000079_ps.txt} (97%) diff --git a/Enhancements/TwilightPrincessHD_Contrasty/rules.txt b/Enhancements/TwilightPrincessHD_Contrasty/rules.txt index 423e8fdf8..55f9c5bc3 100644 --- a/Enhancements/TwilightPrincessHD_Contrasty/rules.txt +++ b/Enhancements/TwilightPrincessHD_Contrasty/rules.txt @@ -19,12 +19,12 @@ $blueHilight = 1.0 $contrastCurve = 0.0 $hazeFactor = 1.0 -$bloom = 1.0 +# $bloom = 1.0 $gamma = 1.0 $exposure = 1.0 $vibrance = 0.0 $crushContrast = 0.0 -$bleach = 1.0 +# $bleach = 1.0 $sharp_mix = 0.0 [Preset] # Preserve original washed out look, but balances bloom white point towards neutral @@ -41,12 +41,12 @@ $blueHilight = 1.15 $contrastCurve = 0.0 $hazeFactor = 0.1 -$bloom = 1.0 +# $bloom = 1.0 $gamma = 1.0 $exposure = 1.0 $vibrance = 0.25 $crushContrast = 0.0 -$bleach = 0.85 +# $bleach = 0.85 $sharp_mix = 0.0 [Preset] #Warm and washed out light-sources and bloom, original look "enhanced". @@ -63,12 +63,12 @@ $blueHilight = 1.0 $contrastCurve = 0.5 $hazeFactor = 0.71 -$bloom = 0.85 +# $bloom = 0.85 $gamma = 1.1 $exposure = 1.07 $vibrance = 0.15 $crushContrast = 0.00 -$bleach = 0.85 +# $bleach = 0.85 $sharp_mix = 0.05 [Preset] # Colourful midway between original and cold @@ -85,15 +85,15 @@ $blueHilight = 1.01 $contrastCurve = 0.25 $hazeFactor = 0.1 -$bloom = 1.0 +# $bloom = 1.0 $gamma = 1.075 $exposure = 1.01 $vibrance = 0.55 $crushContrast = 0.0 -$bleach = 0.85 +# $bleach = 0.85 $sharp_mix = 0.05 -[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx +[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx name = Cold $redShadows = 0.99 #0.99 $greenShadows = 1.0 # 1.0 @@ -107,15 +107,15 @@ $blueHilight = 1.11 #1.14 $contrastCurve = 0.25 $hazeFactor = 0.1 -$bloom = 0.975 + $gamma = 1.025 $exposure = 1.025 $vibrance = 0.48 $crushContrast = 0.0 -$bleach = 0.875 +# $bleach = 0.875 $sharp_mix = 0.00 -[Preset] #Warm colour palette, light and shadows interplay, caves are dark. +[Preset] #Warm colour palette, light and shadows interplay, caves are dark. name = Warm contrast crush $redShadows = 1.0 #1.02 #0.99 $greenShadows = 1.0 #1.05 # 1.0 @@ -129,15 +129,15 @@ $blueHilight = 1.05 #1.14 $contrastCurve = 0.75 $hazeFactor = 0.1 -$bloom = 0.975 +# $bloom = 0.975 $gamma = 1.03 $exposure = 1.01 $vibrance = 0.25 $crushContrast = 0.0 -$bleach = 0.875 +# $bleach = 0.875 $sharp_mix = 0.00 -[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx +[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx name = Cold contrast crush $redShadows = 1.01 #1.02 #0.99 $greenShadows = 1.03 #1.05 # 1.0 @@ -151,15 +151,15 @@ $blueHilight = 1.08 #1.14 $contrastCurve = 0.75 $hazeFactor = 0.1 -$bloom = 0.975 +# $bloom = 0.975 $gamma = 1.01 $exposure = 1.01 $vibrance = 0.29 $crushContrast = 0.0 -$bleach = 0.875 +# $bleach = 0.875 $sharp_mix = 0.00 -[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx +[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx name = Cold contrast preserve highlights $redShadows = 1.01 #1.02 #0.99 $greenShadows = 1.02 #1.05 # 1.0 @@ -173,17 +173,17 @@ $blueHilight = 1.09 #1.14 $contrastCurve = 0.25 $hazeFactor = 0.1 -$bloom = 0.975 +# $bloom = 0.975 $gamma = 0.75 $exposure = 1.125 $vibrance = 0.35 $crushContrast = 0.0 -$bleach = 0.875 +# $bleach = 0.875 $sharp_mix = 0.00 [Preset] # jff -name = Skyward Swordish +name = Skyward Swordish $redShadows = 0.95 $greenShadows = 0.95 $blueSadows = 1.0 @@ -196,10 +196,10 @@ $blueHilight = 1.01 $contrastCurve = 0.95 $hazeFactor = 0.71 -$bloom = 0.85 +# $bloom = 0.85 $gamma = 1.25 $exposure = 1.1 $vibrance = 1.25 $crushContrast = 0.00 -$bleach = 0.85 +# $bleach = 0.85 $sharp_mix = 0.05 diff --git a/Enhancements/TwilightPrincessHD_Contrasty/49865bd2e62efda1_0000000000000079_ps.txt b/Enhancements/TwilightPrincessHD_Contrasty/unused_49865bd2e62efda1_0000000000000079_ps.txt similarity index 97% rename from Enhancements/TwilightPrincessHD_Contrasty/49865bd2e62efda1_0000000000000079_ps.txt rename to Enhancements/TwilightPrincessHD_Contrasty/unused_49865bd2e62efda1_0000000000000079_ps.txt index 64667721b..a63369ed4 100644 --- a/Enhancements/TwilightPrincessHD_Contrasty/49865bd2e62efda1_0000000000000079_ps.txt +++ b/Enhancements/TwilightPrincessHD_Contrasty/unused_49865bd2e62efda1_0000000000000079_ps.txt @@ -1,82 +1,82 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -#extension GL_ARB_separate_shader_objects : enable -#ifdef VULKAN -#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) -#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) -#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) -#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 -#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) -#define gl_VertexID gl_VertexIndex -#define gl_InstanceID gl_InstanceIndex -#else -#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) -#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) -#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) -#define SET_POSITION(_v) gl_Position = _v -#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) -#endif -// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. - -// shader 49865bd2e62efda1 -//dark world bloom - -const float bloom = $bloom; -#ifdef VULKAN -layout(set = 1, binding = 1) uniform ufBlock -{ -uniform ivec4 uf_remappedPS[1]; -uniform vec4 uf_fragCoordScale; -}; -#else -uniform ivec4 uf_remappedPS[1]; -uniform vec2 uf_fragCoordScale; -#endif -TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; -// uf_fragCoordScale was moved to the ufBlock -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; } -void main() -{ -vec4 R0f = 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; -R0f.xyz = (textureLod(textureUnitPS0, R0f.xy,0.0).xyz)*bloom; -// 0 -backupReg0f = R0f.y; -backupReg1f = R0f.x; -PV0f.x = mul_nonIEEE(R0f.z, intBitsToFloat(uf_remappedPS[0].z)); -PV0f.y = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[0].y)); -PV0f.z = mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedPS[0].x)); -PV0f.w = intBitsToFloat(uf_remappedPS[0].w); -// 1 -PV1f.x = max(PV0f.w, 0.0); -PV1f.y = max(PV0f.x, 0.0); -PV1f.z = max(PV0f.y, 0.0); -PV1f.w = max(PV0f.z, 0.0); -// 2 -R0f.x = min(PV1f.w, 1.0); -R0f.y = min(PV1f.z, 1.0); -R0f.z = min(PV1f.y, 1.0); -R0f.w = min(PV1f.x, 1.0); -// export -passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); -} +#version 420 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + +// shader 49865bd2e62efda1 +//dark world bloom + +const float bloom = $bloom; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[1]; +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 0) out vec4 passPixelColor0; +// uf_fragCoordScale was moved to the ufBlock +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; } +void main() +{ +vec4 R0f = 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; +R0f.xyz = (textureLod(textureUnitPS0, R0f.xy,0.0).xyz)*bloom; +// 0 +backupReg0f = R0f.y; +backupReg1f = R0f.x; +PV0f.x = mul_nonIEEE(R0f.z, intBitsToFloat(uf_remappedPS[0].z)); +PV0f.y = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[0].y)); +PV0f.z = mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedPS[0].x)); +PV0f.w = intBitsToFloat(uf_remappedPS[0].w); +// 1 +PV1f.x = max(PV0f.w, 0.0); +PV1f.y = max(PV0f.x, 0.0); +PV1f.z = max(PV0f.y, 0.0); +PV1f.w = max(PV0f.z, 0.0); +// 2 +R0f.x = min(PV1f.w, 1.0); +R0f.y = min(PV1f.z, 1.0); +R0f.z = min(PV1f.y, 1.0); +R0f.w = min(PV1f.x, 1.0); +// export +passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +} diff --git a/Enhancements/TwilightPrincessHD_Contrasty/5f422bf63e25be7f_0000000000000079_ps.txt b/Enhancements/TwilightPrincessHD_Contrasty/unused_5f422bf63e25be7f_0000000000000079_ps.txt similarity index 97% rename from Enhancements/TwilightPrincessHD_Contrasty/5f422bf63e25be7f_0000000000000079_ps.txt rename to Enhancements/TwilightPrincessHD_Contrasty/unused_5f422bf63e25be7f_0000000000000079_ps.txt index 6b97739ee..0aca94074 100644 --- a/Enhancements/TwilightPrincessHD_Contrasty/5f422bf63e25be7f_0000000000000079_ps.txt +++ b/Enhancements/TwilightPrincessHD_Contrasty/unused_5f422bf63e25be7f_0000000000000079_ps.txt @@ -1,88 +1,88 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -#extension GL_ARB_separate_shader_objects : enable -#ifdef VULKAN -#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) -#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) -#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) -#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 -#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) -#define gl_VertexID gl_VertexIndex -#define gl_InstanceID gl_InstanceIndex -#else -#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) -#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) -#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) -#define SET_POSITION(_v) gl_Position = _v -#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) -#endif -// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. - -// shader 5f422bf63e25be7f // Bleach pass cutscene - -const float bleach = $bleach; - -#ifdef VULKAN -layout(set = 1, binding = 1) uniform ufBlock -{ -uniform ivec4 uf_remappedPS[1]; -uniform vec4 uf_fragCoordScale; -}; -#else -uniform ivec4 uf_remappedPS[1]; -uniform vec2 uf_fragCoordScale; -#endif -TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; -layout(location = 0) in vec4 passParameterSem1; -layout(location = 0) out vec4 passPixelColor0; -// uf_fragCoordScale was moved to the ufBlock -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; } -void main() -{ -vec4 R0f = vec4(0.0); -vec4 R1f = 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 = passParameterSem1; -R0f.w = (texture(textureUnitPS0, R0f.xy).x); -// 0 -PV0f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000); -PV0f.z = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000); -PV0f.w = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000); -R1f.w = intBitsToFloat(uf_remappedPS[0].w); -R1f.w = clamp(R1f.w, 0.0, 1.0); -PS0f = R1f.w; -// 1 -PV1f.x = fract(PV0f.w); -PV1f.y = fract(PV0f.x); -PV1f.w = fract(PV0f.z); -// 2 -PV0f.x = PV1f.w * intBitsToFloat(0x3f808081); -PV0f.y = PV1f.x * intBitsToFloat(0x3f808081); -PV0f.z = PV1f.y * intBitsToFloat(0x3f808081); -// 3 -R1f.x = mul_nonIEEE(R0f.w, PV0f.z); -R1f.x = clamp(R1f.x, 0.0, 1.0); -R1f.y = mul_nonIEEE(R0f.w, PV0f.y); -R1f.y = clamp(R1f.y, 0.0, 1.0); -R1f.z = mul_nonIEEE(R0f.w, PV0f.x); -R1f.z = clamp(R1f.z, 0.0, 1.0); -// export -passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w) * bleach; -} +#version 420 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + +// shader 5f422bf63e25be7f // Bleach pass cutscene + +const float bleach = $bleach; + +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[1]; +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +layout(location = 0) in vec4 passParameterSem1; +layout(location = 0) out vec4 passPixelColor0; +// uf_fragCoordScale was moved to the ufBlock +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; } +void main() +{ +vec4 R0f = vec4(0.0); +vec4 R1f = 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 = passParameterSem1; +R0f.w = (texture(textureUnitPS0, R0f.xy).x); +// 0 +PV0f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000); +PV0f.z = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000); +PV0f.w = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000); +R1f.w = intBitsToFloat(uf_remappedPS[0].w); +R1f.w = clamp(R1f.w, 0.0, 1.0); +PS0f = R1f.w; +// 1 +PV1f.x = fract(PV0f.w); +PV1f.y = fract(PV0f.x); +PV1f.w = fract(PV0f.z); +// 2 +PV0f.x = PV1f.w * intBitsToFloat(0x3f808081); +PV0f.y = PV1f.x * intBitsToFloat(0x3f808081); +PV0f.z = PV1f.y * intBitsToFloat(0x3f808081); +// 3 +R1f.x = mul_nonIEEE(R0f.w, PV0f.z); +R1f.x = clamp(R1f.x, 0.0, 1.0); +R1f.y = mul_nonIEEE(R0f.w, PV0f.y); +R1f.y = clamp(R1f.y, 0.0, 1.0); +R1f.z = mul_nonIEEE(R0f.w, PV0f.x); +R1f.z = clamp(R1f.z, 0.0, 1.0); +// export +passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w) * bleach; +} diff --git a/Enhancements/TwilightPrincessHD_Contrasty/95a5a89d62998e0d_0000000000000079_ps.txt b/Enhancements/TwilightPrincessHD_Contrasty/unused_95a5a89d62998e0d_0000000000000079_ps.txt similarity index 97% rename from Enhancements/TwilightPrincessHD_Contrasty/95a5a89d62998e0d_0000000000000079_ps.txt rename to Enhancements/TwilightPrincessHD_Contrasty/unused_95a5a89d62998e0d_0000000000000079_ps.txt index 61aad3a1d..77a2fc393 100644 --- a/Enhancements/TwilightPrincessHD_Contrasty/95a5a89d62998e0d_0000000000000079_ps.txt +++ b/Enhancements/TwilightPrincessHD_Contrasty/unused_95a5a89d62998e0d_0000000000000079_ps.txt @@ -1,367 +1,367 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -#extension GL_ARB_separate_shader_objects : enable -#ifdef VULKAN -#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) -#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) -#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) -#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 -#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) -#define gl_VertexID gl_VertexIndex -#define gl_InstanceID gl_InstanceIndex -#else -#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) -#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) -#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) -#define SET_POSITION(_v) gl_Position = _v -#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) -#endif -// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. - -// shader 95a5a89d62998e0d - -// blur -const float bloom = $bloom; - -#ifdef VULKAN -layout(set = 1, binding = 1) uniform ufBlock -{ -uniform ivec4 uf_remappedPS[3]; -uniform vec4 uf_fragCoordScale; -}; -#else -uniform ivec4 uf_remappedPS[3]; -uniform vec2 uf_fragCoordScale; -#endif -TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; -layout(location = 0) out vec4 passPixelColor0; -// uf_fragCoordScale was moved to the ufBlock -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; } -void main() -{ -vec4 R0f = vec4(0.0); -vec4 R1f = vec4(0.0); -vec4 R2f = vec4(0.0); -vec4 R3f = vec4(0.0); -vec4 R4f = vec4(0.0); -vec4 R5f = vec4(0.0); -vec4 R6f = vec4(0.0); -vec4 R7f = vec4(0.0); -vec4 R123f = 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; -float scaler; -int tempResulti; -ivec4 ARi = ivec4(0); -bool predResult = true; -vec3 cubeMapSTM; -int cubeMapFaceId; -R0f = GET_FRAGCOORD(); -scaler = uf_fragCoordScale.x; -// 0 -R7f.x = R0f.x * intBitsToFloat(0x3b088889); -PV0f.x = R7f.x; -R7f.y = R0f.y * intBitsToFloat(0x3b72b9d6); -PV0f.y = R7f.y; -// 1 -R0f.x = PV0f.x; -R0f.y = PV0f.y + intBitsToFloat(0x3b72b9d6) * scaler; -R1f.z = PV0f.x; -R1f.y = PV0f.y + intBitsToFloat(0xbb72b9d6) * scaler; -PS1f = R1f.y; -// 2 -R2f.x = R7f.x; -R2f.y = R7f.y + intBitsToFloat(0x3bf2b9d6) * scaler; -R4f.z = R7f.x; -R4f.y = R7f.y + intBitsToFloat(0xbbf2b9d6) * scaler; -PS0f = R4f.y; -R3f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw); -R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); -R1f.xyzw = (textureLod(textureUnitPS0, R1f.zy,0.0).xyzw); -R2f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); -// 0 -backupReg0f = R0f.x; -backupReg1f = R0f.w; -PV0f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.y); -PV0f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.z); -PV0f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg0f); -PV0f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg1f); -R0f.y = R7f.y + intBitsToFloat(0x3c360b60) * scaler; -PS0f = R0f.y; -// 1 -R123f.x = (mul_nonIEEE(R3f.y,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.x); -PV1f.x = R123f.x; -R123f.y = (mul_nonIEEE(R3f.w,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.w); -PV1f.y = R123f.y; -R123f.z = (mul_nonIEEE(R3f.x,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.z); -PV1f.z = R123f.z; -R123f.w = (mul_nonIEEE(R3f.z,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.y); -PV1f.w = R123f.w; -R0f.x = R7f.x; -PS1f = R0f.x; -// 2 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.y) + PV1f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.x) + PV1f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.w) + PV1f.y); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.z) + PV1f.w); -PV0f.w = R123f.w; -R1f.y = R7f.y + intBitsToFloat(0xbc360b60) * scaler; -PS0f = R1f.y; -// 3 -backupReg0f = R2f.z; -R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.x) + PV0f.y); -R3f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.y) + PV0f.x); -R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.w) + PV0f.z); -R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),backupReg0f) + PV0f.w); -R1f.x = R7f.x; -PS1f = R1f.x; -// 4 -R2f.x = R7f.x; -R2f.y = R7f.y + intBitsToFloat(0x3c72b9d6) * scaler; -R6f.z = R7f.x; -R6f.y = R7f.y + intBitsToFloat(0xbc72b9d6) * scaler; -PS0f = R6f.y; -R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); -R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); -R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); -R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); -// 0 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.x) + R3f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.w) + R2f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.z) + R2f.w); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.y) + R3f.y); -PV0f.w = R123f.w; -R3f.y = R7f.y + intBitsToFloat(0x3c97b426) * scaler; -PS0f = R3f.y; -// 1 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.w) + PV0f.y); -PV1f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.x) + PV0f.x); -PV1f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.z) + PV0f.z); -PV1f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.y) + PV0f.w); -PV1f.w = R123f.w; -R3f.x = R7f.x; -PS1f = R3f.x; -// 2 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.w) + PV1f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.z) + PV1f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.y) + PV1f.w); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.x) + PV1f.y); -PV0f.w = R123f.w; -R1f.y = R7f.y + intBitsToFloat(0xbc97b426) * scaler; -PS0f = R1f.y; -// 3 -R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.y); -R0f.y = (mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.x); -R5f.z = (mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.z); -R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.w); -R1f.x = R7f.x; -PS1f = R1f.x; -// 4 -R5f.x = R7f.x; -R5f.y = R7f.y + intBitsToFloat(0x3cb60b60) * scaler; -R4f.z = R7f.x; -R4f.y = R7f.y + intBitsToFloat(0xbcb60b60) * scaler; -PS0f = R4f.y; -R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw); -R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw); -R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); -R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw); -// 0 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.z) + R0f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.y) + R5f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.x) + R5f.w); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.w) + R0f.y); -PV0f.w = R123f.w; -R0f.y = R7f.y + intBitsToFloat(0x3cd4629b) * scaler; -PS0f = R0f.y; -// 1 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.y) + PV0f.y); -PV1f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.w) + PV0f.w); -PV1f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.x) + PV0f.z); -PV1f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.z) + PV0f.x); -PV1f.w = R123f.w; -R0f.x = R7f.x; -PS1f = R0f.x; -// 2 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.y) + PV1f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.x) + PV1f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.w) + PV1f.y); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.z) + PV1f.w); -PV0f.w = R123f.w; -R1f.y = R7f.y + intBitsToFloat(0xbcd4629b) * scaler; -PS0f = R1f.y; -// 3 -backupReg0f = R2f.z; -R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.x) + PV0f.y); -R3f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.y) + PV0f.x); -R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.w) + PV0f.z); -R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),backupReg0f) + PV0f.w); -R1f.x = R7f.x; -PS1f = R1f.x; -// 4 -R2f.x = R7f.x; -R2f.y = R7f.y + intBitsToFloat(0x3cf2b9d6) * scaler; -R6f.z = R7f.x; -R6f.y = R7f.y + intBitsToFloat(0xbcf2b9d6) * scaler; -PS0f = R6f.y; -R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); -R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); -R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); -R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); -// 0 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.x) + R3f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.w) + R2f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.z) + R2f.w); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.y) + R3f.y); -PV0f.w = R123f.w; -R3f.y = R7f.y + intBitsToFloat(0x3d088888) * scaler; -PS0f = R3f.y; -// 1 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.w) + PV0f.y); -PV1f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.x) + PV0f.x); -PV1f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.z) + PV0f.z); -PV1f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.y) + PV0f.w); -PV1f.w = R123f.w; -R3f.x = R7f.x; -PS1f = R3f.x; -// 2 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.w) + PV1f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.z) + PV1f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.y) + PV1f.w); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.x) + PV1f.y); -PV0f.w = R123f.w; -R1f.y = R7f.y + intBitsToFloat(0xbd088888) * scaler; -PS0f = R1f.y; -// 3 -R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.y); -R0f.y = (mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.x); -R5f.z = (mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.z); -R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.w); -R1f.x = R7f.x; -PS1f = R1f.x; -// 4 -R5f.x = R7f.x; -R5f.y = R7f.y + intBitsToFloat(0x3d17b426) * scaler; -R4f.z = R7f.x; -R4f.y = R7f.y + intBitsToFloat(0xbd17b426) * scaler; -PS0f = R4f.y; -R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw); -R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw); -R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); -R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw); -// 0 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.z) + R0f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.y) + R5f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.x) + R5f.w); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.w) + R0f.y); -PV0f.w = R123f.w; -R0f.y = R7f.y + intBitsToFloat(0x3d26dfc3) * scaler; -PS0f = R0f.y; -// 1 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.y) + PV0f.y); -PV1f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.w) + PV0f.w); -PV1f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.x) + PV0f.z); -PV1f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.z) + PV0f.x); -PV1f.w = R123f.w; -R0f.x = R7f.x; -PS1f = R0f.x; -// 2 -backupReg0f = R7f.y; -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.y) + PV1f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.x) + PV1f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.w) + PV1f.y); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.z) + PV1f.w); -PV0f.w = R123f.w; -R7f.y = backupReg0f + intBitsToFloat(0xbd26dfc3) * scaler; -PS0f = R7f.y; -// 3 -backupReg0f = R2f.x; -backupReg1f = R2f.y; -backupReg2f = R2f.z; -R2f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg0f) + PV0f.y); -R2f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg1f) + PV0f.x); -R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.w) + PV0f.z); -R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg2f) + PV0f.w); -R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); -R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); -R7f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw); -// 0 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.x) + R2f.x); -PV0f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.w) + R2f.z); -PV0f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.z) + R2f.w); -PV0f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.y) + R2f.y); -PV0f.w = R123f.w; -// 1 -R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.w) + PV0f.y); -PV1f.x = R123f.x; -R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.x) + PV0f.x); -PV1f.y = R123f.y; -R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.z) + PV0f.z); -PV1f.z = R123f.z; -R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.y) + PV0f.w); -PV1f.w = R123f.w; -// 2 -backupReg0f = R7f.x; -backupReg1f = R7f.y; -backupReg2f = R7f.z; -backupReg3f = R7f.w; -R7f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg0f) + PV1f.y); -R7f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg1f) + PV1f.w); -R7f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg2f) + PV1f.z); -R7f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg3f) + PV1f.x); -// export -passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w)* bloom; -} +#version 420 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + +// shader 95a5a89d62998e0d + +// blur +const float bloom = $bloom; + +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +layout(location = 0) out vec4 passPixelColor0; +// uf_fragCoordScale was moved to the ufBlock +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; } +void main() +{ +vec4 R0f = vec4(0.0); +vec4 R1f = vec4(0.0); +vec4 R2f = vec4(0.0); +vec4 R3f = vec4(0.0); +vec4 R4f = vec4(0.0); +vec4 R5f = vec4(0.0); +vec4 R6f = vec4(0.0); +vec4 R7f = vec4(0.0); +vec4 R123f = 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; +float scaler; +int tempResulti; +ivec4 ARi = ivec4(0); +bool predResult = true; +vec3 cubeMapSTM; +int cubeMapFaceId; +R0f = GET_FRAGCOORD(); +scaler = uf_fragCoordScale.x; +// 0 +R7f.x = R0f.x * intBitsToFloat(0x3b088889); +PV0f.x = R7f.x; +R7f.y = R0f.y * intBitsToFloat(0x3b72b9d6); +PV0f.y = R7f.y; +// 1 +R0f.x = PV0f.x; +R0f.y = PV0f.y + intBitsToFloat(0x3b72b9d6) * scaler; +R1f.z = PV0f.x; +R1f.y = PV0f.y + intBitsToFloat(0xbb72b9d6) * scaler; +PS1f = R1f.y; +// 2 +R2f.x = R7f.x; +R2f.y = R7f.y + intBitsToFloat(0x3bf2b9d6) * scaler; +R4f.z = R7f.x; +R4f.y = R7f.y + intBitsToFloat(0xbbf2b9d6) * scaler; +PS0f = R4f.y; +R3f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw); +R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); +R1f.xyzw = (textureLod(textureUnitPS0, R1f.zy,0.0).xyzw); +R2f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); +// 0 +backupReg0f = R0f.x; +backupReg1f = R0f.w; +PV0f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.y); +PV0f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.z); +PV0f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg0f); +PV0f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg1f); +R0f.y = R7f.y + intBitsToFloat(0x3c360b60) * scaler; +PS0f = R0f.y; +// 1 +R123f.x = (mul_nonIEEE(R3f.y,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.x); +PV1f.x = R123f.x; +R123f.y = (mul_nonIEEE(R3f.w,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.w); +PV1f.y = R123f.y; +R123f.z = (mul_nonIEEE(R3f.x,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.z); +PV1f.z = R123f.z; +R123f.w = (mul_nonIEEE(R3f.z,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.y); +PV1f.w = R123f.w; +R0f.x = R7f.x; +PS1f = R0f.x; +// 2 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.y) + PV1f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.x) + PV1f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.w) + PV1f.y); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.z) + PV1f.w); +PV0f.w = R123f.w; +R1f.y = R7f.y + intBitsToFloat(0xbc360b60) * scaler; +PS0f = R1f.y; +// 3 +backupReg0f = R2f.z; +R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.x) + PV0f.y); +R3f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.y) + PV0f.x); +R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.w) + PV0f.z); +R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),backupReg0f) + PV0f.w); +R1f.x = R7f.x; +PS1f = R1f.x; +// 4 +R2f.x = R7f.x; +R2f.y = R7f.y + intBitsToFloat(0x3c72b9d6) * scaler; +R6f.z = R7f.x; +R6f.y = R7f.y + intBitsToFloat(0xbc72b9d6) * scaler; +PS0f = R6f.y; +R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); +R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); +R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); +R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); +// 0 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.x) + R3f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.w) + R2f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.z) + R2f.w); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.y) + R3f.y); +PV0f.w = R123f.w; +R3f.y = R7f.y + intBitsToFloat(0x3c97b426) * scaler; +PS0f = R3f.y; +// 1 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.w) + PV0f.y); +PV1f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.x) + PV0f.x); +PV1f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.z) + PV0f.z); +PV1f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.y) + PV0f.w); +PV1f.w = R123f.w; +R3f.x = R7f.x; +PS1f = R3f.x; +// 2 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.w) + PV1f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.z) + PV1f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.y) + PV1f.w); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.x) + PV1f.y); +PV0f.w = R123f.w; +R1f.y = R7f.y + intBitsToFloat(0xbc97b426) * scaler; +PS0f = R1f.y; +// 3 +R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.y); +R0f.y = (mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.x); +R5f.z = (mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.z); +R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.w); +R1f.x = R7f.x; +PS1f = R1f.x; +// 4 +R5f.x = R7f.x; +R5f.y = R7f.y + intBitsToFloat(0x3cb60b60) * scaler; +R4f.z = R7f.x; +R4f.y = R7f.y + intBitsToFloat(0xbcb60b60) * scaler; +PS0f = R4f.y; +R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw); +R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw); +R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); +R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw); +// 0 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.z) + R0f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.y) + R5f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.x) + R5f.w); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.w) + R0f.y); +PV0f.w = R123f.w; +R0f.y = R7f.y + intBitsToFloat(0x3cd4629b) * scaler; +PS0f = R0f.y; +// 1 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.y) + PV0f.y); +PV1f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.w) + PV0f.w); +PV1f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.x) + PV0f.z); +PV1f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.z) + PV0f.x); +PV1f.w = R123f.w; +R0f.x = R7f.x; +PS1f = R0f.x; +// 2 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.y) + PV1f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.x) + PV1f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.w) + PV1f.y); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.z) + PV1f.w); +PV0f.w = R123f.w; +R1f.y = R7f.y + intBitsToFloat(0xbcd4629b) * scaler; +PS0f = R1f.y; +// 3 +backupReg0f = R2f.z; +R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.x) + PV0f.y); +R3f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.y) + PV0f.x); +R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.w) + PV0f.z); +R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),backupReg0f) + PV0f.w); +R1f.x = R7f.x; +PS1f = R1f.x; +// 4 +R2f.x = R7f.x; +R2f.y = R7f.y + intBitsToFloat(0x3cf2b9d6) * scaler; +R6f.z = R7f.x; +R6f.y = R7f.y + intBitsToFloat(0xbcf2b9d6) * scaler; +PS0f = R6f.y; +R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); +R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); +R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); +R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); +// 0 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.x) + R3f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.w) + R2f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.z) + R2f.w); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.y) + R3f.y); +PV0f.w = R123f.w; +R3f.y = R7f.y + intBitsToFloat(0x3d088888) * scaler; +PS0f = R3f.y; +// 1 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.w) + PV0f.y); +PV1f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.x) + PV0f.x); +PV1f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.z) + PV0f.z); +PV1f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.y) + PV0f.w); +PV1f.w = R123f.w; +R3f.x = R7f.x; +PS1f = R3f.x; +// 2 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.w) + PV1f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.z) + PV1f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.y) + PV1f.w); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.x) + PV1f.y); +PV0f.w = R123f.w; +R1f.y = R7f.y + intBitsToFloat(0xbd088888) * scaler; +PS0f = R1f.y; +// 3 +R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.y); +R0f.y = (mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.x); +R5f.z = (mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.z); +R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.w); +R1f.x = R7f.x; +PS1f = R1f.x; +// 4 +R5f.x = R7f.x; +R5f.y = R7f.y + intBitsToFloat(0x3d17b426) * scaler; +R4f.z = R7f.x; +R4f.y = R7f.y + intBitsToFloat(0xbd17b426) * scaler; +PS0f = R4f.y; +R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw); +R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw); +R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); +R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw); +// 0 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.z) + R0f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.y) + R5f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.x) + R5f.w); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.w) + R0f.y); +PV0f.w = R123f.w; +R0f.y = R7f.y + intBitsToFloat(0x3d26dfc3) * scaler; +PS0f = R0f.y; +// 1 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.y) + PV0f.y); +PV1f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.w) + PV0f.w); +PV1f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.x) + PV0f.z); +PV1f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.z) + PV0f.x); +PV1f.w = R123f.w; +R0f.x = R7f.x; +PS1f = R0f.x; +// 2 +backupReg0f = R7f.y; +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.y) + PV1f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.x) + PV1f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.w) + PV1f.y); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.z) + PV1f.w); +PV0f.w = R123f.w; +R7f.y = backupReg0f + intBitsToFloat(0xbd26dfc3) * scaler; +PS0f = R7f.y; +// 3 +backupReg0f = R2f.x; +backupReg1f = R2f.y; +backupReg2f = R2f.z; +R2f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg0f) + PV0f.y); +R2f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg1f) + PV0f.x); +R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.w) + PV0f.z); +R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg2f) + PV0f.w); +R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); +R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); +R7f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw); +// 0 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.x) + R2f.x); +PV0f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.w) + R2f.z); +PV0f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.z) + R2f.w); +PV0f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.y) + R2f.y); +PV0f.w = R123f.w; +// 1 +R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.w) + PV0f.y); +PV1f.x = R123f.x; +R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.x) + PV0f.x); +PV1f.y = R123f.y; +R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.z) + PV0f.z); +PV1f.z = R123f.z; +R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.y) + PV0f.w); +PV1f.w = R123f.w; +// 2 +backupReg0f = R7f.x; +backupReg1f = R7f.y; +backupReg2f = R7f.z; +backupReg3f = R7f.w; +R7f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg0f) + PV1f.y); +R7f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg1f) + PV1f.w); +R7f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg2f) + PV1f.z); +R7f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg3f) + PV1f.x); +// export +passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w)* bloom; +} diff --git a/Enhancements/TwilightPrincessHD_Contrasty/_e334517825fdd599_0000000000000079_ps.txt b/Enhancements/TwilightPrincessHD_Contrasty/unused_e334517825fdd599_0000000000000079_ps.txt similarity index 97% rename from Enhancements/TwilightPrincessHD_Contrasty/_e334517825fdd599_0000000000000079_ps.txt rename to Enhancements/TwilightPrincessHD_Contrasty/unused_e334517825fdd599_0000000000000079_ps.txt index 7e3a3e335..a16a53f09 100644 --- a/Enhancements/TwilightPrincessHD_Contrasty/_e334517825fdd599_0000000000000079_ps.txt +++ b/Enhancements/TwilightPrincessHD_Contrasty/unused_e334517825fdd599_0000000000000079_ps.txt @@ -1,130 +1,130 @@ -#version 420 -#extension GL_ARB_texture_gather : enable -#extension GL_ARB_separate_shader_objects : enable -// shader e334517825fdd599 -//water, sun, fog. -uniform vec2 uf_fragCoordScale; - -const float hazeFactor = 0.1; - -const float gamma = $gamma; // 1.0 is neutral Botw is already colour graded at this stage -const float exposure = $exposure; // 1.0 is neutral -const float vibrance = $vibrance; // 0.0 is neutral -const float crushContrast = $crushContrast; // 0.0 is neutral. Use small increments, loss of shadow detail -const float contrastCurve = $contrastCurve; - - -vec3 RGB_Lift = vec3($redShadows, $greenShadows , $blueSadows); // [0.000 to 2.000] Adjust shadows for Red, Green and Blue. -vec3 RGB_Gamma = vec3($redMid ,$greenMid, $blueMid); // [0.000 to 2.000] Adjust midtones for Red, Green and Blue -vec3 RGB_Gain = vec3($redHilight, $greenHilight, $blueHilight); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue -//lumasharpen -const float sharp_mix = $sharp_mix; -const float sharp_strength = 2.0; -const float sharp_clamp = 0.75; -const float offset_bias = 1.0; -float Sigmoid (float x) { - - return 1.0 / (1.0 + (exp(-(x - 0.5) * 5.5))); -} - - -#define px (1.0/1920.0*uf_fragCoordScale.x) -#define py (1.0/1080.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; -} - -vec3 LiftGammaGainPass(vec3 colorInput) -{ //reshade BSD https://reshade.me , Alexkiri port - vec3 color = colorInput; - color = color * (1.5 - 0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5; - color = clamp(color, 0.0, 1.0); - color *= RGB_Gain; - color = pow(color, 1.0 / RGB_Gamma); - return clamp(color, 0.0, 1.0); -} - -vec3 contrasty(vec3 colour){ - vec3 fColour = (colour.xyz); -//fColour = LiftGammaGainPass(fColour); - - fColour = clamp(exposure * fColour, 0.0, 1.0); - fColour = pow(fColour, vec3(1.0 / gamma)); - float luminance = fColour.r*0.299 + fColour.g*0.587 + fColour.b*0.114; - float mn = min(min(fColour.r, fColour.g), fColour.b); - float mx = max(max(fColour.r, fColour.g), fColour.b); - float sat = (1.0 - (mx - mn)) * (1.0 - mx) * luminance * 5.0; - vec3 lightness = vec3((mn + mx) / 2.0); - fColour = LiftGammaGainPass(fColour); -// vibrance - fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat); - fColour = max(vec3(0.0), fColour - vec3(crushContrast)); - return fColour; -} - - - -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4001000 res 1920x1080x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; - -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){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));} -void main() -{ -vec4 R0f = 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; -R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); -// export -R0f.xyz = contrasty(R0f.xyz); -//R0f.xyz = mix(R0f.xyz, smoothstep(0.0, 1.0, R0f.xyz), 0.25); //contrast difference between heat haze and sky - -passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); -} +#version 420 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +// shader e334517825fdd599 +//water, sun, fog. +uniform vec2 uf_fragCoordScale; + +const float hazeFactor = 0.1; + +const float gamma = $gamma; // 1.0 is neutral Botw is already colour graded at this stage +const float exposure = $exposure; // 1.0 is neutral +const float vibrance = $vibrance; // 0.0 is neutral +const float crushContrast = $crushContrast; // 0.0 is neutral. Use small increments, loss of shadow detail +const float contrastCurve = $contrastCurve; + + +vec3 RGB_Lift = vec3($redShadows, $greenShadows , $blueSadows); // [0.000 to 2.000] Adjust shadows for Red, Green and Blue. +vec3 RGB_Gamma = vec3($redMid ,$greenMid, $blueMid); // [0.000 to 2.000] Adjust midtones for Red, Green and Blue +vec3 RGB_Gain = vec3($redHilight, $greenHilight, $blueHilight); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue +//lumasharpen +const float sharp_mix = $sharp_mix; +const float sharp_strength = 2.0; +const float sharp_clamp = 0.75; +const float offset_bias = 1.0; +float Sigmoid (float x) { + + return 1.0 / (1.0 + (exp(-(x - 0.5) * 5.5))); +} + + +#define px (1.0/1920.0*uf_fragCoordScale.x) +#define py (1.0/1080.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; +} + +vec3 LiftGammaGainPass(vec3 colorInput) +{ //reshade BSD https://reshade.me , Alexkiri port + vec3 color = colorInput; + color = color * (1.5 - 0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5; + color = clamp(color, 0.0, 1.0); + color *= RGB_Gain; + color = pow(color, 1.0 / RGB_Gamma); + return clamp(color, 0.0, 1.0); +} + +vec3 contrasty(vec3 colour){ + vec3 fColour = (colour.xyz); +//fColour = LiftGammaGainPass(fColour); + + fColour = clamp(exposure * fColour, 0.0, 1.0); + fColour = pow(fColour, vec3(1.0 / gamma)); + float luminance = fColour.r*0.299 + fColour.g*0.587 + fColour.b*0.114; + float mn = min(min(fColour.r, fColour.g), fColour.b); + float mx = max(max(fColour.r, fColour.g), fColour.b); + float sat = (1.0 - (mx - mn)) * (1.0 - mx) * luminance * 5.0; + vec3 lightness = vec3((mn + mx) / 2.0); + fColour = LiftGammaGainPass(fColour); +// vibrance + fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat); + fColour = max(vec3(0.0), fColour - vec3(crushContrast)); + return fColour; +} + + + +layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4001000 res 1920x1080x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 +layout(location = 0) in vec4 passParameterSem0; +layout(location = 0) out vec4 passPixelColor0; + +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){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));} +void main() +{ +vec4 R0f = 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; +R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); +// export +R0f.xyz = contrasty(R0f.xyz); +//R0f.xyz = mix(R0f.xyz, smoothstep(0.0, 1.0, R0f.xyz), 0.25); //contrast difference between heat haze and sky + +passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +}