mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-26 11:34:15 +01:00
[Shantae HGH] - Scaling and AA fix
This commit is contained in:
parent
052019c690
commit
dfec176d92
@ -0,0 +1,245 @@
|
|||||||
|
<?php
|
||||||
|
include 'Source/functions.php';
|
||||||
|
$fullWidth = $argv[1];
|
||||||
|
$fullHeight = $argv[2];
|
||||||
|
$scaleFactorX = always_decimal_format($fullWidth / 1280.0);
|
||||||
|
$scaleFactorY = always_decimal_format($fullHeight / 720.0);
|
||||||
|
?>
|
||||||
|
|
||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
// shader 023831cdf6638473
|
||||||
|
//ps aa restore
|
||||||
|
const float resScale = <?=$scaleFactorX?>;
|
||||||
|
uniform ivec4 uf_remappedPS[3];
|
||||||
|
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf531c800 res 1920x1080x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||||
|
layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf5b14800 res 480x270x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 0 border: 0
|
||||||
|
layout(location = 0) in vec4 passParameterSem129;
|
||||||
|
layout(location = 1) in vec4 passParameterSem128;
|
||||||
|
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 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R5i = ivec4(0);
|
||||||
|
ivec4 R6i = ivec4(0);
|
||||||
|
ivec4 R123i = 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(passParameterSem129);
|
||||||
|
R1i = floatBitsToInt(passParameterSem128);
|
||||||
|
if( activeMaskStackC[1] == true ) {
|
||||||
|
R2i.w = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.zy),0.0).y);
|
||||||
|
R2i.z = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.xw),0.0).y);
|
||||||
|
R2i.y = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.xy),0.0).y);
|
||||||
|
R0i.x = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.zw),0.0).y);
|
||||||
|
R3i.xyzw = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R1i.xy),0.0).xyzw);
|
||||||
|
}
|
||||||
|
if( activeMaskStackC[1] == true ) {
|
||||||
|
activeMaskStack[1] = activeMaskStack[0];
|
||||||
|
activeMaskStackC[2] = activeMaskStackC[1];
|
||||||
|
// 0
|
||||||
|
R127i.x = floatBitsToInt(max(intBitsToFloat(R2i.z), intBitsToFloat(R2i.y)));
|
||||||
|
R127i.y = floatBitsToInt(min(intBitsToFloat(R2i.z), intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(R2i.w) + intBitsToFloat(0x3b2aaaab));
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 1
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV1i.x = floatBitsToInt(min(intBitsToFloat(PV0i.w), intBitsToFloat(backupReg0i)));
|
||||||
|
PV1i.y = floatBitsToInt(-(intBitsToFloat(PV0i.w)) + intBitsToFloat(R2i.z));
|
||||||
|
PV1i.z = floatBitsToInt(max(intBitsToFloat(PV0i.w), intBitsToFloat(backupReg0i)));
|
||||||
|
// 2
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.y) + -(intBitsToFloat(R2i.y)));
|
||||||
|
R5i.z = floatBitsToInt(min(intBitsToFloat(R127i.y), intBitsToFloat(PV1i.x)));
|
||||||
|
PV0i.z = R5i.z;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R2i.y));
|
||||||
|
R6i.z = floatBitsToInt(max(intBitsToFloat(R127i.x), intBitsToFloat(PV1i.z)));
|
||||||
|
PS0i = R6i.z;
|
||||||
|
// 3
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV1i.x = floatBitsToInt(max(intBitsToFloat(R3i.y), intBitsToFloat(PS0i)));
|
||||||
|
PV1i.y = floatBitsToInt(min(intBitsToFloat(R3i.y), intBitsToFloat(PV0i.z)));
|
||||||
|
R0i.z = floatBitsToInt(intBitsToFloat(PV0i.w) + -(intBitsToFloat(backupReg0i)));
|
||||||
|
PV1i.w = floatBitsToInt(intBitsToFloat(PS0i) * intBitsToFloat(0x3e000000));
|
||||||
|
R0i.x = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(backupReg0i));
|
||||||
|
PS1i = R0i.x;
|
||||||
|
// 4
|
||||||
|
PV0i.y = floatBitsToInt(-(intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.x));
|
||||||
|
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.w), intBitsToFloat(0x3d4ccccd)));
|
||||||
|
// 5
|
||||||
|
PV1i.x = ((intBitsToFloat(PV0i.z) > intBitsToFloat(PV0i.y))?int(0xFFFFFFFF):int(0x0));
|
||||||
|
// 6
|
||||||
|
R2i.x = ((PV1i.x == 0)?(0):(R3i.x));
|
||||||
|
R2i.y = ((PV1i.x == 0)?(0):(R3i.y));
|
||||||
|
R2i.z = ((PV1i.x == 0)?(0):(R3i.z));
|
||||||
|
R2i.w = ((PV1i.x == 0)?(0):(R3i.w));
|
||||||
|
R0i.w = ((PV1i.x == 0)?(0):(0x3f800000));
|
||||||
|
PS0i = R0i.w;
|
||||||
|
// 7
|
||||||
|
predResult = (R0i.w == 0);
|
||||||
|
activeMaskStack[1] = predResult;
|
||||||
|
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
activeMaskStack[1] = false;
|
||||||
|
activeMaskStackC[2] = false;
|
||||||
|
}
|
||||||
|
if( activeMaskStackC[2] == true ) {
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
backupReg1i = R0i.y;
|
||||||
|
backupReg1i = R0i.y;
|
||||||
|
backupReg2i = R0i.z;
|
||||||
|
backupReg2i = R0i.z;
|
||||||
|
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg2i),-0.0),vec4(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg2i),0.0)));
|
||||||
|
PV0i.x = tempi.x;
|
||||||
|
PV0i.y = tempi.x;
|
||||||
|
PV0i.z = tempi.x;
|
||||||
|
PV0i.w = tempi.x;
|
||||||
|
// 1
|
||||||
|
tempResultf = 1.0 / sqrt(intBitsToFloat(PV0i.x));
|
||||||
|
PS1i = floatBitsToInt(tempResultf);
|
||||||
|
// 2
|
||||||
|
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), intBitsToFloat(PS1i)));
|
||||||
|
PV0i.z = R127i.z;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.x), intBitsToFloat(PS1i)));
|
||||||
|
PV0i.w = R127i.w;
|
||||||
|
// 3
|
||||||
|
PV1i.x = floatBitsToInt(max(intBitsToFloat(PV0i.z), -(intBitsToFloat(PV0i.z))));
|
||||||
|
PV1i.y = floatBitsToInt(max(intBitsToFloat(PV0i.w), -(intBitsToFloat(PV0i.w))));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_remappedPS[0].z) / resScale));
|
||||||
|
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_remappedPS[0].w) / resScale));
|
||||||
|
// 4
|
||||||
|
R0i.x = floatBitsToInt(intBitsToFloat(R1i.x) + -(intBitsToFloat(PV1i.z)));
|
||||||
|
R0i.y = floatBitsToInt(intBitsToFloat(R1i.y) + -(intBitsToFloat(PV1i.w)));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(PV1i.z));
|
||||||
|
PV0i.w = floatBitsToInt(min(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.x)));
|
||||||
|
R2i.y = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(PV1i.w));
|
||||||
|
PS0i = R2i.y;
|
||||||
|
// 5
|
||||||
|
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.w) * intBitsToFloat(0x41000000)/ resScale);
|
||||||
|
// 6
|
||||||
|
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.z));
|
||||||
|
// 7
|
||||||
|
PV1i.x = floatBitsToInt(intBitsToFloat(R127i.w) * intBitsToFloat(PS0i));
|
||||||
|
PV1i.w = floatBitsToInt(intBitsToFloat(R127i.z) * intBitsToFloat(PS0i));
|
||||||
|
// 8
|
||||||
|
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.w), intBitsToFloat(0xc0000000) / resScale));
|
||||||
|
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.x), intBitsToFloat(0xc0000000) / resScale));
|
||||||
|
// 9
|
||||||
|
PV1i.x = floatBitsToInt(min(intBitsToFloat(PV0i.z), 2.0));
|
||||||
|
PV1i.w = floatBitsToInt(min(intBitsToFloat(PV0i.y), 2.0));
|
||||||
|
// 10
|
||||||
|
PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(uf_remappedPS[1].x) / resScale));
|
||||||
|
PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(uf_remappedPS[1].y) / resScale));
|
||||||
|
// 11
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R1i.x) + -(intBitsToFloat(PV0i.z)));
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R1i.y) + -(intBitsToFloat(PV0i.w)));
|
||||||
|
R0i.z = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(PV0i.z));
|
||||||
|
R0i.w = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(PV0i.w));
|
||||||
|
}
|
||||||
|
if( activeMaskStackC[2] == true ) {
|
||||||
|
R4i.xyzw = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.xy),0.0).xyzw);
|
||||||
|
R2i.xyzw = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R2i.zy),0.0).xyzw);
|
||||||
|
R3i.xyzw = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R3i.xy),0.0).xyzw);
|
||||||
|
R0i.xyzw = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.zw),0.0).xyzw);
|
||||||
|
}
|
||||||
|
if( activeMaskStackC[2] == true ) {
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R4i.z) + intBitsToFloat(R2i.z));
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R126i.x) / 2.0);
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R2i.y));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R2i.x));
|
||||||
|
R126i.z = floatBitsToInt(intBitsToFloat(R126i.z) / 2.0);
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.w) + intBitsToFloat(R2i.w));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R126i.w) / 2.0);
|
||||||
|
// 1
|
||||||
|
backupReg0i = R0i.y;
|
||||||
|
backupReg1i = R0i.x;
|
||||||
|
backupReg2i = R0i.w;
|
||||||
|
PV1i.x = floatBitsToInt(intBitsToFloat(R3i.z) + intBitsToFloat(R0i.z));
|
||||||
|
PV1i.x = floatBitsToInt(intBitsToFloat(PV1i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(backupReg0i));
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(PV1i.y) / 2.0);
|
||||||
|
PV1i.z = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(backupReg1i));
|
||||||
|
PV1i.z = floatBitsToInt(intBitsToFloat(PV1i.z) / 2.0);
|
||||||
|
PV1i.w = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(backupReg2i));
|
||||||
|
PV1i.w = floatBitsToInt(intBitsToFloat(PV1i.w) / 2.0);
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R126i.x) + intBitsToFloat(PV1i.x));
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
R127i.y = floatBitsToInt(intBitsToFloat(R126i.y) + intBitsToFloat(PV1i.y));
|
||||||
|
R127i.y = floatBitsToInt(intBitsToFloat(R127i.y) / 2.0);
|
||||||
|
PV0i.y = R127i.y;
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(PV1i.z));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(R127i.z) / 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(PV1i.w));
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(R127i.w) / 2.0);
|
||||||
|
// 3
|
||||||
|
PV1i.y = ((intBitsToFloat(PV0i.y) > intBitsToFloat(R6i.z))?int(0xFFFFFFFF):int(0x0));
|
||||||
|
PV1i.z = ((intBitsToFloat(R5i.z) > intBitsToFloat(PV0i.y))?int(0xFFFFFFFF):int(0x0));
|
||||||
|
// 4
|
||||||
|
R123i.x = ((PV1i.z == 0)?(PV1i.y):(int(-1)));
|
||||||
|
PV0i.x = R123i.x;
|
||||||
|
// 5
|
||||||
|
R2i.x = ((PV0i.x == 0)?(R127i.z):(R126i.z));
|
||||||
|
R2i.y = ((PV0i.x == 0)?(R127i.y):(R126i.y));
|
||||||
|
R2i.z = ((PV0i.x == 0)?(R127i.x):(R126i.x));
|
||||||
|
R2i.w = ((PV0i.x == 0)?(R127i.w):(R126i.w));
|
||||||
|
}
|
||||||
|
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||||
|
if( activeMaskStackC[1] == true ) {
|
||||||
|
R1i.xyzw = floatBitsToInt(texture(textureUnitPS3, intBitsToFloat(R1i.zw)).xyzw);
|
||||||
|
}
|
||||||
|
if( activeMaskStackC[1] == true ) {
|
||||||
|
// 0
|
||||||
|
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.w), intBitsToFloat(R1i.w)));
|
||||||
|
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R1i.w)));
|
||||||
|
PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.y), intBitsToFloat(R1i.w)));
|
||||||
|
PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R1i.w)));
|
||||||
|
// 1
|
||||||
|
R1i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(uf_remappedPS[2].x)) + intBitsToFloat(R2i.x)));
|
||||||
|
R1i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),intBitsToFloat(uf_remappedPS[2].x)) + intBitsToFloat(R2i.y)));
|
||||||
|
R1i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(uf_remappedPS[2].x)) + intBitsToFloat(R2i.z)));
|
||||||
|
R1i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(uf_remappedPS[2].x)) + intBitsToFloat(R2i.w)));
|
||||||
|
}
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
}
|
@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
include 'Source/functions.php';
|
||||||
|
$fullWidth = $argv[1];
|
||||||
|
$fullHeight = $argv[2];
|
||||||
|
$scaleFactorX = always_decimal_format($fullWidth / 1280.0);
|
||||||
|
$scaleFactorY = always_decimal_format($fullHeight / 720.0);
|
||||||
|
?>
|
||||||
|
|
||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 24d99fe8b4e5f576
|
||||||
|
//AA restore
|
||||||
|
const float resScale = <?=$scaleFactorX?>;
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem129;
|
||||||
|
layout(location = 1) out vec4 passParameterSem128;
|
||||||
|
int clampFI32(int v)
|
||||||
|
{
|
||||||
|
if( v == 0x7FFFFFFF )
|
||||||
|
return floatBitsToInt(1.0);
|
||||||
|
else if( v == 0xFFFFFFFF )
|
||||||
|
return floatBitsToInt(0.0);
|
||||||
|
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
|
||||||
|
}
|
||||||
|
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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 = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
PV0f.x = R2f.y + intBitsToFloat(uf_remappedVS[0].y)/ resScale;
|
||||||
|
PV0f.y = R2f.x + intBitsToFloat(uf_remappedVS[0].x)/ resScale;
|
||||||
|
R1f.w = 1.0;
|
||||||
|
R0f.x = R2f.x + -(intBitsToFloat(uf_remappedVS[0].x)/ resScale);
|
||||||
|
PS0f = R0f.x;
|
||||||
|
// 1
|
||||||
|
R0f.y = R2f.y + -(intBitsToFloat(uf_remappedVS[0].y)/ resScale);
|
||||||
|
R0f.z = PV0f.y;
|
||||||
|
R0f.w = PV0f.x;
|
||||||
|
// export
|
||||||
|
gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem129 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem128 = vec4(R2f.x, R2f.y, R2f.x, R2f.y);
|
||||||
|
}
|
@ -0,0 +1,121 @@
|
|||||||
|
<?php
|
||||||
|
include 'Source/functions.php';
|
||||||
|
$fullWidth = $argv[1];
|
||||||
|
$fullHeight = $argv[2];
|
||||||
|
$scaleFactorX = always_decimal_format($fullWidth / 1280.0);
|
||||||
|
$scaleFactorY = always_decimal_format($fullHeight / 720.0);
|
||||||
|
?>
|
||||||
|
|
||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
// shader 294904d1771460cf
|
||||||
|
//vertical blur
|
||||||
|
const float resScale = <?=$scaleFactorX?>;
|
||||||
|
uniform ivec4 uf_remappedPS[1];
|
||||||
|
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5b14800 res 480x270x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||||
|
layout(location = 0) in vec4 passParameterSem128;
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
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 R123f = 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;
|
||||||
|
R4f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
R127f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x404ec4ec)/ resScale;
|
||||||
|
PV0f.x = R127f.x;
|
||||||
|
PV0f.y = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3fb13b14)/ resScale;
|
||||||
|
R127f.z = 0.0;
|
||||||
|
PV0f.z = R127f.z;
|
||||||
|
// 1
|
||||||
|
R1f.x = PV0f.z + R0f.x;
|
||||||
|
PV1f.y = PV0f.x;
|
||||||
|
PV1f.z = -(PV0f.y);
|
||||||
|
PV1f.w = PV0f.y;
|
||||||
|
R2f.x = PV0f.z + R0f.x;
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
R3f.x = R127f.z + R0f.x;
|
||||||
|
R1f.y = PV1f.w + R0f.y;
|
||||||
|
R2f.z = PV1f.z + R0f.y;
|
||||||
|
R3f.w = PV1f.y + R0f.y;
|
||||||
|
PS0f = -(R127f.x);
|
||||||
|
// 3
|
||||||
|
backupReg0f = R0f.x;
|
||||||
|
backupReg1f = R0f.y;
|
||||||
|
R0f.x = R127f.z + backupReg0f;
|
||||||
|
R0f.y = PS0f + backupReg1f;
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
R2f.xyzw = (texture(textureUnitPS0, R2f.xz).xyzw);
|
||||||
|
R3f.xyzw = (texture(textureUnitPS0, R3f.xw).xyzw);
|
||||||
|
R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
PV0f.x = R1f.z * intBitsToFloat(0x3ea1e718);
|
||||||
|
PV0f.y = R1f.y * intBitsToFloat(0x3ea1e718);
|
||||||
|
PV0f.z = R1f.x * intBitsToFloat(0x3ea1e718);
|
||||||
|
PV0f.w = R1f.w * intBitsToFloat(0x3ea1e718);
|
||||||
|
// 1
|
||||||
|
R123f.x = (R4f.z * intBitsToFloat(0x3e6879c6) + PV0f.x);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (R4f.y * intBitsToFloat(0x3e6879c6) + PV0f.y);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
R123f.z = (R4f.x * intBitsToFloat(0x3e6879c6) + PV0f.z);
|
||||||
|
PV1f.z = R123f.z;
|
||||||
|
R123f.w = (R4f.w * intBitsToFloat(0x3e6879c6) + PV0f.w);
|
||||||
|
PV1f.w = R123f.w;
|
||||||
|
// 2
|
||||||
|
R123f.x = (R2f.w * intBitsToFloat(0x3ea1e718) + PV1f.w);
|
||||||
|
PV0f.x = R123f.x;
|
||||||
|
R123f.y = (R2f.z * intBitsToFloat(0x3ea1e718) + PV1f.x);
|
||||||
|
PV0f.y = R123f.y;
|
||||||
|
R123f.z = (R2f.y * intBitsToFloat(0x3ea1e718) + PV1f.y);
|
||||||
|
PV0f.z = R123f.z;
|
||||||
|
R123f.w = (R2f.x * intBitsToFloat(0x3ea1e718) + PV1f.z);
|
||||||
|
PV0f.w = R123f.w;
|
||||||
|
// 3
|
||||||
|
R123f.x = (R3f.z * intBitsToFloat(0x3d8fe9dc) + PV0f.y);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (R3f.y * intBitsToFloat(0x3d8fe9dc) + PV0f.z);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
R123f.z = (R3f.x * intBitsToFloat(0x3d8fe9dc) + PV0f.w);
|
||||||
|
PV1f.z = R123f.z;
|
||||||
|
R123f.w = (R3f.w * intBitsToFloat(0x3d8fe9dc) + PV0f.x);
|
||||||
|
PV1f.w = R123f.w;
|
||||||
|
// 4
|
||||||
|
backupReg0f = R0f.x;
|
||||||
|
backupReg1f = R0f.y;
|
||||||
|
backupReg2f = R0f.z;
|
||||||
|
backupReg3f = R0f.w;
|
||||||
|
R0f.x = (backupReg0f * intBitsToFloat(0x3d8fe9dc) + PV1f.z);
|
||||||
|
R0f.y = (backupReg1f * intBitsToFloat(0x3d8fe9dc) + PV1f.y);
|
||||||
|
R0f.z = (backupReg2f * intBitsToFloat(0x3d8fe9dc) + PV1f.x);
|
||||||
|
R0f.w = (backupReg3f * intBitsToFloat(0x3d8fe9dc) + PV1f.w);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||||
|
}
|
@ -0,0 +1,124 @@
|
|||||||
|
<?php
|
||||||
|
include 'Source/functions.php';
|
||||||
|
$fullWidth = $argv[1];
|
||||||
|
$fullHeight = $argv[2];
|
||||||
|
$scaleFactorX = always_decimal_format($fullWidth / 1280.0);
|
||||||
|
$scaleFactorY = always_decimal_format($fullHeight / 720.0);
|
||||||
|
?>
|
||||||
|
|
||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
// shader 8fdd009324e987ee
|
||||||
|
//horizontal blur
|
||||||
|
const float resScale = <?=$scaleFactorX?>;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedPS[1];
|
||||||
|
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5b94000 res 480x270x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||||
|
layout(location = 0) in vec4 passParameterSem128;
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
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 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;
|
||||||
|
R4f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x404ec4ec)/ resScale;
|
||||||
|
PV0f.x = R126f.x;
|
||||||
|
PV0f.y = 0.0;
|
||||||
|
PV0f.z = 0.0;
|
||||||
|
PV0f.w = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3fb13b14)/ resScale;
|
||||||
|
R127f.x = 0.0;
|
||||||
|
PS0f = R127f.x;
|
||||||
|
// 1
|
||||||
|
R1f.x = R0f.x + PV0f.w;
|
||||||
|
R1f.y = R0f.y + PV0f.y;
|
||||||
|
R2f.z = R0f.y + PV0f.z;
|
||||||
|
PV1f.w = -(PV0f.w);
|
||||||
|
R3f.x = R0f.x + PV0f.x;
|
||||||
|
PS1f = R3f.x;
|
||||||
|
// 2
|
||||||
|
R2f.x = R0f.x + PV1f.w;
|
||||||
|
R3f.y = R0f.y + R127f.x;
|
||||||
|
PV0f.z = 0.0;
|
||||||
|
PV0f.w = -(R126f.x);
|
||||||
|
// 3
|
||||||
|
backupReg0f = R0f.x;
|
||||||
|
backupReg1f = R0f.y;
|
||||||
|
R0f.x = backupReg0f + PV0f.w;
|
||||||
|
R0f.y = backupReg1f + PV0f.z;
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
R2f.xyzw = (texture(textureUnitPS0, R2f.xz).xyzw);
|
||||||
|
R3f.xyzw = (texture(textureUnitPS0, R3f.xy).xyzw);
|
||||||
|
R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
PV0f.x = R1f.x * intBitsToFloat(0x3ea1e718);
|
||||||
|
PV0f.y = R1f.w * intBitsToFloat(0x3ea1e718);
|
||||||
|
PV0f.z = R1f.z * intBitsToFloat(0x3ea1e718);
|
||||||
|
PV0f.w = R1f.y * intBitsToFloat(0x3ea1e718);
|
||||||
|
// 1
|
||||||
|
R123f.x = (R4f.x * intBitsToFloat(0x3e6879c6) + PV0f.x);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (R4f.w * intBitsToFloat(0x3e6879c6) + PV0f.y);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
R123f.z = (R4f.z * intBitsToFloat(0x3e6879c6) + PV0f.z);
|
||||||
|
PV1f.z = R123f.z;
|
||||||
|
R123f.w = (R4f.y * intBitsToFloat(0x3e6879c6) + PV0f.w);
|
||||||
|
PV1f.w = R123f.w;
|
||||||
|
// 2
|
||||||
|
R123f.x = (R2f.x * intBitsToFloat(0x3ea1e718) + PV1f.x);
|
||||||
|
PV0f.x = R123f.x;
|
||||||
|
R123f.y = (R2f.w * intBitsToFloat(0x3ea1e718) + PV1f.y);
|
||||||
|
PV0f.y = R123f.y;
|
||||||
|
R123f.z = (R2f.z * intBitsToFloat(0x3ea1e718) + PV1f.z);
|
||||||
|
PV0f.z = R123f.z;
|
||||||
|
R123f.w = (R2f.y * intBitsToFloat(0x3ea1e718) + PV1f.w);
|
||||||
|
PV0f.w = R123f.w;
|
||||||
|
// 3
|
||||||
|
R123f.x = (R3f.w * intBitsToFloat(0x3d8fe9dc) + PV0f.y);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (R3f.z * intBitsToFloat(0x3d8fe9dc) + PV0f.z);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
R123f.z = (R3f.y * intBitsToFloat(0x3d8fe9dc) + PV0f.w);
|
||||||
|
PV1f.z = R123f.z;
|
||||||
|
R123f.w = (R3f.x * intBitsToFloat(0x3d8fe9dc) + PV0f.x);
|
||||||
|
PV1f.w = R123f.w;
|
||||||
|
// 4
|
||||||
|
backupReg0f = R0f.x;
|
||||||
|
backupReg1f = R0f.y;
|
||||||
|
backupReg2f = R0f.z;
|
||||||
|
backupReg3f = R0f.w;
|
||||||
|
R0f.x = (backupReg0f * intBitsToFloat(0x3d8fe9dc) + PV1f.w);
|
||||||
|
R0f.y = (backupReg1f * intBitsToFloat(0x3d8fe9dc) + PV1f.z);
|
||||||
|
R0f.z = (backupReg2f * intBitsToFloat(0x3d8fe9dc) + PV1f.y);
|
||||||
|
R0f.w = (backupReg3f * intBitsToFloat(0x3d8fe9dc) + PV1f.x);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||||
|
}
|
33
Source/Shantae Half-Genie Hero/rules.txt
Normal file
33
Source/Shantae Half-Genie Hero/rules.txt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
include 'Source/functions.php';
|
||||||
|
$fullWidth = $argv[1];
|
||||||
|
$fullHeight = $argv[2];
|
||||||
|
$scaleFactorX = $fullWidth / 1920.0;
|
||||||
|
$scaleFactorY = $fullHeight / 1080.0;
|
||||||
|
$title = get_title($fullWidth, $fullHeight);
|
||||||
|
?>
|
||||||
|
[Definition]
|
||||||
|
titleIds = 00050000101db200,0005000010203200,0005000c101db200,0005000c10203200 # All regions
|
||||||
|
name = "Shantae: Half-Genie Hero"
|
||||||
|
version = 2
|
||||||
|
|
||||||
|
[TextureRedefine]
|
||||||
|
width = 1920
|
||||||
|
height = 1080
|
||||||
|
#formatsExcluded =
|
||||||
|
overwriteWidth = <?=round($scaleFactorX*1920?>
|
||||||
|
overwriteWidth = <?=round($scaleFactorY*1080?>
|
||||||
|
|
||||||
|
[TextureRedefine]
|
||||||
|
width = 854
|
||||||
|
height = 480
|
||||||
|
#formatsExcluded =
|
||||||
|
overwriteWidth = <?=round($scaleFactorX*854?>
|
||||||
|
overwriteWidth = <?=round($scaleFactorY*480?>
|
||||||
|
|
||||||
|
[TextureRedefine]
|
||||||
|
width = 480
|
||||||
|
height = 270
|
||||||
|
#formatsExcluded =
|
||||||
|
overwriteWidth = <?=round($scaleFactorX*480?>
|
||||||
|
overwriteWidth = <?=round($scaleFactorY*270?>
|
Loading…
Reference in New Issue
Block a user