[TPHD] Remove Bloom from Contrasty in favor of dedicated bloom pack

This commit is contained in:
Crementif 2024-10-15 22:22:07 +02:00 committed by GitHub
parent dbda51299d
commit 2ddb628734
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 690 additions and 690 deletions

View File

@ -19,12 +19,12 @@ $blueHilight = 1.0
$contrastCurve = 0.0 $contrastCurve = 0.0
$hazeFactor = 1.0 $hazeFactor = 1.0
$bloom = 1.0 # $bloom = 1.0
$gamma = 1.0 $gamma = 1.0
$exposure = 1.0 $exposure = 1.0
$vibrance = 0.0 $vibrance = 0.0
$crushContrast = 0.0 $crushContrast = 0.0
$bleach = 1.0 # $bleach = 1.0
$sharp_mix = 0.0 $sharp_mix = 0.0
[Preset] # Preserve original washed out look, but balances bloom white point towards neutral [Preset] # Preserve original washed out look, but balances bloom white point towards neutral
@ -41,12 +41,12 @@ $blueHilight = 1.15
$contrastCurve = 0.0 $contrastCurve = 0.0
$hazeFactor = 0.1 $hazeFactor = 0.1
$bloom = 1.0 # $bloom = 1.0
$gamma = 1.0 $gamma = 1.0
$exposure = 1.0 $exposure = 1.0
$vibrance = 0.25 $vibrance = 0.25
$crushContrast = 0.0 $crushContrast = 0.0
$bleach = 0.85 # $bleach = 0.85
$sharp_mix = 0.0 $sharp_mix = 0.0
[Preset] #Warm and washed out light-sources and bloom, original look "enhanced". [Preset] #Warm and washed out light-sources and bloom, original look "enhanced".
@ -63,12 +63,12 @@ $blueHilight = 1.0
$contrastCurve = 0.5 $contrastCurve = 0.5
$hazeFactor = 0.71 $hazeFactor = 0.71
$bloom = 0.85 # $bloom = 0.85
$gamma = 1.1 $gamma = 1.1
$exposure = 1.07 $exposure = 1.07
$vibrance = 0.15 $vibrance = 0.15
$crushContrast = 0.00 $crushContrast = 0.00
$bleach = 0.85 # $bleach = 0.85
$sharp_mix = 0.05 $sharp_mix = 0.05
[Preset] # Colourful midway between original and cold [Preset] # Colourful midway between original and cold
@ -85,15 +85,15 @@ $blueHilight = 1.01
$contrastCurve = 0.25 $contrastCurve = 0.25
$hazeFactor = 0.1 $hazeFactor = 0.1
$bloom = 1.0 # $bloom = 1.0
$gamma = 1.075 $gamma = 1.075
$exposure = 1.01 $exposure = 1.01
$vibrance = 0.55 $vibrance = 0.55
$crushContrast = 0.0 $crushContrast = 0.0
$bleach = 0.85 # $bleach = 0.85
$sharp_mix = 0.05 $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 name = Cold
$redShadows = 0.99 #0.99 $redShadows = 0.99 #0.99
$greenShadows = 1.0 # 1.0 $greenShadows = 1.0 # 1.0
@ -107,15 +107,15 @@ $blueHilight = 1.11 #1.14
$contrastCurve = 0.25 $contrastCurve = 0.25
$hazeFactor = 0.1 $hazeFactor = 0.1
$bloom = 0.975
$gamma = 1.025 $gamma = 1.025
$exposure = 1.025 $exposure = 1.025
$vibrance = 0.48 $vibrance = 0.48
$crushContrast = 0.0 $crushContrast = 0.0
$bleach = 0.875 # $bleach = 0.875
$sharp_mix = 0.00 $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 name = Warm contrast crush
$redShadows = 1.0 #1.02 #0.99 $redShadows = 1.0 #1.02 #0.99
$greenShadows = 1.0 #1.05 # 1.0 $greenShadows = 1.0 #1.05 # 1.0
@ -129,15 +129,15 @@ $blueHilight = 1.05 #1.14
$contrastCurve = 0.75 $contrastCurve = 0.75
$hazeFactor = 0.1 $hazeFactor = 0.1
$bloom = 0.975 # $bloom = 0.975
$gamma = 1.03 $gamma = 1.03
$exposure = 1.01 $exposure = 1.01
$vibrance = 0.25 $vibrance = 0.25
$crushContrast = 0.0 $crushContrast = 0.0
$bleach = 0.875 # $bleach = 0.875
$sharp_mix = 0.00 $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 name = Cold contrast crush
$redShadows = 1.01 #1.02 #0.99 $redShadows = 1.01 #1.02 #0.99
$greenShadows = 1.03 #1.05 # 1.0 $greenShadows = 1.03 #1.05 # 1.0
@ -151,15 +151,15 @@ $blueHilight = 1.08 #1.14
$contrastCurve = 0.75 $contrastCurve = 0.75
$hazeFactor = 0.1 $hazeFactor = 0.1
$bloom = 0.975 # $bloom = 0.975
$gamma = 1.01 $gamma = 1.01
$exposure = 1.01 $exposure = 1.01
$vibrance = 0.29 $vibrance = 0.29
$crushContrast = 0.0 $crushContrast = 0.0
$bleach = 0.875 # $bleach = 0.875
$sharp_mix = 0.00 $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 name = Cold contrast preserve highlights
$redShadows = 1.01 #1.02 #0.99 $redShadows = 1.01 #1.02 #0.99
$greenShadows = 1.02 #1.05 # 1.0 $greenShadows = 1.02 #1.05 # 1.0
@ -173,17 +173,17 @@ $blueHilight = 1.09 #1.14
$contrastCurve = 0.25 $contrastCurve = 0.25
$hazeFactor = 0.1 $hazeFactor = 0.1
$bloom = 0.975 # $bloom = 0.975
$gamma = 0.75 $gamma = 0.75
$exposure = 1.125 $exposure = 1.125
$vibrance = 0.35 $vibrance = 0.35
$crushContrast = 0.0 $crushContrast = 0.0
$bleach = 0.875 # $bleach = 0.875
$sharp_mix = 0.00 $sharp_mix = 0.00
[Preset] # jff [Preset] # jff
name = Skyward Swordish name = Skyward Swordish
$redShadows = 0.95 $redShadows = 0.95
$greenShadows = 0.95 $greenShadows = 0.95
$blueSadows = 1.0 $blueSadows = 1.0
@ -196,10 +196,10 @@ $blueHilight = 1.01
$contrastCurve = 0.95 $contrastCurve = 0.95
$hazeFactor = 0.71 $hazeFactor = 0.71
$bloom = 0.85 # $bloom = 0.85
$gamma = 1.25 $gamma = 1.25
$exposure = 1.1 $exposure = 1.1
$vibrance = 1.25 $vibrance = 1.25
$crushContrast = 0.00 $crushContrast = 0.00
$bleach = 0.85 # $bleach = 0.85
$sharp_mix = 0.05 $sharp_mix = 0.05

View File

@ -1,82 +1,82 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
#ifdef VULKAN #ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) #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 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 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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
#define gl_VertexID gl_VertexIndex #define gl_VertexID gl_VertexIndex
#define gl_InstanceID gl_InstanceIndex #define gl_InstanceID gl_InstanceIndex
#else #else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) #define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) #define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) #define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define SET_POSITION(_v) gl_Position = _v #define SET_POSITION(_v) gl_Position = _v
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) #define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif #endif
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. // This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
// shader 49865bd2e62efda1 // shader 49865bd2e62efda1
//dark world bloom //dark world bloom
const float bloom = $bloom; const float bloom = $bloom;
#ifdef VULKAN #ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock layout(set = 1, binding = 1) uniform ufBlock
{ {
uniform ivec4 uf_remappedPS[1]; uniform ivec4 uf_remappedPS[1];
uniform vec4 uf_fragCoordScale; uniform vec4 uf_fragCoordScale;
}; };
#else #else
uniform ivec4 uf_remappedPS[1]; uniform ivec4 uf_remappedPS[1];
uniform vec2 uf_fragCoordScale; uniform vec2 uf_fragCoordScale;
#endif #endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) in vec4 passParameterSem0; layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
// uf_fragCoordScale was moved to the ufBlock // uf_fragCoordScale was moved to the ufBlock
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; }
void main() void main()
{ {
vec4 R0f = vec4(0.0); vec4 R0f = 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;
R0f.xyz = (textureLod(textureUnitPS0, R0f.xy,0.0).xyz)*bloom; R0f.xyz = (textureLod(textureUnitPS0, R0f.xy,0.0).xyz)*bloom;
// 0 // 0
backupReg0f = R0f.y; backupReg0f = R0f.y;
backupReg1f = R0f.x; backupReg1f = R0f.x;
PV0f.x = mul_nonIEEE(R0f.z, intBitsToFloat(uf_remappedPS[0].z)); PV0f.x = mul_nonIEEE(R0f.z, intBitsToFloat(uf_remappedPS[0].z));
PV0f.y = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[0].y)); PV0f.y = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[0].y));
PV0f.z = mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedPS[0].x)); PV0f.z = mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedPS[0].x));
PV0f.w = intBitsToFloat(uf_remappedPS[0].w); PV0f.w = intBitsToFloat(uf_remappedPS[0].w);
// 1 // 1
PV1f.x = max(PV0f.w, 0.0); PV1f.x = max(PV0f.w, 0.0);
PV1f.y = max(PV0f.x, 0.0); PV1f.y = max(PV0f.x, 0.0);
PV1f.z = max(PV0f.y, 0.0); PV1f.z = max(PV0f.y, 0.0);
PV1f.w = max(PV0f.z, 0.0); PV1f.w = max(PV0f.z, 0.0);
// 2 // 2
R0f.x = min(PV1f.w, 1.0); R0f.x = min(PV1f.w, 1.0);
R0f.y = min(PV1f.z, 1.0); R0f.y = min(PV1f.z, 1.0);
R0f.z = min(PV1f.y, 1.0); R0f.z = min(PV1f.y, 1.0);
R0f.w = min(PV1f.x, 1.0); R0f.w = min(PV1f.x, 1.0);
// export // export
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
} }

View File

@ -1,88 +1,88 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
#ifdef VULKAN #ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) #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 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 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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
#define gl_VertexID gl_VertexIndex #define gl_VertexID gl_VertexIndex
#define gl_InstanceID gl_InstanceIndex #define gl_InstanceID gl_InstanceIndex
#else #else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) #define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) #define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) #define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define SET_POSITION(_v) gl_Position = _v #define SET_POSITION(_v) gl_Position = _v
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) #define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif #endif
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. // This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
// shader 5f422bf63e25be7f // Bleach pass cutscene // shader 5f422bf63e25be7f // Bleach pass cutscene
const float bleach = $bleach; const float bleach = $bleach;
#ifdef VULKAN #ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock layout(set = 1, binding = 1) uniform ufBlock
{ {
uniform ivec4 uf_remappedPS[1]; uniform ivec4 uf_remappedPS[1];
uniform vec4 uf_fragCoordScale; uniform vec4 uf_fragCoordScale;
}; };
#else #else
uniform ivec4 uf_remappedPS[1]; uniform ivec4 uf_remappedPS[1];
uniform vec2 uf_fragCoordScale; uniform vec2 uf_fragCoordScale;
#endif #endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) in vec4 passParameterSem1; layout(location = 0) in vec4 passParameterSem1;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
// uf_fragCoordScale was moved to the ufBlock // uf_fragCoordScale was moved to the ufBlock
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; }
void main() void main()
{ {
vec4 R0f = vec4(0.0); vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0); vec4 R1f = 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 = passParameterSem1; R0f = passParameterSem1;
R0f.w = (texture(textureUnitPS0, R0f.xy).x); R0f.w = (texture(textureUnitPS0, R0f.xy).x);
// 0 // 0
PV0f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000); PV0f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000);
PV0f.z = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000); PV0f.z = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000);
PV0f.w = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000); PV0f.w = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000);
R1f.w = intBitsToFloat(uf_remappedPS[0].w); R1f.w = intBitsToFloat(uf_remappedPS[0].w);
R1f.w = clamp(R1f.w, 0.0, 1.0); R1f.w = clamp(R1f.w, 0.0, 1.0);
PS0f = R1f.w; PS0f = R1f.w;
// 1 // 1
PV1f.x = fract(PV0f.w); PV1f.x = fract(PV0f.w);
PV1f.y = fract(PV0f.x); PV1f.y = fract(PV0f.x);
PV1f.w = fract(PV0f.z); PV1f.w = fract(PV0f.z);
// 2 // 2
PV0f.x = PV1f.w * intBitsToFloat(0x3f808081); PV0f.x = PV1f.w * intBitsToFloat(0x3f808081);
PV0f.y = PV1f.x * intBitsToFloat(0x3f808081); PV0f.y = PV1f.x * intBitsToFloat(0x3f808081);
PV0f.z = PV1f.y * intBitsToFloat(0x3f808081); PV0f.z = PV1f.y * intBitsToFloat(0x3f808081);
// 3 // 3
R1f.x = mul_nonIEEE(R0f.w, PV0f.z); R1f.x = mul_nonIEEE(R0f.w, PV0f.z);
R1f.x = clamp(R1f.x, 0.0, 1.0); R1f.x = clamp(R1f.x, 0.0, 1.0);
R1f.y = mul_nonIEEE(R0f.w, PV0f.y); R1f.y = mul_nonIEEE(R0f.w, PV0f.y);
R1f.y = clamp(R1f.y, 0.0, 1.0); R1f.y = clamp(R1f.y, 0.0, 1.0);
R1f.z = mul_nonIEEE(R0f.w, PV0f.x); R1f.z = mul_nonIEEE(R0f.w, PV0f.x);
R1f.z = clamp(R1f.z, 0.0, 1.0); R1f.z = clamp(R1f.z, 0.0, 1.0);
// export // export
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w) * bleach; passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w) * bleach;
} }

View File

@ -1,367 +1,367 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
#ifdef VULKAN #ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) #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 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 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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
#define gl_VertexID gl_VertexIndex #define gl_VertexID gl_VertexIndex
#define gl_InstanceID gl_InstanceIndex #define gl_InstanceID gl_InstanceIndex
#else #else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) #define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) #define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) #define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define SET_POSITION(_v) gl_Position = _v #define SET_POSITION(_v) gl_Position = _v
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) #define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif #endif
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. // This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
// shader 95a5a89d62998e0d // shader 95a5a89d62998e0d
// blur // blur
const float bloom = $bloom; const float bloom = $bloom;
#ifdef VULKAN #ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock layout(set = 1, binding = 1) uniform ufBlock
{ {
uniform ivec4 uf_remappedPS[3]; uniform ivec4 uf_remappedPS[3];
uniform vec4 uf_fragCoordScale; uniform vec4 uf_fragCoordScale;
}; };
#else #else
uniform ivec4 uf_remappedPS[3]; uniform ivec4 uf_remappedPS[3];
uniform vec2 uf_fragCoordScale; uniform vec2 uf_fragCoordScale;
#endif #endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
// uf_fragCoordScale was moved to the ufBlock // uf_fragCoordScale was moved to the ufBlock
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; }
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 R2f = vec4(0.0); vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0); vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0); vec4 R4f = vec4(0.0);
vec4 R5f = vec4(0.0); vec4 R5f = vec4(0.0);
vec4 R6f = vec4(0.0); vec4 R6f = vec4(0.0);
vec4 R7f = vec4(0.0); vec4 R7f = vec4(0.0);
vec4 R123f = vec4(0.0); vec4 R123f = 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;
float scaler; float scaler;
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 = GET_FRAGCOORD(); R0f = GET_FRAGCOORD();
scaler = uf_fragCoordScale.x; scaler = uf_fragCoordScale.x;
// 0 // 0
R7f.x = R0f.x * intBitsToFloat(0x3b088889); R7f.x = R0f.x * intBitsToFloat(0x3b088889);
PV0f.x = R7f.x; PV0f.x = R7f.x;
R7f.y = R0f.y * intBitsToFloat(0x3b72b9d6); R7f.y = R0f.y * intBitsToFloat(0x3b72b9d6);
PV0f.y = R7f.y; PV0f.y = R7f.y;
// 1 // 1
R0f.x = PV0f.x; R0f.x = PV0f.x;
R0f.y = PV0f.y + intBitsToFloat(0x3b72b9d6) * scaler; R0f.y = PV0f.y + intBitsToFloat(0x3b72b9d6) * scaler;
R1f.z = PV0f.x; R1f.z = PV0f.x;
R1f.y = PV0f.y + intBitsToFloat(0xbb72b9d6) * scaler; R1f.y = PV0f.y + intBitsToFloat(0xbb72b9d6) * scaler;
PS1f = R1f.y; PS1f = R1f.y;
// 2 // 2
R2f.x = R7f.x; R2f.x = R7f.x;
R2f.y = R7f.y + intBitsToFloat(0x3bf2b9d6) * scaler; R2f.y = R7f.y + intBitsToFloat(0x3bf2b9d6) * scaler;
R4f.z = R7f.x; R4f.z = R7f.x;
R4f.y = R7f.y + intBitsToFloat(0xbbf2b9d6) * scaler; R4f.y = R7f.y + intBitsToFloat(0xbbf2b9d6) * scaler;
PS0f = R4f.y; PS0f = R4f.y;
R3f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw); R3f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, R1f.zy,0.0).xyzw); R1f.xyzw = (textureLod(textureUnitPS0, R1f.zy,0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); R2f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw);
// 0 // 0
backupReg0f = R0f.x; backupReg0f = R0f.x;
backupReg1f = R0f.w; backupReg1f = R0f.w;
PV0f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.y); PV0f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.y);
PV0f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.z); PV0f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.z);
PV0f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg0f); PV0f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg0f);
PV0f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg1f); PV0f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg1f);
R0f.y = R7f.y + intBitsToFloat(0x3c360b60) * scaler; R0f.y = R7f.y + intBitsToFloat(0x3c360b60) * scaler;
PS0f = R0f.y; PS0f = R0f.y;
// 1 // 1
R123f.x = (mul_nonIEEE(R3f.y,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.x); R123f.x = (mul_nonIEEE(R3f.y,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.x);
PV1f.x = R123f.x; PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(R3f.w,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.w); R123f.y = (mul_nonIEEE(R3f.w,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.w);
PV1f.y = R123f.y; PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(R3f.x,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.z); R123f.z = (mul_nonIEEE(R3f.x,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.z);
PV1f.z = R123f.z; PV1f.z = R123f.z;
R123f.w = (mul_nonIEEE(R3f.z,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.y); R123f.w = (mul_nonIEEE(R3f.z,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.y);
PV1f.w = R123f.w; PV1f.w = R123f.w;
R0f.x = R7f.x; R0f.x = R7f.x;
PS1f = R0f.x; PS1f = R0f.x;
// 2 // 2
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.y) + PV1f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.y) + PV1f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.x) + PV1f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.x) + PV1f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.w) + PV1f.y); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.w) + PV1f.y);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.z) + PV1f.w); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.z) + PV1f.w);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R1f.y = R7f.y + intBitsToFloat(0xbc360b60) * scaler; R1f.y = R7f.y + intBitsToFloat(0xbc360b60) * scaler;
PS0f = R1f.y; PS0f = R1f.y;
// 3 // 3
backupReg0f = R2f.z; backupReg0f = R2f.z;
R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.x) + PV0f.y); 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); 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.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.w) + PV0f.z);
R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),backupReg0f) + PV0f.w); R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),backupReg0f) + PV0f.w);
R1f.x = R7f.x; R1f.x = R7f.x;
PS1f = R1f.x; PS1f = R1f.x;
// 4 // 4
R2f.x = R7f.x; R2f.x = R7f.x;
R2f.y = R7f.y + intBitsToFloat(0x3c72b9d6) * scaler; R2f.y = R7f.y + intBitsToFloat(0x3c72b9d6) * scaler;
R6f.z = R7f.x; R6f.z = R7f.x;
R6f.y = R7f.y + intBitsToFloat(0xbc72b9d6) * scaler; R6f.y = R7f.y + intBitsToFloat(0xbc72b9d6) * scaler;
PS0f = R6f.y; PS0f = R6f.y;
R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw);
// 0 // 0
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.x) + R3f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.x) + R3f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.w) + R2f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.w) + R2f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.z) + R2f.w); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.z) + R2f.w);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.y) + R3f.y); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.y) + R3f.y);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R3f.y = R7f.y + intBitsToFloat(0x3c97b426) * scaler; R3f.y = R7f.y + intBitsToFloat(0x3c97b426) * scaler;
PS0f = R3f.y; PS0f = R3f.y;
// 1 // 1
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.w) + PV0f.y); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.w) + PV0f.y);
PV1f.x = R123f.x; PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.x) + PV0f.x); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.x) + PV0f.x);
PV1f.y = R123f.y; PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.z) + PV0f.z); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.z) + PV0f.z);
PV1f.z = R123f.z; PV1f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.y) + PV0f.w); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.y) + PV0f.w);
PV1f.w = R123f.w; PV1f.w = R123f.w;
R3f.x = R7f.x; R3f.x = R7f.x;
PS1f = R3f.x; PS1f = R3f.x;
// 2 // 2
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.w) + PV1f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.w) + PV1f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.z) + PV1f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.z) + PV1f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.y) + PV1f.w); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.y) + PV1f.w);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.x) + PV1f.y); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.x) + PV1f.y);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R1f.y = R7f.y + intBitsToFloat(0xbc97b426) * scaler; R1f.y = R7f.y + intBitsToFloat(0xbc97b426) * scaler;
PS0f = R1f.y; PS0f = R1f.y;
// 3 // 3
R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.y); 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); 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.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); R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.w);
R1f.x = R7f.x; R1f.x = R7f.x;
PS1f = R1f.x; PS1f = R1f.x;
// 4 // 4
R5f.x = R7f.x; R5f.x = R7f.x;
R5f.y = R7f.y + intBitsToFloat(0x3cb60b60) * scaler; R5f.y = R7f.y + intBitsToFloat(0x3cb60b60) * scaler;
R4f.z = R7f.x; R4f.z = R7f.x;
R4f.y = R7f.y + intBitsToFloat(0xbcb60b60) * scaler; R4f.y = R7f.y + intBitsToFloat(0xbcb60b60) * scaler;
PS0f = R4f.y; PS0f = R4f.y;
R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw); R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw); R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw); R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw);
// 0 // 0
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.z) + R0f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.z) + R0f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.y) + R5f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.y) + R5f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.x) + R5f.w); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.x) + R5f.w);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.w) + R0f.y); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.w) + R0f.y);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R0f.y = R7f.y + intBitsToFloat(0x3cd4629b) * scaler; R0f.y = R7f.y + intBitsToFloat(0x3cd4629b) * scaler;
PS0f = R0f.y; PS0f = R0f.y;
// 1 // 1
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.y) + PV0f.y); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.y) + PV0f.y);
PV1f.x = R123f.x; PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.w) + PV0f.w); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.w) + PV0f.w);
PV1f.y = R123f.y; PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.x) + PV0f.z); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.x) + PV0f.z);
PV1f.z = R123f.z; PV1f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.z) + PV0f.x); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.z) + PV0f.x);
PV1f.w = R123f.w; PV1f.w = R123f.w;
R0f.x = R7f.x; R0f.x = R7f.x;
PS1f = R0f.x; PS1f = R0f.x;
// 2 // 2
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.y) + PV1f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.y) + PV1f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.x) + PV1f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.x) + PV1f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.w) + PV1f.y); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.w) + PV1f.y);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.z) + PV1f.w); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.z) + PV1f.w);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R1f.y = R7f.y + intBitsToFloat(0xbcd4629b) * scaler; R1f.y = R7f.y + intBitsToFloat(0xbcd4629b) * scaler;
PS0f = R1f.y; PS0f = R1f.y;
// 3 // 3
backupReg0f = R2f.z; backupReg0f = R2f.z;
R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.x) + PV0f.y); 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); 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.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.w) + PV0f.z);
R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),backupReg0f) + PV0f.w); R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),backupReg0f) + PV0f.w);
R1f.x = R7f.x; R1f.x = R7f.x;
PS1f = R1f.x; PS1f = R1f.x;
// 4 // 4
R2f.x = R7f.x; R2f.x = R7f.x;
R2f.y = R7f.y + intBitsToFloat(0x3cf2b9d6) * scaler; R2f.y = R7f.y + intBitsToFloat(0x3cf2b9d6) * scaler;
R6f.z = R7f.x; R6f.z = R7f.x;
R6f.y = R7f.y + intBitsToFloat(0xbcf2b9d6) * scaler; R6f.y = R7f.y + intBitsToFloat(0xbcf2b9d6) * scaler;
PS0f = R6f.y; PS0f = R6f.y;
R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw); R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw);
// 0 // 0
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.x) + R3f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.x) + R3f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.w) + R2f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.w) + R2f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.z) + R2f.w); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.z) + R2f.w);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.y) + R3f.y); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.y) + R3f.y);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R3f.y = R7f.y + intBitsToFloat(0x3d088888) * scaler; R3f.y = R7f.y + intBitsToFloat(0x3d088888) * scaler;
PS0f = R3f.y; PS0f = R3f.y;
// 1 // 1
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.w) + PV0f.y); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.w) + PV0f.y);
PV1f.x = R123f.x; PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.x) + PV0f.x); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.x) + PV0f.x);
PV1f.y = R123f.y; PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.z) + PV0f.z); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.z) + PV0f.z);
PV1f.z = R123f.z; PV1f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.y) + PV0f.w); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.y) + PV0f.w);
PV1f.w = R123f.w; PV1f.w = R123f.w;
R3f.x = R7f.x; R3f.x = R7f.x;
PS1f = R3f.x; PS1f = R3f.x;
// 2 // 2
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.w) + PV1f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.w) + PV1f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.z) + PV1f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.z) + PV1f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.y) + PV1f.w); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.y) + PV1f.w);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.x) + PV1f.y); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.x) + PV1f.y);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R1f.y = R7f.y + intBitsToFloat(0xbd088888) * scaler; R1f.y = R7f.y + intBitsToFloat(0xbd088888) * scaler;
PS0f = R1f.y; PS0f = R1f.y;
// 3 // 3
R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.y); 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); 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.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); R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.w);
R1f.x = R7f.x; R1f.x = R7f.x;
PS1f = R1f.x; PS1f = R1f.x;
// 4 // 4
R5f.x = R7f.x; R5f.x = R7f.x;
R5f.y = R7f.y + intBitsToFloat(0x3d17b426) * scaler; R5f.y = R7f.y + intBitsToFloat(0x3d17b426) * scaler;
R4f.z = R7f.x; R4f.z = R7f.x;
R4f.y = R7f.y + intBitsToFloat(0xbd17b426) * scaler; R4f.y = R7f.y + intBitsToFloat(0xbd17b426) * scaler;
PS0f = R4f.y; PS0f = R4f.y;
R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw); R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw); R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw); R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw); R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw);
// 0 // 0
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.z) + R0f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.z) + R0f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.y) + R5f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.y) + R5f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.x) + R5f.w); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.x) + R5f.w);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.w) + R0f.y); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.w) + R0f.y);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R0f.y = R7f.y + intBitsToFloat(0x3d26dfc3) * scaler; R0f.y = R7f.y + intBitsToFloat(0x3d26dfc3) * scaler;
PS0f = R0f.y; PS0f = R0f.y;
// 1 // 1
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.y) + PV0f.y); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.y) + PV0f.y);
PV1f.x = R123f.x; PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.w) + PV0f.w); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.w) + PV0f.w);
PV1f.y = R123f.y; PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.x) + PV0f.z); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.x) + PV0f.z);
PV1f.z = R123f.z; PV1f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.z) + PV0f.x); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.z) + PV0f.x);
PV1f.w = R123f.w; PV1f.w = R123f.w;
R0f.x = R7f.x; R0f.x = R7f.x;
PS1f = R0f.x; PS1f = R0f.x;
// 2 // 2
backupReg0f = R7f.y; backupReg0f = R7f.y;
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.y) + PV1f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.y) + PV1f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.x) + PV1f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.x) + PV1f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.w) + PV1f.y); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.w) + PV1f.y);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.z) + PV1f.w); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.z) + PV1f.w);
PV0f.w = R123f.w; PV0f.w = R123f.w;
R7f.y = backupReg0f + intBitsToFloat(0xbd26dfc3) * scaler; R7f.y = backupReg0f + intBitsToFloat(0xbd26dfc3) * scaler;
PS0f = R7f.y; PS0f = R7f.y;
// 3 // 3
backupReg0f = R2f.x; backupReg0f = R2f.x;
backupReg1f = R2f.y; backupReg1f = R2f.y;
backupReg2f = R2f.z; backupReg2f = R2f.z;
R2f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg0f) + PV0f.y); 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.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.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.w) + PV0f.z);
R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg2f) + PV0f.w); R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg2f) + PV0f.w);
R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw); R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
R7f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw); R7f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw);
// 0 // 0
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.x) + R2f.x); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.x) + R2f.x);
PV0f.x = R123f.x; PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.w) + R2f.z); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.w) + R2f.z);
PV0f.y = R123f.y; PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.z) + R2f.w); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.z) + R2f.w);
PV0f.z = R123f.z; PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.y) + R2f.y); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.y) + R2f.y);
PV0f.w = R123f.w; PV0f.w = R123f.w;
// 1 // 1
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.w) + PV0f.y); R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.w) + PV0f.y);
PV1f.x = R123f.x; PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.x) + PV0f.x); R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.x) + PV0f.x);
PV1f.y = R123f.y; PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.z) + PV0f.z); R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.z) + PV0f.z);
PV1f.z = R123f.z; PV1f.z = R123f.z;
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.y) + PV0f.w); R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.y) + PV0f.w);
PV1f.w = R123f.w; PV1f.w = R123f.w;
// 2 // 2
backupReg0f = R7f.x; backupReg0f = R7f.x;
backupReg1f = R7f.y; backupReg1f = R7f.y;
backupReg2f = R7f.z; backupReg2f = R7f.z;
backupReg3f = R7f.w; backupReg3f = R7f.w;
R7f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg0f) + PV1f.y); 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.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg1f) + PV1f.w);
R7f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg2f) + PV1f.z); R7f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg2f) + PV1f.z);
R7f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg3f) + PV1f.x); R7f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg3f) + PV1f.x);
// export // export
passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w)* bloom; passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w)* bloom;
} }

View File

@ -1,130 +1,130 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
// shader e334517825fdd599 // shader e334517825fdd599
//water, sun, fog. //water, sun, fog.
uniform vec2 uf_fragCoordScale; uniform vec2 uf_fragCoordScale;
const float hazeFactor = 0.1; const float hazeFactor = 0.1;
const float gamma = $gamma; // 1.0 is neutral Botw is already colour graded at this stage 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 exposure = $exposure; // 1.0 is neutral
const float vibrance = $vibrance; // 0.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 crushContrast = $crushContrast; // 0.0 is neutral. Use small increments, loss of shadow detail
const float contrastCurve = $contrastCurve; 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_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_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 vec3 RGB_Gain = vec3($redHilight, $greenHilight, $blueHilight); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue
//lumasharpen //lumasharpen
const float sharp_mix = $sharp_mix; const float sharp_mix = $sharp_mix;
const float sharp_strength = 2.0; const float sharp_strength = 2.0;
const float sharp_clamp = 0.75; const float sharp_clamp = 0.75;
const float offset_bias = 1.0; const float offset_bias = 1.0;
float Sigmoid (float x) { float Sigmoid (float x) {
return 1.0 / (1.0 + (exp(-(x - 0.5) * 5.5))); return 1.0 / (1.0 + (exp(-(x - 0.5) * 5.5)));
} }
#define px (1.0/1920.0*uf_fragCoordScale.x) #define px (1.0/1920.0*uf_fragCoordScale.x)
#define py (1.0/1080.0*uf_fragCoordScale.y) #define py (1.0/1080.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;
// -- Combining the strength and luma multipliers -- // -- Combining the strength and luma multipliers --
vec3 sharp_strength_luma = (CoefLuma * sharp_strength); vec3 sharp_strength_luma = (CoefLuma * sharp_strength);
// -- Gaussian filter -- // -- Gaussian filter --
// [ .25, .50, .25] [ 1 , 2 , 1 ] // [ .25, .50, .25] [ 1 , 2 , 1 ]
// [ .50, 1, .50] = [ 2 , 4 , 2 ] // [ .50, 1, .50] = [ 2 , 4 , 2 ]
// [ .25, .50, .25] [ 1 , 2 , 1 ] // [ .25, .50, .25] [ 1 , 2 , 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
// -- Calculate the sharpening -- // -- Calculate the sharpening --
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
return sharp_luma; return sharp_luma;
} }
vec3 LiftGammaGainPass(vec3 colorInput) vec3 LiftGammaGainPass(vec3 colorInput)
{ //reshade BSD https://reshade.me , Alexkiri port { //reshade BSD https://reshade.me , Alexkiri port
vec3 color = colorInput; vec3 color = colorInput;
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); color = clamp(color, 0.0, 1.0);
color *= RGB_Gain; color *= RGB_Gain;
color = pow(color, 1.0 / RGB_Gamma); color = pow(color, 1.0 / RGB_Gamma);
return clamp(color, 0.0, 1.0); return clamp(color, 0.0, 1.0);
} }
vec3 contrasty(vec3 colour){ vec3 contrasty(vec3 colour){
vec3 fColour = (colour.xyz); vec3 fColour = (colour.xyz);
//fColour = LiftGammaGainPass(fColour); //fColour = LiftGammaGainPass(fColour);
fColour = clamp(exposure * fColour, 0.0, 1.0); fColour = clamp(exposure * fColour, 0.0, 1.0);
fColour = pow(fColour, vec3(1.0 / gamma)); fColour = pow(fColour, vec3(1.0 / gamma));
float luminance = fColour.r*0.299 + fColour.g*0.587 + fColour.b*0.114; 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 mn = min(min(fColour.r, fColour.g), fColour.b);
float mx = max(max(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; float sat = (1.0 - (mx - mn)) * (1.0 - mx) * luminance * 5.0;
vec3 lightness = vec3((mn + mx) / 2.0); vec3 lightness = vec3((mn + mx) / 2.0);
fColour = LiftGammaGainPass(fColour); fColour = LiftGammaGainPass(fColour);
// vibrance // vibrance
fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat); fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat);
fColour = max(vec3(0.0), fColour - vec3(crushContrast)); fColour = max(vec3(0.0), fColour - vec3(crushContrast));
return fColour; 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(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) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
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){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));} float mul_nonIEEE(float a, float b){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));}
void main() void main()
{ {
vec4 R0f = vec4(0.0); vec4 R0f = 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;
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw); R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
// export // export
R0f.xyz = contrasty(R0f.xyz); 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 //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); passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
} }