From 26872c132634447542250fd877eea3ab82934197 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Tue, 28 May 2019 23:21:19 +0200 Subject: [PATCH] [Skylanders Imaginators] Fix shadow edge smoothing Would produce really ugly shadow edges previously, but now it's all smoothed out. --- .../3fd22273e2306b43_0000000000000000_vs.txt | 18 ++++++++--------- .../bc5cb1edf2b7da65_0000000000000000_vs.txt | 20 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Resolutions/SkylandersImaginators_Resolution/3fd22273e2306b43_0000000000000000_vs.txt b/Resolutions/SkylandersImaginators_Resolution/3fd22273e2306b43_0000000000000000_vs.txt index 04a82f9a..3589d774 100644 --- a/Resolutions/SkylandersImaginators_Resolution/3fd22273e2306b43_0000000000000000_vs.txt +++ b/Resolutions/SkylandersImaginators_Resolution/3fd22273e2306b43_0000000000000000_vs.txt @@ -3,7 +3,7 @@ #extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_shading_language_packing : enable // shader 3fd22273e2306b43 -// Used for: Horizontal blur pass +// Used for: Horizontal shadow edge smoothing float resXScale = float($width)/float($gameWidth); uniform ivec4 uf_remappedVS[5]; @@ -98,20 +98,20 @@ R1f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedVS[3].w)) + PV0f.w); R0f.w = R2f.y + R127f.x; PS1f = R0f.w; // 4 -R127f.x = intBitsToFloat(uf_remappedVS[4].z) * -(1.0); -R127f.y = -(intBitsToFloat(uf_remappedVS[4].z)); +R127f.x = intBitsToFloat(uf_remappedVS[4].z)/resXScale * -(1.0); +R127f.y = -(intBitsToFloat(uf_remappedVS[4].z)/resXScale); R127f.y *= 2.0; -PV0f.z = -(intBitsToFloat(uf_remappedVS[4].z)); +PV0f.z = -(intBitsToFloat(uf_remappedVS[4].z)/resXScale); PV0f.z *= 4.0; -PV0f.w = intBitsToFloat(uf_remappedVS[4].z) * (intBitsToFloat(0xc0400000)/resXScale); -R126f.x = intBitsToFloat(uf_remappedVS[4].z) * 1.0; +PV0f.w = intBitsToFloat(uf_remappedVS[4].z)/resXScale * intBitsToFloat(0xc0400000); +R126f.x = intBitsToFloat(uf_remappedVS[4].z)/resXScale * 1.0; PS0f = R126f.x; // 5 -R125f.x = intBitsToFloat(uf_remappedVS[4].z) * (intBitsToFloat(0x40400000)/resXScale); +R125f.x = intBitsToFloat(uf_remappedVS[4].z)/resXScale * intBitsToFloat(0x40400000); R0f.y = R2f.x + PV0f.w; -R127f.z = intBitsToFloat(uf_remappedVS[4].z); +R127f.z = intBitsToFloat(uf_remappedVS[4].z)/resXScale; R127f.z *= 4.0; -R127f.w = intBitsToFloat(uf_remappedVS[4].z); +R127f.w = intBitsToFloat(uf_remappedVS[4].z)/resXScale; R127f.w *= 2.0; R0f.x = R2f.x + PV0f.z; PS1f = R0f.x; diff --git a/Resolutions/SkylandersImaginators_Resolution/bc5cb1edf2b7da65_0000000000000000_vs.txt b/Resolutions/SkylandersImaginators_Resolution/bc5cb1edf2b7da65_0000000000000000_vs.txt index a65d82b5..ea3b57b2 100644 --- a/Resolutions/SkylandersImaginators_Resolution/bc5cb1edf2b7da65_0000000000000000_vs.txt +++ b/Resolutions/SkylandersImaginators_Resolution/bc5cb1edf2b7da65_0000000000000000_vs.txt @@ -3,8 +3,8 @@ #extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_shading_language_packing : enable // shader bc5cb1edf2b7da65 -// Used for: Vertical blur pass -float resYScale = float($height)/float($gameHeight); +// Used for: Vertical shadow edge smoothing +float resYScale = float($height)/float($gameHeight); uniform ivec4 uf_remappedVS[5]; layout(location = 0) in uvec4 attrDataSem0; @@ -99,19 +99,19 @@ R1f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedVS[3].w)) + PV0f.y); R3f.z = R126f.x + R2f.y; PS1f = R3f.z; // 4 -R127f.x = intBitsToFloat(uf_remappedVS[4].w) * -(1.0); -R127f.y = intBitsToFloat(uf_remappedVS[4].w) * (intBitsToFloat(0xc0400000)/resYScale); -PV0f.z = -(intBitsToFloat(uf_remappedVS[4].w)); +R127f.x = intBitsToFloat(uf_remappedVS[4].w)/resYScale * -(1.0); +R127f.y = intBitsToFloat(uf_remappedVS[4].w)/resYScale * intBitsToFloat(0xc0400000); +PV0f.z = -(intBitsToFloat(uf_remappedVS[4].w)/resYScale); PV0f.z *= 2.0; -PV0f.w = -(intBitsToFloat(uf_remappedVS[4].w)); +PV0f.w = -(intBitsToFloat(uf_remappedVS[4].w)/resYScale); PV0f.w *= 4.0; -R127f.w = intBitsToFloat(uf_remappedVS[4].w) * 1.0; +R127f.w = intBitsToFloat(uf_remappedVS[4].w)/resYScale * 1.0; PS0f = R127f.w; // 5 -R125f.x = intBitsToFloat(uf_remappedVS[4].w) * (intBitsToFloat(0x40400000)/resYScale); -R126f.y = intBitsToFloat(uf_remappedVS[4].w); +R125f.x = intBitsToFloat(uf_remappedVS[4].w)/resYScale * intBitsToFloat(0x40400000); +R126f.y = intBitsToFloat(uf_remappedVS[4].w)/resYScale; R126f.y *= 4.0; -PV1f.z = intBitsToFloat(uf_remappedVS[4].w); +PV1f.z = intBitsToFloat(uf_remappedVS[4].w)/resYScale; PV1f.z *= 2.0; R0f.w = PV0f.z + R2f.y; R0f.y = PV0f.w + R2f.y;