From b969a61b7b13b9316c64051176ad56ee3f5185d5 Mon Sep 17 00:00:00 2001
From: Michael <goldtextwitch@outlook.com>
Date: Sun, 8 Apr 2018 02:33:29 -0700
Subject: [PATCH] Move shadow packs to main pack (#210)

* Move shadow packs to main pack

As talked about in #143

* remove splatoon shader edit

Same shader is also in the main pack... confusing

* Add end-screen fix for shadow scaling

Also added a label. Could mean that there's a need to scale a different shader like
https://github.com/slashiee/cemu_graphic_packs/issues/149#issuecomment-379528843 suggests, although I'm not sure anymore.
---
 .../BreathOfTheWild_!HighShadows/rules.txt    |  18 --
 .../CaptainToad_HighResShadows/rules.txt      |  12 -
 .../HyruleWarriors_HighResShadows/rules.txt   |  11 -
 .../MarioKart8_HighResShadows/rules.txt       |  12 -
 Enhancement/NSMBU_HighResShadows/rules.txt    |  11 -
 .../NintendoLand_HighResShadows/rules.txt     |  18 --
 Enhancement/Pokken_HighResShadows/rules.txt   |  11 -
 .../b4196905d6fff2bb_0000000000001e69_ps.txt  | 229 ------------------
 Enhancement/Splatoon_HighResShadows/rules.txt |  18 --
 .../rules.txt                                 |  12 -
 .../SuperSmashBros_HighResShadows/rules.txt   |  18 --
 .../rules.txt                                 |  11 -
 .../WindWakerHD_HighResShadows/rules.txt      |  12 -
 .../XenobladeX_HighResShadows/rules.txt       |  19 --
 Source/CaptainToad/rules.txt                  |   7 +
 Source/HyruleWarriors/rules.txt               |   7 +
 Source/MarioKart8/rules.txt                   |   9 +-
 Source/NintendoLand/rules.txt                 |  14 ++
 Source/PokkenTournament/rules.txt             |   7 +
 .../b4196905d6fff2bb_0000000000001e69_ps.txt  |   5 +-
 Source/SuperMario3DWorld/rules.txt            |   7 +
 Source/SuperSmashBros/rules.txt               |  14 ++
 Source/TwilightPrincessHD/rules.txt           |   7 +
 23 files changed, 75 insertions(+), 414 deletions(-)
 delete mode 100644 Enhancement/BreathOfTheWild_!HighShadows/rules.txt
 delete mode 100644 Enhancement/CaptainToad_HighResShadows/rules.txt
 delete mode 100644 Enhancement/HyruleWarriors_HighResShadows/rules.txt
 delete mode 100644 Enhancement/MarioKart8_HighResShadows/rules.txt
 delete mode 100644 Enhancement/NSMBU_HighResShadows/rules.txt
 delete mode 100644 Enhancement/NintendoLand_HighResShadows/rules.txt
 delete mode 100644 Enhancement/Pokken_HighResShadows/rules.txt
 delete mode 100644 Enhancement/Splatoon_HighResShadows/b4196905d6fff2bb_0000000000001e69_ps.txt
 delete mode 100644 Enhancement/Splatoon_HighResShadows/rules.txt
 delete mode 100644 Enhancement/SuperMario3DWorld_HighResShadows/rules.txt
 delete mode 100644 Enhancement/SuperSmashBros_HighResShadows/rules.txt
 delete mode 100644 Enhancement/TwilightPrincessHD_HighResShadows/rules.txt
 delete mode 100644 Enhancement/WindWakerHD_HighResShadows/rules.txt
 delete mode 100644 Enhancement/XenobladeX_HighResShadows/rules.txt

diff --git a/Enhancement/BreathOfTheWild_!HighShadows/rules.txt b/Enhancement/BreathOfTheWild_!HighShadows/rules.txt
deleted file mode 100644
index 134aa8e0..00000000
--- a/Enhancement/BreathOfTheWild_!HighShadows/rules.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-[Definition]
-titleIds = 00050000101C9300,00050000101C9400,00050000101C9500
-name = "The Legend of Zelda: Breath of the Wild - High Resolution Shadows"
-version = 2
-
-[TextureRedefine]
-width = 360
-height = 360
-formats = 0x005
-overwriteWidth = 5760 #x16
-overwriteHeight = 5760 #x16
-
-[TextureRedefine]
-width = 720
-height = 720
-formats = 0x005
-overwriteWidth = 11520 #x16
-overwriteHeight = 11520 #x16
\ No newline at end of file
diff --git a/Enhancement/CaptainToad_HighResShadows/rules.txt b/Enhancement/CaptainToad_HighResShadows/rules.txt
deleted file mode 100644
index 62972b1b..00000000
--- a/Enhancement/CaptainToad_HighResShadows/rules.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Found by Dario FF
-[Definition]
-titleIds = 0005000010180600,0005000010180700,0005000010180500
-name = "Captain Toad: Treasure Tracker - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 1024
-height = 1024
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 2048
\ No newline at end of file
diff --git a/Enhancement/HyruleWarriors_HighResShadows/rules.txt b/Enhancement/HyruleWarriors_HighResShadows/rules.txt
deleted file mode 100644
index bee43b29..00000000
--- a/Enhancement/HyruleWarriors_HighResShadows/rules.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-[Definition]
-titleIds = 000500001017D800,000500001017D900,000500001017CD00
-name = "Hyrule Warriors - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 1024
-height = 2048
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 4096
diff --git a/Enhancement/MarioKart8_HighResShadows/rules.txt b/Enhancement/MarioKart8_HighResShadows/rules.txt
deleted file mode 100644
index 7fbc098d..00000000
--- a/Enhancement/MarioKart8_HighResShadows/rules.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Found by StripTheSoul
-[Definition]
-titleIds = 000500001010ec00,000500001010ed00,000500001010eb00
-name = "Mario Kart 8 - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 1024
-height = 1024
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 2048
diff --git a/Enhancement/NSMBU_HighResShadows/rules.txt b/Enhancement/NSMBU_HighResShadows/rules.txt
deleted file mode 100644
index 5605c318..00000000
--- a/Enhancement/NSMBU_HighResShadows/rules.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-[Definition]
-titleIds = 0005000010101D00,0005000010101E00,000500001014B700,000500001014B800,0005000010101C00,0005000010142300,0005000010142400,0005000010142200
-name = "New Super Mario Bros. U + New Super Luigi U - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 1024	
-height = 1024	
-formats = 0x005 #0x034 static shadow texture, don't scale
-overwriteWidth = 2048	
-overwriteHeight = 2048	
\ No newline at end of file
diff --git a/Enhancement/NintendoLand_HighResShadows/rules.txt b/Enhancement/NintendoLand_HighResShadows/rules.txt
deleted file mode 100644
index 6924de6f..00000000
--- a/Enhancement/NintendoLand_HighResShadows/rules.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-[Definition]
-titleIds = 0005000010101F00,0005000010102000,0005000010102100
-name = "Nintendo Land - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 856
-height = 856
-formats = 0x005
-overwriteWidth = 1712
-overwriteHeight = 1712
-
-[TextureRedefine]
-width = 2048
-height = 2048
-formats = 0x005
-overwriteWidth = 4096
-overwriteHeight = 4096
\ No newline at end of file
diff --git a/Enhancement/Pokken_HighResShadows/rules.txt b/Enhancement/Pokken_HighResShadows/rules.txt
deleted file mode 100644
index 82e4b2c7..00000000
--- a/Enhancement/Pokken_HighResShadows/rules.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-[Definition]
-titleIds = 00050000101DF400,00050002101DF401,00050000101DF500
-name = "Pokken Tournament - High Res Shadows"
-version = 2
-
-[TextureRedefine]
-width = 512
-height = 512
-formats = 0x005
-overwriteWidth = 1024
-overwriteHeight = 1024
diff --git a/Enhancement/Splatoon_HighResShadows/b4196905d6fff2bb_0000000000001e69_ps.txt b/Enhancement/Splatoon_HighResShadows/b4196905d6fff2bb_0000000000001e69_ps.txt
deleted file mode 100644
index 79c6bfc4..00000000
--- a/Enhancement/Splatoon_HighResShadows/b4196905d6fff2bb_0000000000001e69_ps.txt
+++ /dev/null
@@ -1,229 +0,0 @@
-#version 420
-#extension GL_ARB_texture_gather : enable
-#extension GL_ARB_separate_shader_objects : enable
-// shader b4196905d6fff2bb
-// Used for: Hack to fix an issue with shadows on the (campaign) end screen (Github link: https://github.com/slashiee/cemu_graphic_packs/issues/149)
-
-uniform ivec4 uf_remappedPS[12];
-layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
-layout(binding = 1) uniform sampler2DArrayShadow textureUnitPS1;// Tex1 addr 0xf494a800 res 2048x2048x1 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 6 6 6 border: 2
-layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x177b5000 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
-layout(location = 0) noperspective in vec4 passParameterSem0;
-layout(location = 1) noperspective in vec4 passParameterSem4;
-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){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 R124f = vec4(0.0);
-vec4 R125f = 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 = passParameterSem0;
-R1f = passParameterSem4;
-R0f.w = (texture(textureUnitPS0, R1f.xy).x);
-// 0
-R125f.x = 1.0;
-PV0f.y = 0.0; // = fix
-PV0f.y /= 2.0;
-PV0f.z = intBitsToFloat(uf_remappedPS[0].z);
-PV0f.z /= 2.0;
-R123f.w = (mul_nonIEEE(-(R0f.w),intBitsToFloat(uf_remappedPS[1].y)) + 1.0);
-PV0f.w = R123f.w;
-R127f.x = -(intBitsToFloat(uf_remappedPS[0].z));
-R127f.x /= 2.0;
-PS0f = R127f.x;
-// 1
-R126f.x = 0.0;
-R127f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].x), PV0f.y);
-R126f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].x), PV0f.z);
-PV1f.w = -(intBitsToFloat(uf_remappedPS[0].w));
-PV1f.w /= 2.0;
-PS1f = 1.0 / PV0f.w;
-// 2
-backupReg0f = R127f.x;
-R127f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].x), backupReg0f);
-PV0f.y = -(intBitsToFloat(uf_remappedPS[1].x)) * PS1f;
-R1f.z = roundEven(0.0);
-PV0f.z = R1f.z;
-R126f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].x), PV1f.w);
-// 3
-R5f.x = mul_nonIEEE(R0f.x, PV0f.y);
-PV1f.x = R5f.x;
-R5f.y = mul_nonIEEE(R0f.y, PV0f.y);
-PV1f.y = R5f.y;
-R124f.z = PV0f.y;
-PV1f.z = R124f.z;
-R125f.w = -(PV0f.y) + -(intBitsToFloat(uf_remappedPS[2].x));
-R2f.z = PV0f.z;
-PS1f = R2f.z;
-// 4
-tempf.x = dot(vec4(PV1f.x,PV1f.y,PV1f.z,R125f.x),vec4(intBitsToFloat(uf_remappedPS[3].x),intBitsToFloat(uf_remappedPS[3].y),intBitsToFloat(uf_remappedPS[3].z),intBitsToFloat(uf_remappedPS[3].w)));
-PV0f.x = tempf.x;
-PV0f.y = tempf.x;
-PV0f.z = tempf.x;
-PV0f.w = tempf.x;
-R3f.z = R1f.z;
-PS0f = R3f.z;
-// 5
-tempf.x = dot(vec4(R5f.x,R5f.y,R124f.z,R125f.x),vec4(intBitsToFloat(uf_remappedPS[4].x),intBitsToFloat(uf_remappedPS[4].y),intBitsToFloat(uf_remappedPS[4].z),intBitsToFloat(uf_remappedPS[4].w)));
-PV1f.x = tempf.x;
-PV1f.y = tempf.x;
-PV1f.z = tempf.x;
-PV1f.w = tempf.x;
-R125f.z = 1.0 / PV0f.x;
-PS1f = R125f.z;
-// 6
-tempf.x = dot(vec4(R5f.x,R5f.y,R124f.z,R125f.x),vec4(intBitsToFloat(uf_remappedPS[5].x),intBitsToFloat(uf_remappedPS[5].y),intBitsToFloat(uf_remappedPS[5].z),intBitsToFloat(uf_remappedPS[5].w)));
-PV0f.x = tempf.x;
-PV0f.y = tempf.x;
-PV0f.z = tempf.x;
-PV0f.w = tempf.x;
-R127f.z = 1.0 / PV1f.x;
-PS0f = R127f.z;
-// 7
-tempf.x = dot(vec4(R5f.x,R5f.y,R124f.z,R125f.x),vec4(intBitsToFloat(uf_remappedPS[6].x),intBitsToFloat(uf_remappedPS[6].y),intBitsToFloat(uf_remappedPS[6].z),intBitsToFloat(uf_remappedPS[6].w)));
-PV1f.x = tempf.x;
-PV1f.y = tempf.x;
-PV1f.z = tempf.x;
-PV1f.w = tempf.x;
-R127f.w = PV0f.x * R125f.z;
-PS1f = R127f.w;
-// 8
-tempf.x = dot(vec4(R5f.x,R5f.y,R124f.z,R125f.x),vec4(intBitsToFloat(uf_remappedPS[7].x),intBitsToFloat(uf_remappedPS[7].y),intBitsToFloat(uf_remappedPS[7].z),intBitsToFloat(uf_remappedPS[7].w)));
-PV0f.x = tempf.x;
-PV0f.y = tempf.x;
-PV0f.z = tempf.x;
-PV0f.w = tempf.x;
-R0f.x = mul_nonIEEE(PV1f.x, R127f.z);
-PS0f = R0f.x;
-// 9
-backupReg0f = R127f.x;
-R127f.x = mul_nonIEEE(R127f.w, R127f.y);
-PV1f.x = R127f.x;
-R0f.y = mul_nonIEEE(PV0f.x, R127f.z);
-R127f.z = R127f.w + R126f.x;
-R124f.w = mul_nonIEEE(R127f.w, R126f.z);
-R126f.x = mul_nonIEEE(R127f.w, backupReg0f);
-PS1f = R126f.x;
-// 10
-tempf.x = dot(vec4(R5f.x,R5f.y,R124f.z,R125f.x),vec4(intBitsToFloat(uf_remappedPS[8].x),intBitsToFloat(uf_remappedPS[8].y),intBitsToFloat(uf_remappedPS[8].z),intBitsToFloat(uf_remappedPS[8].w)));
-PV0f.x = tempf.x;
-PV0f.y = tempf.x;
-PV0f.z = tempf.x;
-PV0f.w = tempf.x;
-R126f.z = PV1f.x;
-PS0f = R126f.z;
-// 11
-tempf.x = dot(vec4(R5f.x,R5f.y,R124f.z,R125f.x),vec4(intBitsToFloat(uf_remappedPS[9].x),intBitsToFloat(uf_remappedPS[9].y),intBitsToFloat(uf_remappedPS[9].z),intBitsToFloat(uf_remappedPS[9].w)));
-PV1f.x = tempf.x;
-PV1f.y = tempf.x;
-PV1f.z = tempf.x;
-PV1f.w = tempf.x;
-R127f.y = PV0f.x * R125f.z;
-PS1f = R127f.y;
-// 12
-R124f.x = PV1f.x * R125f.z;
-PV0f.x = R124f.x;
-R126f.y = mul_nonIEEE(R127f.w, R126f.w);
-R4f.z = R1f.z;
-R127f.w = R127f.z;
-R127f.w = clamp(R127f.w, 0.0, 1.0);
-PV0f.w = R127f.w;
-R1f.x = PS1f + R124f.w;
-PS0f = R1f.x;
-// 13
-R2f.x = R127f.y + R126f.x;
-R1f.y = PV0f.x + R126f.z;
-R5f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z), R125f.w);
-R5f.z = clamp(R5f.z, 0.0, 1.0);
-R1f.w = PV0f.w;
-R2f.y = PV0f.x + R127f.x;
-PS1f = R2f.y;
-// 14
-R3f.x = R127f.y + R124f.w;
-R3f.y = R124f.x + R126f.y;
-PV0f.z = mul_nonIEEE(R125f.x, intBitsToFloat(uf_remappedPS[10].w));
-R2f.w = R127f.w;
-R3f.w = R127f.w;
-PS0f = R3f.w;
-// 15
-R4f.x = R127f.y + R126f.x;
-R4f.y = R124f.x + R126f.y;
-R0f.z = (mul_nonIEEE(R124f.z,intBitsToFloat(uf_remappedPS[10].z)) + PV0f.z);
-R4f.w = R127f.w;
-R6f.x = intBitsToFloat(uf_remappedPS[11].x);
-PS1f = R6f.x;
-R0f.xy = (texture(textureUnitPS2, R0f.xy).xy);
-R1f.z = (texture(textureUnitPS1, vec4(R1f.x,R1f.y,R1f.z,R1f.w)));
-R2f.y = (texture(textureUnitPS1, vec4(R2f.x,R2f.y,R2f.z,R2f.w)));
-R3f.x = (texture(textureUnitPS1, vec4(R3f.x,R3f.y,R3f.z,R3f.w)));
-R4f.w = (texture(textureUnitPS1, vec4(R4f.x,R4f.y,R4f.z,R4f.w)));
-// 0
-backupReg0f = R0f.z;
-backupReg1f = R0f.x;
-backupReg1f = R0f.x;
-backupReg2f = R0f.y;
-tempf.x = dot(vec4(R5f.x,R5f.y,backupReg0f,0.0),vec4(intBitsToFloat(uf_remappedPS[10].x),intBitsToFloat(uf_remappedPS[10].y),1.0,0.0));
-PV0f.x = tempf.x;
-PV0f.y = tempf.x;
-PV0f.z = tempf.x;
-PV0f.w = tempf.x;
-R127f.w = (mul_nonIEEE(-(backupReg1f),backupReg1f) + backupReg2f);
-PS0f = R127f.w;
-// 1
-PV1f.z = R1f.z + R2f.y;
-PV1f.z /= 2.0;
-PV1f.w = min(PV0f.x, 1.0);
-R6f.w = intBitsToFloat(uf_remappedPS[11].w);
-PS1f = R6f.w;
-// 2
-R123f.y = (R3f.x * 0.5 + PV1f.z);
-PV0f.y = R123f.y;
-PV0f.z = PV1f.w + -(R0f.x);
-// 3
-R123f.x = (R4f.w * 0.5 + PV0f.y)/2.0;
-PV1f.x = R123f.x;
-R123f.y = (mul_nonIEEE(PV0f.z,PV0f.z) + R127f.w);
-PV1f.y = R123f.y;
-R124f.z = (0.0 >= PV0f.z)?1.0:0.0;
-// 4
-R6f.y = R5f.z + PV1f.x;
-PS0f = 1.0 / PV1f.y;
-// 5
-PV1f.w = R127f.w * PS0f;
-// 6
-PV0f.y = max(PV1f.w, R124f.z);
-// 7
-PV1f.x = min(PV0f.y, 1.0);
-// 8
-R6f.z = R5f.z + PV1f.x;
-// export
-passPixelColor0 = vec4(R6f.x, R6f.y, R6f.z, R6f.w);
-}
diff --git a/Enhancement/Splatoon_HighResShadows/rules.txt b/Enhancement/Splatoon_HighResShadows/rules.txt
deleted file mode 100644
index b049e77f..00000000
--- a/Enhancement/Splatoon_HighResShadows/rules.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-[Definition]
-titleIds = 0005000010176900,0005000010176A00,0005000010162B00
-name = "Splatoon - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 1024
-height = 1024
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 2048
-
-[TextureRedefine]
-width = 2048
-height = 2048
-formats = 0x005
-overwriteWidth = 4096
-overwriteHeight = 4096
diff --git a/Enhancement/SuperMario3DWorld_HighResShadows/rules.txt b/Enhancement/SuperMario3DWorld_HighResShadows/rules.txt
deleted file mode 100644
index d4a0a6db..00000000
--- a/Enhancement/SuperMario3DWorld_HighResShadows/rules.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Found by Dario FF
-[Definition]
-titleIds = 0005000010145D00,0005000010145C00,0005000010106100
-name = "Super Mario 3D World - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 1024
-height = 1024
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 2048
\ No newline at end of file
diff --git a/Enhancement/SuperSmashBros_HighResShadows/rules.txt b/Enhancement/SuperSmashBros_HighResShadows/rules.txt
deleted file mode 100644
index bef9ba84..00000000
--- a/Enhancement/SuperSmashBros_HighResShadows/rules.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-[Definition]
-titleIds = 0005000010110E00,0005000010145000,0005000010144F00
-name = "Super Smash Bros. for Wii U - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 512
-height = 512
-formats = 0x00f,0x00b
-overwriteWidth = 1024
-overwriteHeight = 1024
-
-[TextureRedefine]
-width = 1024
-height = 1024
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 2048
diff --git a/Enhancement/TwilightPrincessHD_HighResShadows/rules.txt b/Enhancement/TwilightPrincessHD_HighResShadows/rules.txt
deleted file mode 100644
index edfb99e4..00000000
--- a/Enhancement/TwilightPrincessHD_HighResShadows/rules.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Found by Esppiral
-[Definition]
-titleIds = 000500001019C800,000500001019E600,000500001019E500,0005000E1019C800
-name = "The Legend of Zelda: Twilight Princess HD - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 384
-height = 384
-overwriteWidth = 768
-overwriteHeight = 768
\ No newline at end of file
diff --git a/Enhancement/WindWakerHD_HighResShadows/rules.txt b/Enhancement/WindWakerHD_HighResShadows/rules.txt
deleted file mode 100644
index fcecd1d7..00000000
--- a/Enhancement/WindWakerHD_HighResShadows/rules.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Found by jediyoshi, Shadow format found by SunBroDave
-[Definition]
-titleIds = 0005000010143400,0005000010143600,0005000010143500
-name = "The Legend of Zelda: The Wind Waker HD - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine]
-width = 1024
-height = 1024
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 2048
\ No newline at end of file
diff --git a/Enhancement/XenobladeX_HighResShadows/rules.txt b/Enhancement/XenobladeX_HighResShadows/rules.txt
deleted file mode 100644
index 5a5a4003..00000000
--- a/Enhancement/XenobladeX_HighResShadows/rules.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-# Found by sunbroDave
-[Definition]
-titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00
-name = "Xenoblade Chronicles X - Higher Quality Shadows"
-version = 2
-
-[TextureRedefine] #XCX shadow
-width = 1024
-height = 1024
-formats = 0x005
-overwriteWidth = 2048
-overwriteHeight = 2048
-	
-[TextureRedefine] #XCX Medium distance shadow	
-width = 512
-height = 512
-formats = 0x005	
-overwriteWidth = 1024
-overwriteHeight = 1024
diff --git a/Source/CaptainToad/rules.txt b/Source/CaptainToad/rules.txt
index ec74948a..70e5ea98 100644
--- a/Source/CaptainToad/rules.txt
+++ b/Source/CaptainToad/rules.txt
@@ -106,3 +106,10 @@ height = 120
 formatsExcluded = 0x41A # exclude obvious textures
 overwriteWidth = <?=round($scaleFactorX*320)?> 
 overwriteHeight = <?=round($scaleFactorY*180)?> 
+
+[TextureRedefine] # shadows
+width = 1024
+height = 1024
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*1024)?> 
+overwriteHeight = <?=round($scaleFactorY*1024)?> 
diff --git a/Source/HyruleWarriors/rules.txt b/Source/HyruleWarriors/rules.txt
index ab69218f..4743a137 100644
--- a/Source/HyruleWarriors/rules.txt
+++ b/Source/HyruleWarriors/rules.txt
@@ -98,3 +98,10 @@ height = 1
 formats = 0x005
 #overwriteWidth = <?=round($scaleFactorX*1)?> 
 #overwriteHeight = <?=round($scaleFactorY*1)?> 
+
+[TextureRedefine] # shadows
+width = 1024
+height = 2048
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*1024)?> 
+overwriteHeight = <?=round($scaleFactorY*2048)?> 
diff --git a/Source/MarioKart8/rules.txt b/Source/MarioKart8/rules.txt
index 0b7a4e86..8857ced9 100644
--- a/Source/MarioKart8/rules.txt
+++ b/Source/MarioKart8/rules.txt
@@ -314,4 +314,11 @@ width = 240
 height = 134
 formatsExcluded = 0x41A # exclude obvious textures
 overwriteWidth = <?=round($scaleFactorX*240)?> 
-overwriteHeight = <?=round($scaleFactorY*134)?> 
\ No newline at end of file
+overwriteHeight = <?=round($scaleFactorY*134)?> 
+
+[TextureRedefine] #shadows
+width = 1024
+height = 1024
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*1024)?> 
+overwriteHeight = <?=round($scaleFactorY*1024)?> 
diff --git a/Source/NintendoLand/rules.txt b/Source/NintendoLand/rules.txt
index a6f240bd..8ef71f4a 100644
--- a/Source/NintendoLand/rules.txt
+++ b/Source/NintendoLand/rules.txt
@@ -43,3 +43,17 @@ height = 240
 formatsExcluded = 0x41A,0x431 # exclude obvious textures
 overwriteWidth = <?=round($scaleFactorX*640)?> 
 overwriteHeight = <?=round($scaleFactorY*360)?> 
+
+[TextureRedefine] #shadows
+width = 856
+height = 856
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*856)?> 
+overwriteHeight = <?=round($scaleFactorY*856)?> 
+
+[TextureRedefine] #shadows
+width = 2048
+height = 2048
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*2048)?> 
+overwriteHeight = <?=round($scaleFactorY*2048)?> 
diff --git a/Source/PokkenTournament/rules.txt b/Source/PokkenTournament/rules.txt
index c0474206..41feefc5 100644
--- a/Source/PokkenTournament/rules.txt
+++ b/Source/PokkenTournament/rules.txt
@@ -57,3 +57,10 @@ width = 854
 height = 480
 overwriteWidth = <?=round($scaleFactorX*1280)?> 
 overwriteHeight = <?=round($scaleFactorY*720)?> 
+
+[TextureRedefine] #shadows
+width = 512
+height = 512
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*512)?> 
+overwriteHeight = <?=round($scaleFactorY*512)?> 
diff --git a/Source/Splatoon/b4196905d6fff2bb_0000000000001e69_ps.txt b/Source/Splatoon/b4196905d6fff2bb_0000000000001e69_ps.txt
index e6cac0c8..61b59e99 100644
--- a/Source/Splatoon/b4196905d6fff2bb_0000000000001e69_ps.txt
+++ b/Source/Splatoon/b4196905d6fff2bb_0000000000001e69_ps.txt
@@ -9,7 +9,10 @@ $scaleFactorY = always_decimal_format($fullHeight / 720.0);
 #extension GL_ARB_texture_gather : enable
 #extension GL_ARB_separate_shader_objects : enable
 // shader b4196905d6fff2bb
+// Used for: Fixing high-res shadows on models at end-screen of campaign/matches
 const float resScale = <?=$scaleFactorX?>;
+
+
 uniform ivec4 uf_remappedPS[12];
 layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
 layout(binding = 1) uniform sampler2DArrayShadow textureUnitPS1;// Tex1 addr 0xf494a800 res 2048x2048x1 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 6 6 6 border: 2
@@ -56,7 +59,7 @@ R1f = passParameterSem4;
 R0f.w = (texture(textureUnitPS0, R1f.xy).x);
 // 0
 R125f.x = 1.0;
-PV0f.y = intBitsToFloat(uf_remappedPS[0].w);
+PV0f.y = 0.0; // = "fix"
 PV0f.y /= 2.0;
 PV0f.z = intBitsToFloat(uf_remappedPS[0].z);
 PV0f.z /= 2.0;
diff --git a/Source/SuperMario3DWorld/rules.txt b/Source/SuperMario3DWorld/rules.txt
index 97744411..4f210e82 100644
--- a/Source/SuperMario3DWorld/rules.txt
+++ b/Source/SuperMario3DWorld/rules.txt
@@ -112,3 +112,10 @@ height = 120
 formatsExcluded = 0x41A # exclude obvious textures
 overwriteWidth = <?=round($scaleFactorX*320)?> 
 overwriteHeight = <?=round($scaleFactorY*180)?> 
+
+[TextureRedefine] # shadows
+width = 1024
+height = 1024
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*1024)?> 
+overwriteHeight = <?=round($scaleFactorY*1024)?> 
diff --git a/Source/SuperSmashBros/rules.txt b/Source/SuperSmashBros/rules.txt
index 07b2ca32..56d4fe71 100644
--- a/Source/SuperSmashBros/rules.txt
+++ b/Source/SuperSmashBros/rules.txt
@@ -113,3 +113,17 @@ width = 854
 height = 480
 #overwriteWidth = <?=round($scaleFactorX*1920)?> 
 #overwriteHeight = <?=round($scaleFactorY*1080)?> 
+
+[TextureRedefine] # shadows
+width = 512
+height = 512
+formats = 0x00f,0x00b
+overwriteWidth = <?=round($scaleFactorY*512)?> 
+overwriteHeight = <?=round($scaleFactorY*512)?> 
+
+[TextureRedefine] # shadows
+width = 1024
+height = 1024
+formats = 0x005
+overwriteWidth = <?=round($scaleFactorY*1024)?> 
+overwriteHeight = <?=round($scaleFactorY*1024)?> 
diff --git a/Source/TwilightPrincessHD/rules.txt b/Source/TwilightPrincessHD/rules.txt
index 7853a90b..44bf2716 100644
--- a/Source/TwilightPrincessHD/rules.txt
+++ b/Source/TwilightPrincessHD/rules.txt
@@ -38,3 +38,10 @@ width = 854
 height = 480
 #overwriteWidth = <?=round($scaleFactorX*1920)?> 
 #overwriteHeight = <?=round($scaleFactorY*1080)?> 
+
+[TextureRedefine] # shadows
+width = 384
+height = 384
+#formats = 0x5 # find the format
+overwriteWidth = <?=round($scaleFactorY*384)?> 
+overwriteHeight = <?=round($scaleFactorY*384)?>