From a40c3c702b57bc52b5bff5020cf71ed984152bd8 Mon Sep 17 00:00:00 2001 From: intra0 Date: Thu, 12 Dec 2024 13:06:38 -0600 Subject: [PATCH] Adds Shantae Half Genie Hero Graphics into src --- .../023831cdf6638473_00000000000003c9_ps.txt | 267 ++++++++++++++++++ .../24d99fe8b4e5f576_0000000000000000_vs.txt | 101 +++++++ .../294904d1771460cf_0000000000000079_ps.txt | 141 +++++++++ .../8fdd009324e987ee_0000000000000079_ps.txt | 141 +++++++++ src/ShantaeHGH/Graphics/rules.txt | 216 ++++++++++++++ 5 files changed, 866 insertions(+) create mode 100644 src/ShantaeHGH/Graphics/023831cdf6638473_00000000000003c9_ps.txt create mode 100644 src/ShantaeHGH/Graphics/24d99fe8b4e5f576_0000000000000000_vs.txt create mode 100644 src/ShantaeHGH/Graphics/294904d1771460cf_0000000000000079_ps.txt create mode 100644 src/ShantaeHGH/Graphics/8fdd009324e987ee_0000000000000079_ps.txt create mode 100644 src/ShantaeHGH/Graphics/rules.txt diff --git a/src/ShantaeHGH/Graphics/023831cdf6638473_00000000000003c9_ps.txt b/src/ShantaeHGH/Graphics/023831cdf6638473_00000000000003c9_ps.txt new file mode 100644 index 00000000..9bbaf880 --- /dev/null +++ b/src/ShantaeHGH/Graphics/023831cdf6638473_00000000000003c9_ps.txt @@ -0,0 +1,267 @@ +#version 460 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#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 + + + + + + + +// shader 023831cdf6638473 +//ps aa restore +const float resScale = (float($width)/float($gameWidth)); + + + +TEXTURE_LAYOUT(0, 1, 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 +TEXTURE_LAYOUT(3, 1, 1) 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; +// 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 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)); +} diff --git a/src/ShantaeHGH/Graphics/24d99fe8b4e5f576_0000000000000000_vs.txt b/src/ShantaeHGH/Graphics/24d99fe8b4e5f576_0000000000000000_vs.txt new file mode 100644 index 00000000..062c5108 --- /dev/null +++ b/src/ShantaeHGH/Graphics/24d99fe8b4e5f576_0000000000000000_vs.txt @@ -0,0 +1,101 @@ +#version 460 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#extension GL_ARB_shading_language_packing : enable ////////// +#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 gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#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 SET_POSITION(_v) gl_Position = _v +#endif +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ +uniform ivec4 uf_remappedVS[1]; +uniform vec4 uf_windowSpaceToClipSpaceTransform; /////////// +}; +#else +uniform ivec4 uf_remappedVS[1]; +uniform vec2 uf_windowSpaceToClipSpaceTransform; /////////// +#endif + + + + + + + +// shader 24d99fe8b4e5f576 +//AA restore +const float resScale = (float($width)/float($gameWidth)); + +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 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; + +// 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() +{ +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); +} diff --git a/src/ShantaeHGH/Graphics/294904d1771460cf_0000000000000079_ps.txt b/src/ShantaeHGH/Graphics/294904d1771460cf_0000000000000079_ps.txt new file mode 100644 index 00000000..989d18c3 --- /dev/null +++ b/src/ShantaeHGH/Graphics/294904d1771460cf_0000000000000079_ps.txt @@ -0,0 +1,141 @@ +#version 460 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#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 = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[1]; +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform vec2 uf_fragCoordScale; +#endif + + + + + + + +// shader 294904d1771460cf +//vertical blur +const float resScale = (float($width)/float($gameWidth)); + +TEXTURE_LAYOUT(0, 1, 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; +// 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() +{ +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); +} diff --git a/src/ShantaeHGH/Graphics/8fdd009324e987ee_0000000000000079_ps.txt b/src/ShantaeHGH/Graphics/8fdd009324e987ee_0000000000000079_ps.txt new file mode 100644 index 00000000..dd50b282 --- /dev/null +++ b/src/ShantaeHGH/Graphics/8fdd009324e987ee_0000000000000079_ps.txt @@ -0,0 +1,141 @@ +#version 460 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#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 = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[1]; +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform vec2 uf_fragCoordScale; +#endif + + + + + +// shader 8fdd009324e987ee +//horizontal blur +const float resScale = (float($width)/float($gameWidth)); + +TEXTURE_LAYOUT(0, 1, 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; +// 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() +{ +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); +} diff --git a/src/ShantaeHGH/Graphics/rules.txt b/src/ShantaeHGH/Graphics/rules.txt new file mode 100644 index 00000000..e733bdc3 --- /dev/null +++ b/src/ShantaeHGH/Graphics/rules.txt @@ -0,0 +1,216 @@ +[Definition] +titleIds = 00050000101DB200, 0005000010203200 +name = Graphics Settings +path = "Shantae: Half-Genie Hero/Graphics" +description = Changes the game's resolution.|Setting Gamepad resolution higher than TV resolution will cause a glitch. +#Credits: getdls, Intra +version = 7 + +[Default] +$width = 1920 +$height = 1080 +$padWidth = 854 +$padHeight = 480 +$gameWidth = 1920 +$gameHeight = 1080 +$gamepadWidth = 854 +$gamepadHeight = 480 + + +# TV Resolution + +[Preset] +category = TV Resolution: +name = 320x180 +$width = 320 +$height = 180 + +[Preset] +category = TV Resolution: +name = 640x360 +$width = 640 +$height = 360 + +[Preset] +category = TV Resolution: +name = 854x480 +$width = 854 +$height = 480 + +[Preset] +category = TV Resolution: +name = 960x540 +$width = 960 +$height = 540 + +[Preset] +category = TV Resolution: +name = 1280x720 +$width = 1280 +$height = 720 + +[Preset] +category = TV Resolution: +name = 1600x900 +$width = 1600 +$height = 900 + +[Preset] +category = TV Resolution: +name = 1920x1080 (Default) +default = 1 + +[Preset] +category = TV Resolution: +name = 2560x1440 +$width = 2560 +$height = 1440 + +[Preset] +category = TV Resolution: +name = 3200x1800 +$width = 3200 +$height = 1800 + +[Preset] +category = TV Resolution: +name = 3840x2160 +$width = 3840 +$height = 2160 + +[Preset] +category = TV Resolution: +name = 5120x2880 +$width = 5120 +$height = 2880 + +[Preset] +category = TV Resolution: +name = 7680x4320 +$width = 7680 +$height = 4320 + + +# Gamepad Resolution + +[Preset] +category = Gamepad Resolution: +name = 320x180 +$padWidth = 320 +$padHeight = 180 + +[Preset] +category = Gamepad Resolution: +name = 640x360 +$padWidth = 640 +$padHeight = 360 + +[Preset] +category = Gamepad Resolution: +name = 854x480 (Default) +default = 1 + +[Preset] +category = Gamepad Resolution: +name = 960x540 +$padWidth = 960 +$padHeight = 540 + +[Preset] +category = Gamepad Resolution: +name = 1280x720 +$padWidth = 1280 +$padHeight = 720 + +[Preset] +category = Gamepad Resolution: +name = 1600x900 +$padWidth = 1600 +$padHeight = 900 + +[Preset] +category = Gamepad Resolution: +name = 1920x1080 +$padWidth = 1920 +$padHeight = 1080 + +[Preset] +category = Gamepad Resolution: +name = 2560x1440 +$padWidth = 2560 +$padHeight = 1440 + +[Preset] +category = Gamepad Resolution: +name = 3200x1800 +$padWidth = 3200 +$padHeight = 1800 + +[Preset] +category = Gamepad Resolution: +name = 3840x2160 +$padWidth = 3840 +$padHeight = 2160 + +[Preset] +category = Gamepad Resolution: +name = 5120x2880 +$padWidth = 5120 +$padHeight = 2880 + +[Preset] +category = Gamepad Resolution: +name = 7680x4320 +$padWidth = 7680 +$padHeight = 4320 + + + +# Texture Redefines + +# TV Resolution + +[TextureRedefine] +width = 1920 +height = 1080 +#formats = 0x1a +overwriteWidth = ($width/$gameWidth) * 1920 +overwriteHeight = ($height/$gameHeight) * 1080 + +[TextureRedefine] +width = 1920 +height = 1088 +#formats = 0x1a +overwriteWidth = ($width/$gameWidth) * 1920 +overwriteHeight = ($height/$gameHeight) * 1088 + +[TextureRedefine] #q-res +width = 480 +height = 270 +overwriteWidth = ($width/$gameWidth) * 480 +overwriteHeight = ($height/$gameHeight) * 270 + +[TextureRedefine] #q-res +width = 480 +height = 272 +overwriteWidth = ($width/$gameWidth) * 480 +overwriteHeight = ($height/$gameHeight) * 272 + +# Gamepad Resolution + +[TextureRedefine] +width = 864 +height = 480 +#formats = 0x1a +overwriteWidth = ($padWidth / $gamepadWidth) * 864 +overwriteHeight = ($padHeight / $gamepadHeight) * 480 + +[TextureRedefine] +width = 854 +height = 480 +#formats = 0x1a +overwriteWidth = ($padWidth / $gamepadWidth) * 854 +overwriteHeight = ($padHeight / $gamepadHeight) * 480 + +#version 2: +#https://github.com/cemu-project/cemu_graphic_packs/blob/939a478799c13c5ed03e8decbf952f2a7ad02366/Source/ShantaeHGH/rules.txt