New Blur Pack Added for Tokyo Mirage & Removed negative -0.5 cemu error for XenobladeX (#310)

* Update rules.txt

fixed preset parsing error

* Create rules.txt

created the rules file for adjust blur pack

* Add files via upload

uploaded the shader responsible
This commit is contained in:
Skal Fate 2018-12-24 12:46:53 -07:00 committed by GitHub
parent d6e9b6c2b2
commit fec10e3071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 154 additions and 5 deletions

View File

@ -0,0 +1,99 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 4d96f8f88575bcab -- Used to blur out the main frame in various cutscenes
float blur = $Blur;
uniform ivec4 uf_remappedPS[1];
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4fa8000 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4c24000 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem136;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
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 R123i = 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(passParameterSem136);
if( activeMaskStackC[1] == true ) {
R0i.w = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R0i.xy),0.0).x);
}
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
R1i.w = int(-1);
// 1
predResult = (intBitsToFloat(0x3f7ff972) >= intBitsToFloat(R0i.w));
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
PV0i.y = ((intBitsToFloat(uf_remappedPS[0].y) >= intBitsToFloat(R0i.w))?int(0xFFFFFFFF):int(0x0));
PV0i.z = ((intBitsToFloat(R0i.w) >= intBitsToFloat(uf_remappedPS[0].x))?int(0xFFFFFFFF):int(0x0));
// 1
R123i.x = ((PV0i.z == 0)?(0):(PV0i.y));
PV1i.x = R123i.x;
// 2
R1i.w = ((PV1i.x == 0)?(0):(int(-1)));
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
if( activeMaskStackC[1] == true ) {
// 0
if( (R1i.w != 0)) discard;
}
if( activeMaskStackC[1] == true ) {
R0i.xyz = floatBitsToInt(textureLod(textureUnitPS2, intBitsToFloat(R0i.xy),0.0).xyz);
}
if( activeMaskStackC[1] == true ) {
// 0
R127i.x = ((intBitsToFloat(uf_remappedPS[0].x) > intBitsToFloat(R0i.w))?int(0xFFFFFFFF):int(0x0));
PV0i.y = floatBitsToInt(-(intBitsToFloat(R0i.w)) + intBitsToFloat(uf_remappedPS[0].x));
PV0i.z = floatBitsToInt(intBitsToFloat(R0i.w) + -(intBitsToFloat(uf_remappedPS[0].y)));
// 1
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z), intBitsToFloat(PV0i.y)));
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w), intBitsToFloat(PV0i.z)));
// 2
PV0i.x = floatBitsToInt(min(intBitsToFloat(PV1i.y), 1.0));
PV0i.w = floatBitsToInt(min(intBitsToFloat(PV1i.x), 1.0));
// 3
R0i.w = ((R127i.x == 0)?(PV0i.x):(PV0i.w));
}
// export
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w) * blur );
}

View File

@ -0,0 +1,50 @@
[Definition]
titleIds = 00050000101ED700,00050000101ED800,0005000010131D00
name = Adjust CutScene Blur Pack
path = "Tokyo Mirage Sessions FE/Graphics/Adjust Blur"
description = Changes the in-game cut-scenes blur.
version = 3
[Preset]
name = 100% Blur (Original)
$Blur = 1.0
[Preset]
name = 90% Blur
$Blur = 0.9
[Preset]
name = 80% Blur
$Blur = 0.8
[Preset]
name = 70% Blur
$Blur = 0.7
[Preset]
name = 60% Blur
$Blur = 0.6
[Preset]
name = 50% Blur
$Blur = 0.5
[Preset]
name = 40% Blur
$Blur = 0.4
[Preset]
name = 30% Blur
$Blur = 0.3
[Preset]
name = 20% Blur
$Blur = 0.2
[Preset]
name = 10% Blur
$Blur = 0.1
[Preset]
name = Disabled
$Blur = 0.0

View File

@ -14,10 +14,10 @@ $0x035 = 0
[Preset]
name = LOD -0.5 (Sharper)
$0x031 = -0.5
$0x033 = -0.5
$0x034 = -0.5
$0x035 = -0.5
$0x031 = -.5
$0x033 = -.5
$0x034 = -.5
$0x035 = -.5
[Preset]
name = LOD -1 (Max for gameplay)