mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-12-04 00:51:55 +00:00
[Fatal Frame] Add cutscene brightness and support japanese version
Related to https://github.com/slashiee/cemu_graphic_packs/issues/436
This commit is contained in:
parent
48e6bd276d
commit
4afffc6e5f
@ -0,0 +1,266 @@
|
||||
#version 430
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader bc4963809a75b736
|
||||
// Used for: Changing the brightness of the game's rendering for japanese copies of the game
|
||||
|
||||
|
||||
#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.zw)
|
||||
#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 = 2) 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;
|
||||
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
|
||||
layout(location = 0) in vec4 passParameterSem128;
|
||||
layout(location = 1) in vec4 passParameterSem129;
|
||||
layout(location = 2) in vec4 passParameterSem130;
|
||||
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()
|
||||
{
|
||||
ivec4 R0i = ivec4(0);
|
||||
ivec4 R1i = ivec4(0);
|
||||
ivec4 R2i = ivec4(0);
|
||||
ivec4 R3i = ivec4(0);
|
||||
ivec4 R4i = ivec4(0);
|
||||
ivec4 R123i = ivec4(0);
|
||||
ivec4 R125i = ivec4(0);
|
||||
ivec4 R126i = ivec4(0);
|
||||
ivec4 R127i = ivec4(0);
|
||||
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
|
||||
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
|
||||
int PS0i = 0, PS1i = 0;
|
||||
ivec4 tempi = ivec4(0);
|
||||
float tempResultf;
|
||||
int tempResulti;
|
||||
ivec4 ARi = ivec4(0);
|
||||
bool predResult = true;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem128);
|
||||
R1i = floatBitsToInt(passParameterSem129);
|
||||
R2i = floatBitsToInt(passParameterSem130);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R4i.xyz = floatBitsToInt(textureGather(textureUnitPS0, intBitsToFloat(R1i.zw)).xyz);
|
||||
R3i.xyzw = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R0i.xy),0.0).xyzw);
|
||||
R1i.xzw = floatBitsToInt(textureGather(textureUnitPS0, intBitsToFloat(R1i.xy)).xzw);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
R127i.x = floatBitsToInt(max(intBitsToFloat(R1i.x), intBitsToFloat(R1i.z)));
|
||||
PV0i.y = floatBitsToInt(max(intBitsToFloat(R4i.z), intBitsToFloat(R3i.w)));
|
||||
PV0i.z = floatBitsToInt(min(intBitsToFloat(R4i.z), intBitsToFloat(R3i.w)));
|
||||
R127i.w = floatBitsToInt(min(intBitsToFloat(R1i.x), intBitsToFloat(R1i.z)));
|
||||
// 1
|
||||
PV1i.x = floatBitsToInt(max(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||
PV1i.w = floatBitsToInt(min(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.z)));
|
||||
// 2
|
||||
PV0i.x = floatBitsToInt(max(intBitsToFloat(PV1i.x), intBitsToFloat(R127i.x)));
|
||||
PV0i.w = floatBitsToInt(min(intBitsToFloat(PV1i.w), intBitsToFloat(R127i.w)));
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + -(intBitsToFloat(PV0i.w)));
|
||||
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(uf_remappedPS[0].y)));
|
||||
// 4
|
||||
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.y), intBitsToFloat(uf_remappedPS[0].z)));
|
||||
// 5
|
||||
PV1i.w = ((intBitsToFloat(PV0i.z) > intBitsToFloat(R127i.x))?int(0xFFFFFFFF):int(0x0));
|
||||
// 6
|
||||
backupReg0i = R3i.y;
|
||||
R1i.x = ((PV1i.w == 0)?(0):(R3i.x));
|
||||
R3i.y = ((PV1i.w == 0)?(0):(0x3f800000));
|
||||
R1i.z = ((PV1i.w == 0)?(0):(R3i.z));
|
||||
R1i.y = ((PV1i.w == 0)?(0):(backupReg0i));
|
||||
PS0i = R1i.y;
|
||||
// 7
|
||||
predResult = (R3i.y == 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
R1i.y = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R2i.xy),0.0).w);
|
||||
R2i.z = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R2i.zw),0.0).w);
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(0x3b2aaaab));
|
||||
PV0i.x = R127i.x;
|
||||
R127i.y = R4i.y;
|
||||
PV0i.y = R127i.y;
|
||||
R127i.z = 0;
|
||||
PV0i.w = R1i.w;
|
||||
// 1
|
||||
PV1i.x = floatBitsToInt(-(intBitsToFloat(R1i.w)) + intBitsToFloat(PV0i.y));
|
||||
PV1i.y = floatBitsToInt(intBitsToFloat(R2i.z) + -(intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = floatBitsToInt(max(intBitsToFloat(PV0i.w), intBitsToFloat(R2i.z)));
|
||||
PV1i.w = floatBitsToInt(max(intBitsToFloat(PV0i.x), intBitsToFloat(PV0i.y)));
|
||||
R127i.w = floatBitsToInt(min(intBitsToFloat(PV0i.w), intBitsToFloat(R2i.z)));
|
||||
PS1i = R127i.w;
|
||||
// 2
|
||||
backupReg0i = R127i.x;
|
||||
backupReg1i = R127i.y;
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(PV1i.x));
|
||||
PV0i.x = R127i.x;
|
||||
R127i.y = floatBitsToInt(intBitsToFloat(PV1i.y) + -(intBitsToFloat(PV1i.x)));
|
||||
PV0i.y = R127i.y;
|
||||
R4i.z = floatBitsToInt(max(intBitsToFloat(PV1i.z), intBitsToFloat(PV1i.w)));
|
||||
PV0i.w = floatBitsToInt(min(intBitsToFloat(backupReg0i), intBitsToFloat(backupReg1i)));
|
||||
// 3
|
||||
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(PV0i.x),intBitsToFloat(PV0i.y),intBitsToFloat(R127i.z),-0.0),vec4(intBitsToFloat(PV0i.x),intBitsToFloat(PV0i.y),intBitsToFloat(R127i.z),0.0)));
|
||||
PV1i.x = tempi.x;
|
||||
PV1i.y = tempi.x;
|
||||
PV1i.z = tempi.x;
|
||||
PV1i.w = tempi.x;
|
||||
R4i.w = floatBitsToInt(min(intBitsToFloat(R127i.w), intBitsToFloat(PV0i.w)));
|
||||
PS1i = R4i.w;
|
||||
// 4
|
||||
tempResultf = 1.0 / sqrt(intBitsToFloat(PV1i.x));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 5
|
||||
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PS0i)));
|
||||
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.x), intBitsToFloat(PS0i)));
|
||||
// 6
|
||||
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(uf_remappedPS[1].z)));
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(uf_remappedPS[1].w)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(uf_remappedPS[1].y)));
|
||||
PV0i.z = R127i.z;
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(uf_remappedPS[1].x)));
|
||||
PV0i.w = R127i.w;
|
||||
// 7
|
||||
backupReg0i = R0i.x;
|
||||
backupReg1i = R0i.y;
|
||||
backupReg0i = R0i.x;
|
||||
PV1i.x = floatBitsToInt(max(intBitsToFloat(PV0i.z), -(intBitsToFloat(PV0i.z))));
|
||||
PV1i.y = floatBitsToInt(max(intBitsToFloat(PV0i.w), -(intBitsToFloat(PV0i.w))));
|
||||
R2i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV0i.x));
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(PV0i.y));
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV0i.w));
|
||||
PS1i = R1i.x;
|
||||
// 8
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
PV0i.w = floatBitsToInt(min(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.x)));
|
||||
// 9
|
||||
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_remappedPS[0].x)));
|
||||
// 10
|
||||
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.z));
|
||||
// 11
|
||||
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PS0i)));
|
||||
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PS0i)));
|
||||
// 12
|
||||
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.w), intBitsToFloat(0xc0000000)));
|
||||
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.x), intBitsToFloat(0xc0000000)));
|
||||
// 13
|
||||
PV1i.x = floatBitsToInt(min(intBitsToFloat(PV0i.z), 2.0));
|
||||
PV1i.w = floatBitsToInt(min(intBitsToFloat(PV0i.y), 2.0));
|
||||
// 14
|
||||
PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(uf_remappedPS[2].z)));
|
||||
PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(uf_remappedPS[2].w)));
|
||||
// 15
|
||||
backupReg0i = R0i.x;
|
||||
backupReg1i = R0i.y;
|
||||
backupReg0i = R0i.x;
|
||||
backupReg1i = R0i.y;
|
||||
R0i.xyz = floatBitsToInt(vec3(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg0i)) + vec3(-(intBitsToFloat(PV0i.z)),-(intBitsToFloat(PV0i.w)),intBitsToFloat(PV0i.z)));
|
||||
R0i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(PV0i.w));
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
R1i.xyzw = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R1i.xy),0.0).xyzw);
|
||||
R2i.xyzw = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R2i.zw),0.0).xyzw);
|
||||
R3i.xyzw = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R0i.xy),0.0).xyzw);
|
||||
R0i.xyzw = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R0i.zw),0.0).xyzw);
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(R2i.z));
|
||||
PV0i.x = R127i.x;
|
||||
R127i.y = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(R2i.y));
|
||||
PV0i.y = R127i.y;
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(R2i.x));
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(R2i.w));
|
||||
// 1
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV0i.w));
|
||||
PV1i.y = floatBitsToInt(intBitsToFloat(R3i.z) + intBitsToFloat(PV0i.x));
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(PV0i.y));
|
||||
PV1i.w = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(PV0i.z));
|
||||
R126i.z = PV0i.z;
|
||||
R126i.z = floatBitsToInt(intBitsToFloat(R126i.z) / 2.0);
|
||||
PS1i = R126i.z;
|
||||
// 2
|
||||
backupReg0i = R0i.y;
|
||||
backupReg1i = R0i.x;
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.x));
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(PV1i.y));
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV1i.z));
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(PV1i.w));
|
||||
R126i.y = R127i.y;
|
||||
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) / 2.0);
|
||||
PS0i = R126i.y;
|
||||
// 3
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * 0.25);
|
||||
R125i.y = R127i.x;
|
||||
R125i.y = floatBitsToInt(intBitsToFloat(R125i.y) / 2.0);
|
||||
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) * 0.25);
|
||||
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 0.25);
|
||||
R127i.y = floatBitsToInt(intBitsToFloat(PV0i.y) * 0.25);
|
||||
PS1i = R127i.y;
|
||||
// 4
|
||||
R127i.x = ((intBitsToFloat(PV1i.x) > intBitsToFloat(R4i.w))?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.w = ((intBitsToFloat(PV1i.x) > intBitsToFloat(R4i.z))?int(0xFFFFFFFF):int(0x0));
|
||||
// 5
|
||||
R123i.x = ((PV0i.w == 0)?(R127i.y):(R125i.y));
|
||||
PV1i.x = R123i.x;
|
||||
R123i.y = ((PV0i.w == 0)?(R127i.z):(R126i.y));
|
||||
PV1i.y = R123i.y;
|
||||
R123i.z = ((PV0i.w == 0)?(R127i.w):(R126i.z));
|
||||
PV1i.z = R123i.z;
|
||||
// 6
|
||||
R1i.x = ((R127i.x == 0)?(R126i.z):(PV1i.z));
|
||||
R1i.y = ((R127i.x == 0)?(R126i.y):(PV1i.y));
|
||||
R1i.z = ((R127i.x == 0)?(R125i.y):(PV1i.x));
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R1i.w = 0x3f800000;
|
||||
}
|
||||
// export
|
||||
passPixelColor0 = clamp(vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w))*$brightness, 0.0, 1.0);
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader d50af77827baa4cf
|
||||
// Used for: Changing the brightness of the game's rendering
|
||||
// Used for: Changing the brightness of the game's rendering for EU and US versions of the game
|
||||
|
||||
|
||||
// start of shader inputs/outputs, predetermined by Cemu. Do not touch
|
||||
|
@ -2,7 +2,7 @@
|
||||
titleIds = 00050000101D0300,00050000101D0600,000500001014D200,00050000101D3F00
|
||||
name = Brightness
|
||||
path = "Fatal Frame - Project Zero: Maiden of Black Water/Mods/Brightness"
|
||||
description = Changes the brightness of the game.
|
||||
description = Changes the brightness of the game. Can be used to make the game look brighter to be more similar to the Wii U.
|
||||
version = 4
|
||||
|
||||
[Preset]
|
||||
|
@ -0,0 +1,279 @@
|
||||
#version 430
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader 50fbaf7528d32528
|
||||
// Used for: Changes the brightness of the cutscenes for the EU and US versions of the game.
|
||||
|
||||
|
||||
// start of shader inputs/outputs, predetermined by Cemu. Do not touch
|
||||
#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.zw)
|
||||
#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 = 6) uniform ufBlock
|
||||
{
|
||||
uniform ivec4 uf_remappedPS[7];
|
||||
uniform vec4 uf_fragCoordScale;
|
||||
};
|
||||
#else
|
||||
uniform ivec4 uf_remappedPS[7];
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
#endif
|
||||
TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1;
|
||||
TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2;
|
||||
TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3;
|
||||
TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4;
|
||||
TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5;
|
||||
TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6;
|
||||
layout(location = 0) in vec4 passParameterSem128;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
// end of shader inputs/outputs
|
||||
int clampFI32(int v)
|
||||
{
|
||||
if( v == 0x7FFFFFFF )
|
||||
return floatBitsToInt(1.0);
|
||||
else if( v == 0xFFFFFFFF )
|
||||
return floatBitsToInt(0.0);
|
||||
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
|
||||
}
|
||||
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
|
||||
void main()
|
||||
{
|
||||
ivec4 R0i = ivec4(0);
|
||||
ivec4 R1i = ivec4(0);
|
||||
ivec4 R2i = ivec4(0);
|
||||
ivec4 R3i = ivec4(0);
|
||||
ivec4 R4i = ivec4(0);
|
||||
ivec4 R5i = ivec4(0);
|
||||
ivec4 R6i = ivec4(0);
|
||||
ivec4 R122i = ivec4(0);
|
||||
ivec4 R123i = ivec4(0);
|
||||
ivec4 R124i = ivec4(0);
|
||||
ivec4 R125i = ivec4(0);
|
||||
ivec4 R126i = ivec4(0);
|
||||
ivec4 R127i = ivec4(0);
|
||||
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
|
||||
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
|
||||
int PS0i = 0, PS1i = 0;
|
||||
ivec4 tempi = ivec4(0);
|
||||
float tempResultf;
|
||||
int tempResulti;
|
||||
ivec4 ARi = ivec4(0);
|
||||
bool predResult = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem128);
|
||||
R0i.zw = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).zw);
|
||||
R2i.xyz = floatBitsToInt(texture(textureUnitPS3, intBitsToFloat(R0i.xy)).xyz);
|
||||
R1i.xyz = floatBitsToInt(texture(textureUnitPS4, intBitsToFloat(R0i.xy)).xyz);
|
||||
R3i.xyzw = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.xy)).xyzw);
|
||||
R4i.xyz = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).xyz);
|
||||
// 0
|
||||
backupReg0i = R0i.x;
|
||||
backupReg1i = R0i.y;
|
||||
PV0i.x = ((intBitsToFloat(R0i.z) > 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
R5i.y = floatBitsToInt(intBitsToFloat(backupReg0i) + -(0.5));
|
||||
R5i.z = 0;
|
||||
R1i.w = 0x3f000000;
|
||||
R0i.y = floatBitsToInt(intBitsToFloat(backupReg1i) + -(0.5));
|
||||
PS0i = R0i.y;
|
||||
// 1
|
||||
R127i.x = ((PV0i.x == 0)?(R2i.z):(R1i.z));
|
||||
PV1i.x = R127i.x;
|
||||
R127i.y = ((PV0i.x == 0)?(R2i.y):(R1i.y));
|
||||
PV1i.y = R127i.y;
|
||||
R127i.z = ((PV0i.x == 0)?(R2i.x):(R1i.x));
|
||||
PV1i.z = R127i.z;
|
||||
R2i.w = 0x3f800000;
|
||||
R6i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedPS[0].x)) + 1.0);
|
||||
R6i.y = floatBitsToInt(intBitsToFloat(R6i.y) * 2.0);
|
||||
PS1i = R6i.y;
|
||||
// 2
|
||||
R0i.x = floatBitsToInt(-(intBitsToFloat(uf_remappedPS[0].y)) + 1.0);
|
||||
R0i.x = floatBitsToInt(intBitsToFloat(R0i.x) * 2.0);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(R2i.z) + -(intBitsToFloat(PV1i.x)));
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(R2i.y) + -(intBitsToFloat(PV1i.y)));
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(R2i.x) + -(intBitsToFloat(PV1i.z)));
|
||||
R4i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedPS[0].z)) + 1.0);
|
||||
R4i.w = floatBitsToInt(intBitsToFloat(R4i.w) * 2.0);
|
||||
PS0i = R4i.w;
|
||||
// 3
|
||||
backupReg0i = R0i.w;
|
||||
R2i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.w)) + intBitsToFloat(R127i.z)));
|
||||
R2i.y = floatBitsToInt((-(intBitsToFloat(uf_remappedPS[0].x)) * 2.0 + 1.0));
|
||||
R0i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(R0i.w)) + intBitsToFloat(R127i.x)));
|
||||
R0i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),intBitsToFloat(backupReg0i)) + intBitsToFloat(R127i.y)));
|
||||
R2i.z = uf_remappedPS[0].x;
|
||||
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||
PS1i = R2i.z;
|
||||
R1i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.ww)).xxx);
|
||||
// 0
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(R3i.y) + -(intBitsToFloat(R0i.w)));
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(R3i.x) + -(intBitsToFloat(R2i.x)));
|
||||
R124i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedPS[0].y)) * 2.0 + 1.0));
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(R3i.z) + -(intBitsToFloat(R0i.z)));
|
||||
R125i.y = uf_remappedPS[0].y;
|
||||
R125i.y = floatBitsToInt(intBitsToFloat(R125i.y) * 2.0);
|
||||
PS0i = R125i.y;
|
||||
// 1
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R3i.w)) + intBitsToFloat(R0i.z)));
|
||||
PV1i.x = R123i.x;
|
||||
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(R3i.w)) + intBitsToFloat(R0i.w)));
|
||||
PV1i.y = R123i.y;
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(R3i.w)) + intBitsToFloat(R2i.x)));
|
||||
PV1i.z = R123i.z;
|
||||
R125i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedPS[0].z)) * 2.0 + 1.0));
|
||||
R124i.x = uf_remappedPS[0].z;
|
||||
R124i.x = floatBitsToInt(intBitsToFloat(R124i.x) * 2.0);
|
||||
PS1i = R124i.x;
|
||||
// 2
|
||||
R125i.x = floatBitsToInt((intBitsToFloat(uf_remappedPS[0].x) * 2.0 + -(1.0)));
|
||||
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R4i.z),intBitsToFloat(uf_remappedPS[1].x)) + intBitsToFloat(PV1i.x)));
|
||||
PV0i.y = R123i.y;
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R4i.y),intBitsToFloat(uf_remappedPS[1].x)) + intBitsToFloat(PV1i.y)));
|
||||
PV0i.z = R123i.z;
|
||||
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R4i.x),intBitsToFloat(uf_remappedPS[1].x)) + intBitsToFloat(PV1i.z)));
|
||||
PV0i.w = R123i.w;
|
||||
PS0i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.z), intBitsToFloat(R5i.z)));
|
||||
// 3
|
||||
R127i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R1i.x)) + intBitsToFloat(0xbb83126f)));
|
||||
PV1i.x = R127i.x;
|
||||
R126i.y = floatBitsToInt((intBitsToFloat(uf_remappedPS[0].y) * 2.0 + -(1.0)));
|
||||
R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(R1i.z)) + intBitsToFloat(0xbb83126f)));
|
||||
PV1i.z = R127i.z;
|
||||
R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),intBitsToFloat(R1i.y)) + intBitsToFloat(0xbb83126f)));
|
||||
PV1i.w = R127i.w;
|
||||
R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(PS0i)));
|
||||
PS1i = R122i.x;
|
||||
// 4
|
||||
R123i.x = floatBitsToInt((intBitsToFloat(PV1i.w) * intBitsToFloat(0x40c66666) + intBitsToFloat(0x3fd9999a)));
|
||||
PV0i.x = R123i.x;
|
||||
R123i.y = floatBitsToInt((intBitsToFloat(PV1i.x) * intBitsToFloat(0x40c66666) + intBitsToFloat(0x3fd9999a)));
|
||||
PV0i.y = R123i.y;
|
||||
R126i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R5i.y)) + intBitsToFloat(PS1i)));
|
||||
R123i.w = floatBitsToInt((intBitsToFloat(PV1i.z) * intBitsToFloat(0x40c66666) + intBitsToFloat(0x3fd9999a)));
|
||||
PV0i.w = R123i.w;
|
||||
R126i.w = floatBitsToInt((intBitsToFloat(PV1i.x) * intBitsToFloat(0x40c66666) + 0.5));
|
||||
PS0i = R126i.w;
|
||||
// 5
|
||||
R126i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(PV0i.w)) + intBitsToFloat(0x3d75c28f)));
|
||||
R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(PV0i.x)) + intBitsToFloat(0x3d75c28f)));
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PV0i.y)) + intBitsToFloat(0x3d75c28f)));
|
||||
PV1i.z = R123i.z;
|
||||
R123i.w = floatBitsToInt((intBitsToFloat(R127i.w) * intBitsToFloat(0x40c66666) + 0.5));
|
||||
PV1i.w = R123i.w;
|
||||
R122i.x = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(0x40c66666) + 0.5));
|
||||
PS1i = R122i.x;
|
||||
// 6
|
||||
backupReg0i = R127i.z;
|
||||
backupReg1i = R127i.w;
|
||||
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.x), intBitsToFloat(R126i.w)));
|
||||
R124i.y = floatBitsToInt((intBitsToFloat(uf_remappedPS[0].z) * 2.0 + -(1.0)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(PS1i)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg1i), intBitsToFloat(PV1i.w)));
|
||||
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.z));
|
||||
// 7
|
||||
R125i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PS0i)));
|
||||
R125i.z = clampFI32(R125i.z);
|
||||
PS1i = floatBitsToInt(1.0 / intBitsToFloat(R127i.y));
|
||||
// 8
|
||||
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PS1i)));
|
||||
R127i.y = clampFI32(R127i.y);
|
||||
PS0i = floatBitsToInt(1.0 / intBitsToFloat(R126i.x));
|
||||
// 9
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PS0i)));
|
||||
R127i.w = clampFI32(R127i.w);
|
||||
PS1i = floatBitsToInt(sqrt(intBitsToFloat(R126i.z)));
|
||||
// 10
|
||||
R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PS1i)),intBitsToFloat(uf_remappedPS[2].w)) + intBitsToFloat(uf_remappedPS[2].z)));
|
||||
R123i.y = clampFI32(R123i.y);
|
||||
PV0i.y = R123i.y;
|
||||
// 11
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.z), intBitsToFloat(PV0i.y)));
|
||||
PV1i.x = R127i.x;
|
||||
R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PV0i.y)));
|
||||
PV1i.y = R5i.y;
|
||||
R125i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PV0i.y)));
|
||||
PV1i.z = R125i.z;
|
||||
// 12
|
||||
R1i.x = floatBitsToInt(dot(vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),intBitsToFloat(R2i.w)),vec4(intBitsToFloat(uf_remappedPS[3].x),intBitsToFloat(uf_remappedPS[3].y),intBitsToFloat(uf_remappedPS[3].z),intBitsToFloat(uf_remappedPS[3].w))));
|
||||
PV0i.x = R1i.x;
|
||||
PV0i.y = R1i.x;
|
||||
PV0i.z = R1i.x;
|
||||
PV0i.w = R1i.x;
|
||||
// 13
|
||||
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R127i.x),intBitsToFloat(R5i.y),intBitsToFloat(R125i.z),intBitsToFloat(R2i.w)),vec4(intBitsToFloat(uf_remappedPS[4].x),intBitsToFloat(uf_remappedPS[4].y),intBitsToFloat(uf_remappedPS[4].z),intBitsToFloat(uf_remappedPS[4].w))));
|
||||
PV1i.x = tempi.x;
|
||||
PV1i.y = tempi.x;
|
||||
PV1i.z = tempi.x;
|
||||
PV1i.w = tempi.x;
|
||||
R127i.w = tempi.x;
|
||||
R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PV0i.x)));
|
||||
PS1i = R126i.x;
|
||||
// 14
|
||||
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R127i.x),intBitsToFloat(R5i.y),intBitsToFloat(R125i.z),intBitsToFloat(R2i.w)),vec4(intBitsToFloat(uf_remappedPS[5].x),intBitsToFloat(uf_remappedPS[5].y),intBitsToFloat(uf_remappedPS[5].z),intBitsToFloat(uf_remappedPS[5].w))));
|
||||
PV0i.x = tempi.x;
|
||||
PV0i.y = tempi.x;
|
||||
PV0i.z = tempi.x;
|
||||
PV0i.w = tempi.x;
|
||||
R126i.z = tempi.x;
|
||||
PS0i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PV1i.x)));
|
||||
// 15
|
||||
backupReg0i = R126i.x;
|
||||
R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.z), intBitsToFloat(PS0i)));
|
||||
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(backupReg0i)));
|
||||
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PV0i.x)));
|
||||
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R6i.y)));
|
||||
PS1i = floatBitsToInt(sqrt(intBitsToFloat(R1i.x)));
|
||||
// 16
|
||||
backupReg0i = R0i.x;
|
||||
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(backupReg0i)));
|
||||
R2i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.z), intBitsToFloat(R4i.w)));
|
||||
R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PS1i),intBitsToFloat(R125i.x)) + intBitsToFloat(PV1i.w)));
|
||||
PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.w), intBitsToFloat(PV1i.z)));
|
||||
PS0i = floatBitsToInt(sqrt(intBitsToFloat(R127i.w)));
|
||||
// 17
|
||||
backupReg0i = R126i.x;
|
||||
backupReg1i = R127i.y;
|
||||
R126i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(R125i.y)) + intBitsToFloat(backupReg0i)));
|
||||
R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PS0i),intBitsToFloat(R126i.y)) + intBitsToFloat(PV0i.x)));
|
||||
R124i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(R2i.z)) + intBitsToFloat(backupReg1i)));
|
||||
R125i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.z),intBitsToFloat(R124i.x)) + intBitsToFloat(PV0i.w)));
|
||||
PS1i = floatBitsToInt(sqrt(intBitsToFloat(R126i.z)));
|
||||
// 18
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PS1i),intBitsToFloat(R124i.y)) + intBitsToFloat(R2i.y)));
|
||||
PV0i.x = R123i.x;
|
||||
PV0i.y = ((intBitsToFloat(R126i.z) >= 0.5)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.z = ((intBitsToFloat(R127i.w) >= 0.5)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.w = ((intBitsToFloat(R1i.x) >= 0.5)?int(0xFFFFFFFF):int(0x0));
|
||||
PS0i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(uf_remappedPS[6].z), intBitsToFloat(R125i.z)));
|
||||
// 19
|
||||
R123i.x = ((PV0i.w == 0)?(R124i.z):(R127i.z));
|
||||
PV1i.x = R123i.x;
|
||||
R123i.z = ((PV0i.y == 0)?(R125i.w):(PV0i.x));
|
||||
PV1i.z = R123i.z;
|
||||
R123i.w = ((PV0i.z == 0)?(R126i.x):(R127i.y));
|
||||
PV1i.w = R123i.w;
|
||||
R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(uf_remappedPS[6].y),intBitsToFloat(R5i.y)) + intBitsToFloat(PS0i)));
|
||||
PS1i = R122i.x;
|
||||
// 20
|
||||
PV0i.x = floatBitsToInt(-(intBitsToFloat(R127i.w)) + intBitsToFloat(PV1i.w));
|
||||
PV0i.y = floatBitsToInt(-(intBitsToFloat(R1i.x)) + intBitsToFloat(PV1i.x));
|
||||
PV0i.w = floatBitsToInt(-(intBitsToFloat(R126i.z)) + intBitsToFloat(PV1i.z));
|
||||
R5i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(uf_remappedPS[6].x),intBitsToFloat(R127i.x)) + intBitsToFloat(PS1i)));
|
||||
PS0i = R5i.w;
|
||||
// 21
|
||||
R5i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(uf_remappedPS[0].w)) + intBitsToFloat(R1i.x)));
|
||||
R5i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(uf_remappedPS[0].w)) + intBitsToFloat(R127i.w)));
|
||||
R5i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(uf_remappedPS[0].w)) + intBitsToFloat(R126i.z)));
|
||||
// export
|
||||
passPixelColor0 = clamp(vec4(intBitsToFloat(R5i.x), intBitsToFloat(R5i.y), intBitsToFloat(R5i.z), intBitsToFloat(R5i.w))*$cutsceneBrightness, 0.0, 1.0);
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
#version 430
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader 8f3c56388d6f5acb
|
||||
// Used for: Changes the brightness of the cutscenes in the japanese version of the game.
|
||||
|
||||
|
||||
#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.zw)
|
||||
#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 = 4) 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;
|
||||
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
|
||||
TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2;
|
||||
TEXTURE_LAYOUT(3, 1, 3) uniform sampler2D textureUnitPS3;
|
||||
layout(location = 0) in vec4 passParameterSem128;
|
||||
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 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 R123f = vec4(0.0);
|
||||
vec4 R126f = vec4(0.0);
|
||||
vec4 R127f = vec4(0.0);
|
||||
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||
float PS0f = 0.0, PS1f = 0.0;
|
||||
vec4 tempf = vec4(0.0);
|
||||
float tempResultf;
|
||||
int tempResulti;
|
||||
ivec4 ARi = ivec4(0);
|
||||
bool predResult = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0f = passParameterSem128;
|
||||
R1f.xyzw = (texture(textureUnitPS1, R0f.xy).xyzw);
|
||||
R4f.xyz = (texture(textureUnitPS3, R0f.xy).xyz);
|
||||
R5f.xyzw = (texture(textureUnitPS2, R0f.xy).xyzw);
|
||||
// 0
|
||||
PV0f.x = intBitsToFloat(uf_remappedPS[0].y);
|
||||
PV0f.x *= 2.0;
|
||||
R3f.y = -(R5f.w) + 0.5;
|
||||
R3f.y *= 2.0;
|
||||
R3f.y = clamp(R3f.y, 0.0, 1.0);
|
||||
PV0f.z = R1f.w + -(0.5);
|
||||
PV0f.w = intBitsToFloat(uf_remappedPS[0].x);
|
||||
PV0f.w *= 2.0;
|
||||
R6f.w = 1.0;
|
||||
PS0f = R6f.w;
|
||||
// 1
|
||||
backupReg0f = R0f.y;
|
||||
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||
PV1f.y *= 2.0;
|
||||
R123f.z = (mul_nonIEEE(backupReg0f,PV0f.x) + -(intBitsToFloat(uf_remappedPS[0].y)));
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(R0f.x,PV0f.w) + -(intBitsToFloat(uf_remappedPS[0].x)));
|
||||
PV1f.w = R123f.w;
|
||||
// 2
|
||||
R2f.x = -(PV1f.y) + 1.0;
|
||||
R2f.x = clamp(R2f.x, 0.0, 1.0);
|
||||
PV0f.x = R2f.x;
|
||||
R0f.y = PV1f.z + intBitsToFloat(uf_remappedPS[1].y);
|
||||
R0f.z = PV1f.w + intBitsToFloat(uf_remappedPS[1].x);
|
||||
R2f.w = PV1f.w + 0.5;
|
||||
R2f.y = PV1f.z + 0.5;
|
||||
PS0f = R2f.y;
|
||||
// 3
|
||||
R0f.w = mul_nonIEEE(PV0f.x, PV0f.x);
|
||||
PV1f.w = R0f.w;
|
||||
PS1f = 1.0 / PV0f.x;
|
||||
// 4
|
||||
backupReg0f = R1f.y;
|
||||
backupReg1f = R1f.z;
|
||||
R3f.x = mul_nonIEEE(R1f.x, PV1f.w);
|
||||
R1f.y = mul_nonIEEE(backupReg0f, PV1f.w);
|
||||
R1f.z = PS1f + 0.0;
|
||||
R1f.w = mul_nonIEEE(backupReg1f, PV1f.w);
|
||||
R1f.x = (textureLod(textureUnitPS0, R0f.zy,0.0).x);
|
||||
R0f.x = (textureLod(textureUnitPS0, R2f.wy,0.0).x);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
PV0f.x = R1f.x + backupReg0f;
|
||||
PV0f.x /= 2.0;
|
||||
PV0f.y = R1f.z * 0.25;
|
||||
PV0f.y = clamp(PV0f.y, 0.0, 1.0);
|
||||
// 1
|
||||
PV1f.x = -(R2f.x) + PV0f.y;
|
||||
PV1f.x = clamp(PV1f.x, 0.0, 1.0);
|
||||
R126f.y = (mul_nonIEEE(PV0f.x,intBitsToFloat(uf_remappedPS[0].w)) + intBitsToFloat(uf_remappedPS[0].z));
|
||||
PV1f.y = R126f.y;
|
||||
// 2
|
||||
PV0f.x = PV1f.x + R0f.w;
|
||||
R127f.y = (mul_nonIEEE(R4f.z,PV1f.x) + R1f.w);
|
||||
R127f.z = (mul_nonIEEE(R4f.y,PV1f.x) + R1f.y);
|
||||
R127f.w = (mul_nonIEEE(R4f.x,PV1f.x) + R3f.x);
|
||||
R126f.w = mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedPS[2].z));
|
||||
PS0f = R126f.w;
|
||||
// 3
|
||||
PS1f = 1.0 / PV0f.x;
|
||||
// 4
|
||||
R127f.x = mul_nonIEEE(R127f.y, PS1f);
|
||||
PV0f.x = R127f.x;
|
||||
R127f.y = mul_nonIEEE(R127f.z, PS1f);
|
||||
PV0f.y = R127f.y;
|
||||
R127f.z = mul_nonIEEE(R127f.w, PS1f);
|
||||
PV0f.z = R127f.z;
|
||||
// 5
|
||||
PV1f.x = R5f.z + -(PV0f.x);
|
||||
PV1f.y = R5f.y + -(PV0f.y);
|
||||
PV1f.z = R5f.x + -(PV0f.z);
|
||||
// 6
|
||||
R123f.y = (mul_nonIEEE(PV1f.x,R3f.y) + R127f.x);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(PV1f.y,R3f.y) + R127f.y);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(PV1f.z,R3f.y) + R127f.z);
|
||||
PV0f.w = R123f.w;
|
||||
// 7
|
||||
R123f.x = (mul_nonIEEE(PV0f.y,R126f.w) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(PV0f.z,R126f.w) + PV0f.z);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(PV0f.w,R126f.w) + PV0f.w);
|
||||
PV1f.z = R123f.z;
|
||||
// 8
|
||||
R6f.x = (mul_nonIEEE(R126f.y,intBitsToFloat(uf_remappedPS[2].w)) + PV1f.z);
|
||||
R6f.x = clamp(R6f.x, 0.0, 1.0);
|
||||
R6f.y = (mul_nonIEEE(R126f.y,intBitsToFloat(uf_remappedPS[2].w)) + PV1f.y);
|
||||
R6f.y = clamp(R6f.y, 0.0, 1.0);
|
||||
R6f.z = (mul_nonIEEE(R126f.y,intBitsToFloat(uf_remappedPS[2].w)) + PV1f.x);
|
||||
R6f.z = clamp(R6f.z, 0.0, 1.0);
|
||||
// export
|
||||
passPixelColor0 = clamp(vec4(R6f.x, R6f.y, R6f.z, R6f.w)*$cutsceneBrightness, 0.0, 1.0);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
[Definition]
|
||||
titleIds = 00050000101D0300,00050000101D0600,000500001014D200,00050000101D3F00
|
||||
name = Cutscene Brightness
|
||||
path = "Fatal Frame - Project Zero: Maiden of Black Water/Workarounds/Cutscene Brightness"
|
||||
description = Makes the cutscenes brighter which are normally very dark. This can be pretty ugly since the lighting is still missing, but it will help with the visibility.
|
||||
version = 4
|
||||
|
||||
|
||||
[Preset]
|
||||
name = Normal (Default)
|
||||
$cutsceneBrightness = 1.0
|
||||
|
||||
[Preset]
|
||||
name = 3x Cutscene Brightness
|
||||
$cutsceneBrightness = 3.0
|
||||
|
||||
[Preset]
|
||||
name = 5x Cutscene Brightness
|
||||
$cutsceneBrightness = 5.0
|
||||
|
||||
[Preset]
|
||||
name = 8x Cutscene Brightness
|
||||
$cutsceneBrightness = 8.0
|
||||
|
||||
[Preset]
|
||||
name = 10x Cutscene Brightness
|
||||
$cutsceneBrightness = 10.0
|
||||
|
||||
[Preset]
|
||||
name = 15x Cutscene Brightness
|
||||
$cutsceneBrightness = 15.0
|
||||
|
||||
[Preset]
|
||||
name = 20x Cutscene Brightness
|
||||
$cutsceneBrightness = 20.0
|
Loading…
Reference in New Issue
Block a user