[TPHD] Add new Bloom graphic pack (#642)

With the new bloom graphic pack you can simply choose a preset of the amount of bloom and brightness/post-processing inside the shadow land, or you can fine-tune it to your likings with the custom options.

Thanks to @KoB-Kirito for making this dedicated bloom pack!
This commit is contained in:
Kirito 2024-10-15 22:24:56 +02:00 committed by GitHub
parent 2ddb628734
commit 46db482e22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 1593 additions and 0 deletions

View File

@ -0,0 +1,82 @@
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 49865bd2e62efda1: tints the bloom mask and applies it to the frame
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.z, 1.0/gl_FragCoord.w)
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock
{
uniform ivec4 uf_remappedPS[1]; // holds area specific bloom tint color
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[1]; // holds area specific bloom tint color
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; // bloom mask created in 6e2f31b2b2fcab1f
layout(location = 0) in vec4 passParameterSem0; // pixel coord
layout(location = 0) out vec4 passPixelColor0; // pixel color, alpha = blend of original pixel -> used to dampen non-bloom areas in shadow world
// more compatible interpolation
float mixf(float x, float y, float a)
{
return x * (1.0 - a) + y * a;
}
void main()
{
// get pixel coord
vec2 coord = passParameterSem0.xy;
// get bloom mask
vec3 mask = texture(textureUnitPS0, coord).xyz;
// get area specific color tint
vec4 tint = vec4(0.0);
tint.x = intBitsToFloat(uf_remappedPS[0].x);
tint.y = intBitsToFloat(uf_remappedPS[0].y);
tint.z = intBitsToFloat(uf_remappedPS[0].z);
tint.w = intBitsToFloat(uf_remappedPS[0].w);
// get luminance of tint: removes color, keeps intended brightness
float tintLuminance = dot(tint.xyz, vec3(0.299, 0.587, 0.114)); // percieved approximation
// apply custom tint color
tint.x = mixf(tintLuminance, tint.x, $bloom_tint_strength);
tint.y = mixf(tintLuminance, tint.y, $bloom_tint_strength);
tint.z = mixf(tintLuminance, tint.z, $bloom_tint_strength);
// apply tint on mask
vec4 outColor = vec4(0.0);
outColor.x = mask.x * tint.x;
outColor.y = mask.y * tint.y;
outColor.z = mask.z * tint.z;
// custom brightness reduction, only in shadow world below 1.0
outColor.w = mixf(1.0, tint.w, $shadow_world_darkening);
// export
passPixelColor0 = vec4(outColor.x, outColor.y, outColor.z, outColor.w);
}

View File

@ -0,0 +1,75 @@
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 5f422bf63e25be7f: desaturates colors (shadow world only)
// desaturates the image by shifting colors towards the red channel
// used in shadow world only, as far as tested
// grading values always seem to be: 1.0, 1.0, 1.0, ~0.33
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.z, 1.0/gl_FragCoord.w)
layout(set = 1, binding = 1) uniform ufBlock
{
uniform ivec4 uf_remappedPS[1]; // grading
};
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
uniform ivec4 uf_remappedPS[1]; // grading
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; // frame
layout(location = 0) in vec4 passParameterSem1; // pixel coordinate
layout(location = 0) out vec4 passPixelColor0; // output. w is alpha, overlayed
// more compatible interpolation
float mixf(float x, float y, float a)
{
return x * (1.0 - a) + y * a;
}
void main()
{
// get texel color
vec2 coord = passParameterSem1.xy;
vec3 texel = texture(textureUnitPS0, coord).xyz;
// get grading
vec4 grading = vec4(0.0);
grading.x = intBitsToFloat(uf_remappedPS[0].x); // 1.0
grading.y = intBitsToFloat(uf_remappedPS[0].y); // 1.0
grading.z = intBitsToFloat(uf_remappedPS[0].z); // 1.0
grading.w = intBitsToFloat(uf_remappedPS[0].w); // alpha, ~0.33
// shift towards red channel
vec4 color = vec4(0.0);
color.x = texel.x * grading.x; // red * 1.0
color.y = texel.x * grading.y; // red * 1.0
color.z = texel.x * grading.z; // red * 1.0
color.w = mixf(0.0, grading.w, $shadow_world_desaturation); // apply custom strength
// export
passPixelColor0 = vec4(color.x, color.y, color.z, color.w);
// test current grading colors
//passPixelColor0 = vec4(grading.x, grading.y, grading.z, 1.0);
// test current grading alpha
//passPixelColor0 = vec4(grading.w, grading.w, grading.w, 1.0);
}

View File

@ -0,0 +1,67 @@
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 6e2f31b2b2fcab1f: creates bloom mask
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.z, 1.0/gl_FragCoord.w)
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock
{
uniform ivec4 uf_remappedPS[1]; // mask threshold
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[1]; // mask threshold
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; // frame
layout(location = 0) out vec4 passPixelColor0; // outputs to a texture used by c612390d4c70f430, 95a5a89d62998e0d and 49865bd2e62efda1
void main()
{
// get mask threshold data
float cutoff = intBitsToFloat(uf_remappedPS[0].x); // ~0.39: 0-1, higher = less glowing pixels
float contrast = intBitsToFloat(uf_remappedPS[0].y); // 4.5: higher = sharper edges
// get texture coordinate of this pixel
vec4 coord = GET_FRAGCOORD();
coord.x = coord.x * intBitsToFloat(0x3b088889); // align to scale/grid?
coord.y = coord.y * intBitsToFloat(0x3b72b9d6);
// get color of this pixel
vec3 color = texture(textureUnitPS0, vec2(coord.x, coord.y)).xyz;
// calculate luminance = percieved brightness
float luminance = dot(color, vec3(0.299, 0.587, 0.114)); // percieved approximation
// apply threshold, removes dark areas from the mask
luminance = contrast * (luminance - cutoff) * $bloom_strength; // apply custom strength
// apply to color and clamp
color.x = clamp(luminance * color.x, 0.0, 1.0);
color.y = clamp(luminance * color.y, 0.0, 1.0);
color.z = clamp(luminance * color.z, 0.0, 1.0);
// export
passPixelColor0 = vec4(color.x, color.y, color.z, 0.0);
}

View File

@ -0,0 +1,300 @@
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 95a5a89d62998e0d: blurs bloom vertical
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.z, 1.0/gl_FragCoord.w)
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#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;
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);
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;
float PV0fx = 0.0, PV0fy = 0.0, PV0fz = 0.0, PV0fw = 0.0, PV1fx = 0.0, PV1fy = 0.0, PV1fz = 0.0, PV1fw = 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;
R0f = GET_FRAGCOORD();
// 0
R7f.x = R0f.x * intBitsToFloat(0x3b088889);
R7f.y = R0f.y * intBitsToFloat(0x3b72b9d6);
// 1
R0f.x = R7f.x;
R0f.y = R7f.y + intBitsToFloat(0x3b72b9d6);
R1f.z = R7f.x;
R1f.y = R7f.y + intBitsToFloat(0xbb72b9d6);
// 2
R2f.x = R7f.x;
R2f.y = R7f.y + intBitsToFloat(0x3bf2b9d6);
R4f.z = R7f.x;
R4f.y = R7f.y + intBitsToFloat(0xbbf2b9d6);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R7f.x,R7f.y),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.z,R1f.y),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
PV0fx = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.y);
PV0fy = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.z);
PV0fz = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.x);
PV0fw = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.w);
R0f.y = R7f.y + intBitsToFloat(0x3c360b60);
// 1
R123f.x = mul_nonIEEE(R3f.y,intBitsToFloat(uf_remappedPS[0].x)) + PV0fx;
R123f.y = mul_nonIEEE(R3f.w,intBitsToFloat(uf_remappedPS[0].x)) + PV0fw;
R123f.z = mul_nonIEEE(R3f.x,intBitsToFloat(uf_remappedPS[0].x)) + PV0fz;
R123f.w = mul_nonIEEE(R3f.z,intBitsToFloat(uf_remappedPS[0].x)) + PV0fy;
R0f.x = R7f.x;
// 2
backupReg0f = R123f.y;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.y) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.z) + R123f.w;
R1f.y = R7f.y + intBitsToFloat(0xbc360b60);
// 3
backupReg0f = R2f.z;
R3f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.x) + R123f.y;
R3f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.y) + R123f.x;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.w) + R123f.z;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),backupReg0f) + R123f.w;
R1f.x = R7f.x;
// 4
R2f.x = R7f.x;
R2f.y = R7f.y + intBitsToFloat(0x3c72b9d6);
R6f.z = R7f.x;
R6f.y = R7f.y + intBitsToFloat(0xbc72b9d6);
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.z,R4f.y),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.x) + R3f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.w) + R2f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.z) + R2f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.y) + R3f.y;
R3f.y = R7f.y + intBitsToFloat(0x3c97b426);
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.w) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.x) + backupReg0f;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.y) + R123f.w;
R3f.x = R7f.x;
// 2
backupReg0f = R123f.y;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.w) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.z) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.y) + R123f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.x) + backupReg0f;
R1f.y = R7f.y + intBitsToFloat(0xbc97b426);
// 3
R0f.x = mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[1].x)) + R123f.y;
R0f.y = mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[1].x)) + R123f.x;
R5f.z = mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[1].x)) + R123f.z;
R5f.w = mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[1].x)) + R123f.w;
R1f.x = R7f.x;
// 4
R5f.x = R7f.x;
R5f.y = R7f.y + intBitsToFloat(0x3cb60b60);
R4f.z = R7f.x;
R4f.y = R7f.y + intBitsToFloat(0xbcb60b60);
R6f.xyzw = (textureLod(textureUnitPS0, vec2(R6f.z,R6f.y),0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R3f.x,R3f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R5f.x,R5f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.z) + R0f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.y) + R5f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.x) + R5f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.w) + R0f.y;
R0f.y = R7f.y + intBitsToFloat(0x3cd4629b);
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.y) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.w) + R123f.w;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.x) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.z) + backupReg0f;
R0f.x = R7f.x;
// 2
backupReg0f = R123f.y;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.y) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.z) + R123f.w;
R1f.y = R7f.y + intBitsToFloat(0xbcd4629b);
// 3
backupReg0f = R2f.z;
R3f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.x) + R123f.y;
R3f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.y) + R123f.x;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.w) + R123f.z;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),backupReg0f) + R123f.w;
R1f.x = R7f.x;
// 4
R2f.x = R7f.x;
R2f.y = R7f.y + intBitsToFloat(0x3cf2b9d6);
R6f.z = R7f.x;
R6f.y = R7f.y + intBitsToFloat(0xbcf2b9d6);
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.z,R4f.y),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.x) + R3f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.w) + R2f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.z) + R2f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.y) + R3f.y;
R3f.y = R7f.y + intBitsToFloat(0x3d088888);
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.w) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.x) + backupReg0f;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.y) + R123f.w;
R3f.x = R7f.x;
// 2
backupReg0f = R123f.y;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.w) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.z) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.y) + R123f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.x) + backupReg0f;
R1f.y = R7f.y + intBitsToFloat(0xbd088888);
// 3
R0f.x = mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[2].x)) + R123f.y;
R0f.y = mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[2].x)) + R123f.x;
R5f.z = mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[2].x)) + R123f.z;
R5f.w = mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[2].x)) + R123f.w;
R1f.x = R7f.x;
// 4
R5f.x = R7f.x;
R5f.y = R7f.y + intBitsToFloat(0x3d17b426);
R4f.z = R7f.x;
R4f.y = R7f.y + intBitsToFloat(0xbd17b426);
R6f.xyzw = (textureLod(textureUnitPS0, vec2(R6f.z,R6f.y),0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R3f.x,R3f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R5f.x,R5f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.z) + R0f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.y) + R5f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.x) + R5f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.w) + R0f.y;
R0f.y = R7f.y + intBitsToFloat(0x3d26dfc3);
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.y) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.w) + R123f.w;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.x) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.z) + backupReg0f;
R0f.x = R7f.x;
// 2
backupReg0f = R123f.y;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.y) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.z) + R123f.w;
R7f.y = R7f.y + intBitsToFloat(0xbd26dfc3);
// 3
backupReg0f = R2f.z;
R2f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.x) + R123f.y;
R2f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.y) + R123f.x;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.w) + R123f.z;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg0f) + R123f.w;
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.z,R4f.y),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R7f.xyzw = (textureLod(textureUnitPS0, vec2(R7f.x,R7f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.x) + R2f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.w) + R2f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.z) + R2f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.y) + R2f.y;
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.w) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.x) + backupReg0f;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.y) + R123f.w;
// 2
R7f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R7f.x) + R123f.y;
R7f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R7f.y) + R123f.w;
R7f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R7f.z) + R123f.z;
R7f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R7f.w) + R123f.x;
// export
passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w);
}

View File

@ -0,0 +1,454 @@
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader c612390d4c70f430: blurs bloom horizontal
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.z, 1.0/gl_FragCoord.w)
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock
{
uniform ivec4 uf_remappedPS[5];
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[5];
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) out vec4 passPixelColor0;
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);
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;
float PV0fx = 0.0, PV0fy = 0.0, PV0fz = 0.0, PV0fw = 0.0, PV1fx = 0.0, PV1fy = 0.0, PV1fz = 0.0, PV1fw = 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;
R0f = GET_FRAGCOORD();
// 0
R7f.x = R0f.x * intBitsToFloat(0x3b088889);
R7f.y = R0f.y * intBitsToFloat(0x3b72b9d6);
// 1
R0f.x = R7f.x + intBitsToFloat(0x3b088889);
R0f.y = R7f.y;
R1f.z = R7f.y;
R1f.x = R7f.x + intBitsToFloat(0xbb088889);
// 2
R2f.x = R7f.x + intBitsToFloat(0x3b888889);
R2f.y = R7f.y;
R4f.z = R7f.y;
R4f.x = R7f.x + intBitsToFloat(0xbb888889);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R7f.x,R7f.y),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.z),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
PV0fx = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.z);
PV0fy = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.y);
PV0fz = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.x);
PV0fw = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.w);
R0f.x = R7f.x + intBitsToFloat(0x3bccccce);
// 1
R123f.x = mul_nonIEEE(R3f.w,intBitsToFloat(uf_remappedPS[0].x)) + PV0fw;
R123f.y = mul_nonIEEE(R3f.y,intBitsToFloat(uf_remappedPS[0].x)) + PV0fy;
R123f.z = mul_nonIEEE(R3f.x,intBitsToFloat(uf_remappedPS[0].x)) + PV0fz;
R123f.w = mul_nonIEEE(R3f.z,intBitsToFloat(uf_remappedPS[0].x)) + PV0fx;
R0f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.y) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.z) + R123f.w;
R1f.x = R7f.x + intBitsToFloat(0xbbccccce);
// 3
R3f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.w) + R123f.z;
R3f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.x) + R123f.y;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.z) + R123f.w;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.y) + R123f.x;
R1f.y = R7f.y;
// 4
R2f.x = R7f.x + intBitsToFloat(0x3c088889);
R2f.y = R7f.y;
R6f.z = R7f.y;
R6f.x = R7f.x + intBitsToFloat(0xbc088889);
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.x,R4f.z),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.x) + R3f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.w) + R3f.x;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.z) + R2f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.y) + R2f.w;
R3f.x = R7f.x + intBitsToFloat(0x3c2aaaab);
// 1
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.x) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.w) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.y) + R123f.w;
R3f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.w) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.z) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.y) + R123f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.x) + backupReg0f;
R1f.x = R7f.x + intBitsToFloat(0xbc2aaaab);
// 3
R0f.x = mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[1].x)) + R123f.x;
R0f.y = mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[1].x)) + R123f.y;
R5f.z = mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[1].x)) + R123f.z;
R5f.w = mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[1].x)) + R123f.w;
R1f.y = R7f.y;
// 4
R5f.x = R7f.x + intBitsToFloat(0x3c4cccce);
R5f.y = R7f.y;
R4f.z = R7f.y;
R4f.x = R7f.x + intBitsToFloat(0xbc4cccce);
R6f.xyzw = (textureLod(textureUnitPS0, vec2(R6f.x,R6f.z),0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R3f.x,R3f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R5f.x,R5f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.z) + R0f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.y) + R5f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.x) + R5f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.w) + R0f.x;
R0f.x = R7f.x + intBitsToFloat(0x3c6eeef0);
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.w) + R123f.w;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.y) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.x) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.z) + backupReg0f;
R0f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.y) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.z) + R123f.w;
R1f.x = R7f.x + intBitsToFloat(0xbc6eeef0);
// 3
R3f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.w) + R123f.z;
R3f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.x) + R123f.y;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.z) + R123f.w;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.y) + R123f.x;
R1f.y = R7f.y;
// 4
R2f.x = R7f.x + intBitsToFloat(0x3c888889);
R2f.y = R7f.y;
R6f.z = R7f.y;
R6f.x = R7f.x + intBitsToFloat(0xbc888889);
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.x,R4f.z),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.x) + R3f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.w) + R3f.x;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.z) + R2f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.y) + R2f.w;
R3f.x = R7f.x + intBitsToFloat(0x3c99999a);
// 1
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.x) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.w) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.y) + R123f.w;
R3f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.w) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.z) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.y) + R123f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.x) + backupReg0f;
R1f.x = R7f.x + intBitsToFloat(0xbc99999a);
// 3
R0f.x = mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[2].x)) + R123f.x;
R0f.y = mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[2].x)) + R123f.y;
R5f.z = mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[2].x)) + R123f.z;
R5f.w = mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[2].x)) + R123f.w;
R1f.y = R7f.y;
// 4
R5f.x = R7f.x + intBitsToFloat(0x3caaaaab);
R5f.y = R7f.y;
R4f.z = R7f.y;
R4f.x = R7f.x + intBitsToFloat(0xbcaaaaab);
R6f.xyzw = (textureLod(textureUnitPS0, vec2(R6f.x,R6f.z),0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R3f.x,R3f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R5f.x,R5f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.z) + R0f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.y) + R5f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.x) + R5f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.w) + R0f.x;
R0f.x = R7f.x + intBitsToFloat(0x3cbbbbbc);
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.w) + R123f.w;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.y) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.x) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.z) + backupReg0f;
R0f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.y) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.z) + R123f.w;
R1f.x = R7f.x + intBitsToFloat(0xbcbbbbbc);
// 3
R3f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.w) + R123f.z;
R3f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.x) + R123f.y;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.z) + R123f.w;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.y) + R123f.x;
R1f.y = R7f.y;
// 4
R2f.x = R7f.x + intBitsToFloat(0x3cccccce);
R2f.y = R7f.y;
R6f.z = R7f.y;
R6f.x = R7f.x + intBitsToFloat(0xbcccccce);
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.x,R4f.z),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.x) + R3f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.w) + R3f.x;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.z) + R2f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.y) + R2f.w;
R3f.x = R7f.x + intBitsToFloat(0x3cdddddf);
// 1
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.x) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.w) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.y) + R123f.w;
R3f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R1f.w) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R1f.z) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R1f.y) + R123f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R1f.x) + backupReg0f;
R1f.x = R7f.x + intBitsToFloat(0xbcdddddf);
// 3
R0f.x = mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[3].x)) + R123f.x;
R0f.y = mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[3].x)) + R123f.y;
R5f.z = mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[3].x)) + R123f.z;
R5f.w = mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[3].x)) + R123f.w;
R1f.y = R7f.y;
// 4
R5f.x = R7f.x + intBitsToFloat(0x3ceeeef0);
R5f.y = R7f.y;
R4f.z = R7f.y;
R4f.x = R7f.x + intBitsToFloat(0xbceeeef0);
R6f.xyzw = (textureLod(textureUnitPS0, vec2(R6f.x,R6f.z),0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R3f.x,R3f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R5f.x,R5f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].x),R6f.z) + R0f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].x),R6f.y) + R5f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].x),R6f.x) + R5f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].x),R6f.w) + R0f.x;
R0f.x = R7f.x + 0.03125;
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R3f.w) + R123f.w;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R3f.y) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R3f.x) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R3f.z) + backupReg0f;
R0f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R1f.y) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y),R1f.z) + R123f.w;
R1f.x = R7f.x + -0.03125;
// 3
R3f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R2f.w) + R123f.z;
R3f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R2f.x) + R123f.y;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R2f.z) + R123f.w;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R2f.y) + R123f.x;
R1f.y = R7f.y;
// 4
R2f.x = R7f.x + intBitsToFloat(0x3d088889);
R2f.y = R7f.y;
R6f.z = R7f.y;
R6f.x = R7f.x + intBitsToFloat(0xbd088889);
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.x,R4f.z),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R5f.xyzw = (textureLod(textureUnitPS0, vec2(R2f.x,R2f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R4f.x) + R3f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R4f.w) + R3f.x;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R4f.z) + R2f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z),R4f.y) + R2f.w;
R3f.x = R7f.x + intBitsToFloat(0x3d111112);
// 1
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R0f.x) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R0f.w) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R0f.y) + R123f.w;
R3f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R1f.w) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R1f.z) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R1f.y) + R123f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].w),R1f.x) + backupReg0f;
R1f.x = R7f.x + intBitsToFloat(0xbd111112);
// 3
R0f.x = mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[4].x)) + R123f.x;
R0f.y = mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[4].x)) + R123f.y;
R5f.z = mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[4].x)) + R123f.z;
R5f.w = mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[4].x)) + R123f.w;
R1f.y = R7f.y;
// 4
R5f.x = R7f.x + intBitsToFloat(0x3d19999a);
R5f.y = R7f.y;
R4f.z = R7f.y;
R4f.x = R7f.x + intBitsToFloat(0xbd19999a);
R6f.xyzw = (textureLod(textureUnitPS0, vec2(R6f.x,R6f.z),0.0).xyzw);
R3f.xyzw = (textureLod(textureUnitPS0, vec2(R3f.x,R3f.y),0.0).xyzw);
R1f.xyzw = (textureLod(textureUnitPS0, vec2(R1f.x,R1f.y),0.0).xyzw);
R2f.xyzw = (textureLod(textureUnitPS0, vec2(R5f.x,R5f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].x),R6f.z) + R0f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].x),R6f.y) + R5f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].x),R6f.x) + R5f.w;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].x),R6f.w) + R0f.x;
R0f.x = R7f.x + intBitsToFloat(0x3d222223);
// 1
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R3f.w) + R123f.w;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R3f.y) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R3f.x) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R3f.z) + backupReg0f;
R0f.y = R7f.y;
// 2
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R1f.y) + R123f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R1f.x) + R123f.z;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R1f.w) + backupReg0f;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].y),R1f.z) + R123f.w;
R7f.x = R7f.x + intBitsToFloat(0xbd222223);
// 3
backupReg0f = R2f.x;
backupReg1f = R2f.y;
R2f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),R2f.w) + R123f.z;
R2f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),backupReg0f) + R123f.y;
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),R2f.z) + R123f.w;
R2f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),backupReg1f) + R123f.x;
R4f.xyzw = (textureLod(textureUnitPS0, vec2(R4f.x,R4f.z),0.0).xyzw);
R0f.xyzw = (textureLod(textureUnitPS0, vec2(R0f.x,R0f.y),0.0).xyzw);
R7f.xyzw = (textureLod(textureUnitPS0, vec2(R7f.x,R7f.y),0.0).xyzw);
// 0
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),R4f.x) + R2f.y;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),R4f.w) + R2f.x;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),R4f.z) + R2f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].z),R4f.y) + R2f.w;
// 1
R123f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R0f.x) + R123f.x;
R123f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R0f.w) + R123f.y;
R123f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R0f.z) + R123f.z;
R123f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R0f.y) + R123f.w;
// 2
R7f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R7f.x) + R123f.x;
R7f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R7f.y) + R123f.w;
R7f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R7f.z) + R123f.z;
R7f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[4].w),R7f.w) + R123f.y;
// export
passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w);
}

View File

@ -0,0 +1,433 @@
[Definition]
titleIds = 000500001019C800,000500001019E600,000500001019E500
name = Bloom (Glow) and Shadow World Color Grading
path = The Legend of Zelda: Twilight Princess HD/Graphics/Bloom
description = This pack allows you to adjust bloom and color grading in the shadow world.||It's not recommended to fully disable bloom, as it removes the intended tone of the game.|Bloom is particularly strong in the shadow world with a strong yellow tint, but is also used in the normal world.||Color grading only affects the shadow world. By default, the game darkens and desaturates the image in the shadow world to further distinguish it.
version = 7
[Default]
$bloom_custom = 0
$bloom_enabled = 1
$bloom_strength = 1.0
#$bloom_blur_strength = 1.0
$bloom_tint_strength = 1.0
$shadow_world_custom = 0
$shadow_world_darkening = 1.0
$shadow_world_desaturation = 1.0
# Bloom presets for dummies
[Preset]
category = Bloom
name = Very High (Default)
$bloom_custom = 0
$bloom_strength = 1.0
#$bloom_blur_strength = 1.0
$bloom_tint_strength = 1.0
[Preset]
category = Bloom
name = High
$bloom_custom = 0
$bloom_strength = 0.8
#$bloom_blur_strength = 0.8
$bloom_tint_strength = 0.8
[Preset]
category = Bloom
name = Balanced (Recommended)
$bloom_custom = 0
$bloom_strength = 0.5
#$bloom_blur_strength = 0.5
$bloom_tint_strength = 0.8
[Preset]
category = Bloom
name = Low
$bloom_custom = 0
$bloom_strength = 0.4
#$bloom_blur_strength = 0.2
$bloom_tint_strength = 0.9
[Preset]
category = Bloom
name = Very Low
$bloom_custom = 0
$bloom_strength = 0.2
#$bloom_blur_strength = 0.2
$bloom_tint_strength = 0.9
[Preset]
category = Bloom
name = Custom
$bloom_custom = 1
# Overall Bloom Strength (6e2f31b2b2fcab1f)
[Preset]
category = Bloom Strength
name = 0% (Disables bloom entirely, not recommended)
condition = $bloom_custom
$bloom_enabled = 0
$bloom_strength = 0.0
[Preset]
category = Bloom Strength
name = 10%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.1
[Preset]
category = Bloom Strength
name = 20%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.2
[Preset]
category = Bloom Strength
name = 30%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.3
[Preset]
category = Bloom Strength
name = 40%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.4
[Preset]
category = Bloom Strength
name = 50% (Recommended)
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.5
[Preset]
category = Bloom Strength
name = 60%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.6
[Preset]
category = Bloom Strength
name = 70%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.7
[Preset]
category = Bloom Strength
name = 80%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.8
[Preset]
category = Bloom Strength
name = 90%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 0.9
[Preset]
category = Bloom Strength
name = 100% (Default)
default = 1
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 1.0
[Preset]
category = Bloom Strength
name = 110%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 1.1
[Preset]
category = Bloom Strength
name = 120%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 1.2
[Preset]
category = Bloom Strength
name = 150%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 1.5
[Preset]
category = Bloom Strength
name = 200%
condition = $bloom_custom
$bloom_enabled = 1
$bloom_strength = 2.0
## Blur Strength (ToDo)
## Strength of the periodic blur would be most useful, some people feel nausatiated by it
## Would recommend to set bloom higher with this reduced
## Didn't figure out the shader yet. Most likely better solved via ASM
#
#[Preset]
#category = Periodic Bloom Blur
#name = 0% (Bloom will stay static)
#condition = $bloom_enabled
#$bloom_blur_strength = 0.0
#
#[Preset]
#category = Periodic Bloom Blur
#name = 10%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.1
#
#[Preset]
#category = Periodic Bloom Blur
#name = 20%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.2
#
#[Preset]
#category = Periodic Bloom Blur
#name = 30%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.3
#
#[Preset]
#category = Periodic Bloom Blur
#name = 40%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.4
#
#[Preset]
#category = Periodic Bloom Blur
#name = 50% (Recommended)
#condition = $bloom_enabled
#$bloom_blur_strength = 0.5
#
#[Preset]
#category = Periodic Bloom Blur
#name = 60%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.6
#
#[Preset]
#category = Periodic Bloom Blur
#name = 70%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.7
#
#[Preset]
#category = Periodic Bloom Blur
#name = 80%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.8
#
#[Preset]
#category = Periodic Bloom Blur
#name = 90%
#condition = $bloom_enabled
#$bloom_blur_strength = 0.9
#
#[Preset]
#category = Periodic Bloom Blur
#name = 100% (Native)
#condition = $bloom_enabled
#default = 1
#$bloom_blur_strength = 1.0
# Area Specific Bloom Tint (49865bd2e62efda1)
[Preset]
category = Area-Specific Bloom Tint Strength
name = 0% (Same white bloom color everywhere)
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.0
[Preset]
category = Area-Specific Bloom Tint Strength
name = 10%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.1
[Preset]
category = Area-Specific Bloom Tint Strength
name = 20%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.2
[Preset]
category = Area-Specific Bloom Tint Strength
name = 30%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.3
[Preset]
category = Area-Specific Bloom Tint Strength
name = 40%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.4
[Preset]
category = Area-Specific Bloom Tint Strength
name = 50%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.5
[Preset]
category = Area-Specific Bloom Tint Strength
name = 60%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.6
[Preset]
category = Area-Specific Bloom Tint Strength
name = 70%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.7
[Preset]
category = Area-Specific Bloom Tint Strength
name = 80% (Recommended)
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.8
[Preset]
category = Area-Specific Bloom Tint Strength
name = 90%
condition = $bloom_enabled + $bloom_custom > 1
$bloom_tint_strength = 0.9
[Preset]
category = Area-Specific Bloom Tint Strength
name = 100% (Default)
condition = $bloom_enabled + $bloom_custom > 1
default = 1
$bloom_tint_strength = 1.0
# Shadow world color grading presets for dummies
[Preset]
category = Shadow World Color Grading
name = Very Dark (Default)
default = 1
$shadow_world_custom = 0
$shadow_world_darkening = 1.0
$shadow_world_desaturation = 1.0
[Preset]
category = Shadow World Color Grading
name = Dark
$shadow_world_custom = 0
$shadow_world_darkening = 0.75
$shadow_world_desaturation = 0.75
[Preset]
category = Shadow World Color Grading
name = Balanced
$shadow_world_custom = 0
$shadow_world_darkening = 0.5
$shadow_world_desaturation = 0.5
[Preset]
category = Shadow World Color Grading
name = Bright (Recommended)
$shadow_world_custom = 0
$shadow_world_darkening = 0.25
$shadow_world_desaturation = 0.5
[Preset]
category = Shadow World Color Grading
name = Very Bright
$shadow_world_custom = 0
$shadow_world_darkening = 0.0
$shadow_world_desaturation = 0.5
[Preset]
category = Shadow World Color Grading
name = Custom
$shadow_world_custom = 1
# Shadow World Brightness (49865bd2e62efda1)
# the alpha of the bloom color tint in the shadow world is used to darken the image
# this is separated, because it is not affected by bloom strength at all
[Preset]
category = Shadow World Brightness
name = 60% (Default)
default = 1
condition = $shadow_world_custom
$shadow_world_darkening = 1.0
[Preset]
category = Shadow World Brightness
name = 70%
condition = $shadow_world_custom
$shadow_world_darkening = 0.75
[Preset]
category = Shadow World Brightness
name = 80%
condition = $shadow_world_custom
$shadow_world_darkening = 0.5
[Preset]
category = Shadow World Brightness
name = 90% (Recommended)
condition = $shadow_world_custom
$shadow_world_darkening = 0.25
[Preset]
category = Shadow World Brightness
name = 100% (Shadow world as bright as normal world)
condition = $shadow_world_custom
$shadow_world_darkening = 0.0
# Shadow World Color Desaturation (5f422bf63e25be7f)
# a custom shader is used exclusivly in the shadow world to desaturate its colors
[Preset]
category = Shadow World Saturation
name = 60% (Default)
default = 1
condition = $shadow_world_custom
$shadow_world_desaturation = 1.0
[Preset]
category = Shadow World Saturation
name = 70%
condition = $shadow_world_custom
$shadow_world_desaturation = 0.75
[Preset]
category = Shadow World Saturation
name = 80% (Recommended)
condition = $shadow_world_custom
$shadow_world_desaturation = 0.5
[Preset]
category = Shadow World Saturation
name = 90%
condition = $shadow_world_custom
$shadow_world_desaturation = 0.25
[Preset]
category = Shadow World Saturation
name = 100% (Shadow world as saturated as normal world)
condition = $shadow_world_custom
$shadow_world_desaturation = 0.0

View File

@ -0,0 +1,67 @@
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 7d7d874efcc7ba4b: textbox continue icon
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.z, 1.0/gl_FragCoord.w)
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock
{
uniform vec4 uf_fragCoordScale;
};
#else
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
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);
vec4 R1f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
float PV0fx = 0.0, PV0fy = 0.0, PV0fz = 0.0, PV0fw = 0.0, PV1fx = 0.0, PV1fy = 0.0, PV1fz = 0.0, PV1fw = 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;
R0f = passParameterSem0;
R1f = passParameterSem1;
R1f.xyzw = (texture(textureUnitPS0, vec2(R1f.x,R1f.y)).xyzw);
// 0
R0f.x = mul_nonIEEE(R0f.x, R1f.x);
R0f.x = clamp(R0f.x, 0.0, 1.0);
R0f.y = mul_nonIEEE(R0f.y, R1f.y);
R0f.y = clamp(R0f.y, 0.0, 1.0);
R0f.z = mul_nonIEEE(R0f.z, R1f.z);
R0f.z = clamp(R0f.z, 0.0, 1.0);
R0f.w = mul_nonIEEE(R0f.w, R1f.w);
R0f.w = clamp(R0f.w, 0.0, 1.0);
// export
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, 0.0);
}

View File

@ -0,0 +1,115 @@
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader d80a321ea97e9415: text shadow
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.z, 1.0/gl_FragCoord.w)
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock
{
uniform ivec4 uf_remappedPS[2];
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[2];
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem2;
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);
vec4 R1f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R125f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
float PV0fx = 0.0, PV0fy = 0.0, PV0fz = 0.0, PV0fw = 0.0, PV1fx = 0.0, PV1fy = 0.0, PV1fz = 0.0, PV1fw = 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;
R0f = passParameterSem0;
R1f = passParameterSem2;
R1f.xyzw = (texture(textureUnitPS0, vec2(R1f.x,R1f.y)).xyzw);
// 0
PV0fx = intBitsToFloat(uf_remappedPS[0].w) * 0.99609375;
PV0fy = intBitsToFloat(uf_remappedPS[0].z) * 0.99609375;
PV0fz = intBitsToFloat(uf_remappedPS[0].y) * 0.99609375;
PV0fw = intBitsToFloat(uf_remappedPS[0].x) * 0.99609375;
// 1
PV1fx = fract(PV0fw);
R127f.y = fract(PV0fx);
R127f.z = fract(PV0fy);
PV1fw = fract(PV0fz);
R127f.w = intBitsToFloat(uf_remappedPS[1].x) * 0.99609375;
// 2
R127f.x = intBitsToFloat(uf_remappedPS[1].w) * 0.99609375;
PV0fy = intBitsToFloat(uf_remappedPS[1].z) * 0.99609375;
PV0fz = intBitsToFloat(uf_remappedPS[1].y) * 0.99609375;
R126f.w = PV1fx * intBitsToFloat(0x3f808081);
R126f.x = PV1fw * intBitsToFloat(0x3f808081);
// 3
R125f.x = R127f.y * intBitsToFloat(0x3f808081);
PV1fy = fract(R127f.w);
PV1fz = fract(PV0fz);
R127f.w = R127f.z * intBitsToFloat(0x3f808081);
PS1f = fract(PV0fy);
// 4
PV0fx = fract(R127f.x);
R123f.y = PS1f * intBitsToFloat(0x3f808081) + -(R127f.w);
R123f.z = PV1fz * intBitsToFloat(0x3f808081) + -(R126f.x);
R123f.w = PV1fy * intBitsToFloat(0x3f808081) + -(R126f.w);
// 5
backupReg0f = R123f.y;
backupReg1f = R123f.z;
R123f.x = mul_nonIEEE(R123f.w,R1f.x) + R126f.w;
R123f.x = clamp(R123f.x, 0.0, 1.0);
R123f.y = PV0fx * intBitsToFloat(0x3f808081) + -(R125f.x);
R123f.z = mul_nonIEEE(backupReg0f,R1f.z) + R127f.w;
R123f.z = clamp(R123f.z, 0.0, 1.0);
R123f.w = mul_nonIEEE(backupReg1f,R1f.y) + R126f.x;
R123f.w = clamp(R123f.w, 0.0, 1.0);
// 6
backupReg0f = R123f.x;
R123f.x = mul_nonIEEE(R123f.y,R1f.w) + R125f.x;
R123f.x = clamp(R123f.x, 0.0, 1.0);
R1f.y = mul_nonIEEE(R0f.y, R123f.w);
R1f.y = clamp(R1f.y, 0.0, 1.0);
R1f.z = mul_nonIEEE(R0f.z, R123f.z);
R1f.z = clamp(R1f.z, 0.0, 1.0);
R1f.x = mul_nonIEEE(R0f.x, backupReg0f);
R1f.x = clamp(R1f.x, 0.0, 1.0);
// 7
R1f.w = mul_nonIEEE(R0f.w, R123f.x);
R1f.w = clamp(R1f.w, 0.0, 1.0);
// export
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, 0.0);
}