From a90afc12d2e1d9d859a7561fb5590e73de422edd Mon Sep 17 00:00:00 2001 From: Michele Date: Wed, 1 Jan 2020 10:47:11 -0800 Subject: [PATCH] update SLW resolution pack to v4 --- .../2fc311c50a4dab95_0000000000000000_vs.txt | 41 +++++++++++++++---- .../384f98693cb9d036_0000000000000000_vs.txt | 41 +++++++++++++++---- .../384f98696d1a1236_0000000000000000_vs.txt | 41 +++++++++++++++---- .../3952c3a52c87ad30_0000000000000000_vs.txt | 26 +++++++++--- .../419dbf0c732a4fe2_0000000000000000_vs.txt | 41 +++++++++++++++---- .../419dbf0c732a51e2_0000000000000000_vs.txt | 41 +++++++++++++++---- .../419dbf0c732a91e2_0000000000000000_vs.txt | 41 +++++++++++++++---- .../419dbf0ca38a91e2_0000000000000000_vs.txt | 41 +++++++++++++++---- .../58cf1eb8946f4b3c_0000000000000079_ps.txt | 30 +++++++++++++- .../79183302695ea935_0000000000000079_ps.txt | 30 +++++++++++++- .../92e5b6dffd1d9b9b_0000000000000079_ps.txt | 30 +++++++++++++- .../a455fc196032912c_0000000000000079_ps.txt | 30 +++++++++++++- .../SonicLostWorld_Resolution/rules.txt | 2 +- 13 files changed, 365 insertions(+), 70 deletions(-) diff --git a/Resolutions/SonicLostWorld_Resolution/2fc311c50a4dab95_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/2fc311c50a4dab95_0000000000000000_vs.txt index 1ad34c41..cd2941fc 100644 --- a/Resolutions/SonicLostWorld_Resolution/2fc311c50a4dab95_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/2fc311c50a4dab95_0000000000000000_vs.txt @@ -1,18 +1,43 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 2fc311c50a4dab95 // text shader 1 float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[9]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem3; -layout(location = 2) in uvec4 attrDataSem4; -layout(location = 3) in uvec4 attrDataSem8; -layout(location = 4) in uvec4 attrDataSem9; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[9]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem9; out gl_PerVertex { vec4 gl_Position; @@ -147,7 +172,7 @@ R1f.y = mul_nonIEEE(intBitsToFloat(uf_remappedVS[8].z), backupReg0f); R1f.z = mul_nonIEEE(intBitsToFloat(uf_remappedVS[8].w), backupReg1f); R1f.w = mul_nonIEEE(intBitsToFloat(uf_remappedVS[8].x), backupReg2f); // export -gl_Position = vec4(R5f.x*(origRatio/newRatio), R5f.y, R5f.z, R5f.w); +SET_POSITION(vec4(R5f.x*(origRatio/newRatio), R5f.y, R5f.z, R5f.w)); // export passParameterSem131 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); // export diff --git a/Resolutions/SonicLostWorld_Resolution/384f98693cb9d036_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/384f98693cb9d036_0000000000000000_vs.txt index f10d08f7..e3881865 100644 --- a/Resolutions/SonicLostWorld_Resolution/384f98693cb9d036_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/384f98693cb9d036_0000000000000000_vs.txt @@ -1,18 +1,43 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 384f98693cb9d036 // ui shader 2 float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[4]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem3; -layout(location = 2) in uvec4 attrDataSem4; -layout(location = 3) in uvec4 attrDataSem8; -layout(location = 4) in uvec4 attrDataSem9; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[4]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem9; out gl_PerVertex { vec4 gl_Position; @@ -112,7 +137,7 @@ PS1f = R0f.w; R4f.z = R5f.x; R4f.w = R5f.y; // export -gl_Position = vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w); +SET_POSITION(vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w)); // export passParameterSem131 = vec4(R1f.w, R1f.x, R1f.y, R1f.z); // export diff --git a/Resolutions/SonicLostWorld_Resolution/384f98696d1a1236_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/384f98696d1a1236_0000000000000000_vs.txt index df0ee6c9..2da60842 100644 --- a/Resolutions/SonicLostWorld_Resolution/384f98696d1a1236_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/384f98696d1a1236_0000000000000000_vs.txt @@ -1,18 +1,43 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 384f98696d1a1236 // ui shader 1 float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[4]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem3; -layout(location = 2) in uvec4 attrDataSem4; -layout(location = 3) in uvec4 attrDataSem8; -layout(location = 4) in uvec4 attrDataSem9; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[4]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem9; out gl_PerVertex { vec4 gl_Position; @@ -113,7 +138,7 @@ PS1f = R0f.w; R4f.z = R5f.x; R4f.w = R5f.y; // export -gl_Position = vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w); +SET_POSITION(vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w)); // export passParameterSem131 = vec4(R1f.w, R1f.x, R1f.y, R1f.z); // export diff --git a/Resolutions/SonicLostWorld_Resolution/3952c3a52c87ad30_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/3952c3a52c87ad30_0000000000000000_vs.txt index 086756ca..61293dc7 100644 --- a/Resolutions/SonicLostWorld_Resolution/3952c3a52c87ad30_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/3952c3a52c87ad30_0000000000000000_vs.txt @@ -1,14 +1,30 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 3952c3a52c87ad30 // video shader float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem8; + +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem8; out gl_PerVertex { vec4 gl_Position; @@ -54,7 +70,7 @@ backupReg1f = R2f.y; R2f.x = backupReg0f; R2f.y = backupReg1f; // export -gl_Position = vec4(R1f.x*(origRatio/newRatio), R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x*(origRatio/newRatio), R1f.y, R1f.z, R1f.w)); // export passParameterSem136 = vec4(R2f.x, R2f.y, R2f.z, R2f.z); // 0 diff --git a/Resolutions/SonicLostWorld_Resolution/419dbf0c732a4fe2_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/419dbf0c732a4fe2_0000000000000000_vs.txt index cf9c694d..4fae98b1 100644 --- a/Resolutions/SonicLostWorld_Resolution/419dbf0c732a4fe2_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/419dbf0c732a4fe2_0000000000000000_vs.txt @@ -1,18 +1,43 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 419dbf0c732a4fe2 // ui shader 3 float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem3; -layout(location = 2) in uvec4 attrDataSem4; -layout(location = 3) in uvec4 attrDataSem8; -layout(location = 4) in uvec4 attrDataSem9; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem9; out gl_PerVertex { vec4 gl_Position; @@ -95,7 +120,7 @@ PV1f.w *= 2.0; R3f.x = PV1f.w + -(1.0); R3f.y = -(PV1f.x); // export -gl_Position = vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w); +SET_POSITION(vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w)); // export passParameterSem131 = vec4(R1f.w, R1f.x, R1f.y, R1f.z); // export diff --git a/Resolutions/SonicLostWorld_Resolution/419dbf0c732a51e2_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/419dbf0c732a51e2_0000000000000000_vs.txt index 1ea08c91..93fb8ed9 100644 --- a/Resolutions/SonicLostWorld_Resolution/419dbf0c732a51e2_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/419dbf0c732a51e2_0000000000000000_vs.txt @@ -1,18 +1,43 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 419dbf0c732a51e2 // text shader 3 float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem3; -layout(location = 2) in uvec4 attrDataSem4; -layout(location = 3) in uvec4 attrDataSem8; -layout(location = 4) in uvec4 attrDataSem9; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem9; out gl_PerVertex { vec4 gl_Position; @@ -95,7 +120,7 @@ PV1f.w *= 2.0; R3f.x = PV1f.w + -(1.0); R3f.y = -(PV1f.x); // export -gl_Position = vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w); +SET_POSITION(vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w)); // export passParameterSem131 = vec4(R1f.w, R1f.x, R1f.y, R1f.z); // export diff --git a/Resolutions/SonicLostWorld_Resolution/419dbf0c732a91e2_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/419dbf0c732a91e2_0000000000000000_vs.txt index 1cc4bc97..e255a769 100644 --- a/Resolutions/SonicLostWorld_Resolution/419dbf0c732a91e2_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/419dbf0c732a91e2_0000000000000000_vs.txt @@ -1,18 +1,43 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 419dbf0c732a91e2 // text shader 2 float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem3; -layout(location = 2) in uvec4 attrDataSem4; -layout(location = 3) in uvec4 attrDataSem8; -layout(location = 4) in uvec4 attrDataSem9; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem9; out gl_PerVertex { vec4 gl_Position; @@ -95,7 +120,7 @@ PV1f.w *= 2.0; R3f.x = PV1f.w + -(1.0); R3f.y = -(PV1f.x); // export -gl_Position = vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w); +SET_POSITION(vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w)); // export // skipped export to semanticId 255 // export diff --git a/Resolutions/SonicLostWorld_Resolution/419dbf0ca38a91e2_0000000000000000_vs.txt b/Resolutions/SonicLostWorld_Resolution/419dbf0ca38a91e2_0000000000000000_vs.txt index 8694a490..181ca813 100644 --- a/Resolutions/SonicLostWorld_Resolution/419dbf0ca38a91e2_0000000000000000_vs.txt +++ b/Resolutions/SonicLostWorld_Resolution/419dbf0ca38a91e2_0000000000000000_vs.txt @@ -1,18 +1,43 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 419dbf0ca38a91e2 // ui shader 4 float origRatio = (float(1280)/float(720)); float newRatio = (float($width)/float($height)); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem3; -layout(location = 2) in uvec4 attrDataSem4; -layout(location = 3) in uvec4 attrDataSem8; -layout(location = 4) in uvec4 attrDataSem9; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem9; out gl_PerVertex { vec4 gl_Position; @@ -96,7 +121,7 @@ PV1f.w *= 2.0; R3f.x = PV1f.w + -(1.0); R3f.y = -(PV1f.x); // export -gl_Position = vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w); +SET_POSITION(vec4(R3f.x*(origRatio/newRatio), R3f.y, R3f.z, R3f.w)); // export passParameterSem131 = vec4(R1f.w, R1f.x, R1f.y, R1f.z); // export diff --git a/Resolutions/SonicLostWorld_Resolution/58cf1eb8946f4b3c_0000000000000079_ps.txt b/Resolutions/SonicLostWorld_Resolution/58cf1eb8946f4b3c_0000000000000079_ps.txt index 0495805f..c009c8e3 100644 --- a/Resolutions/SonicLostWorld_Resolution/58cf1eb8946f4b3c_0000000000000079_ps.txt +++ b/Resolutions/SonicLostWorld_Resolution/58cf1eb8946f4b3c_0000000000000079_ps.txt @@ -1,14 +1,40 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 58cf1eb8946f4b3c const float resXScale = ($width/$gameWidth); const float resYScale = ($height/$gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4aec000 res 640x360x1 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 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem136; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/SonicLostWorld_Resolution/79183302695ea935_0000000000000079_ps.txt b/Resolutions/SonicLostWorld_Resolution/79183302695ea935_0000000000000079_ps.txt index 44c92454..a6fdd9f9 100644 --- a/Resolutions/SonicLostWorld_Resolution/79183302695ea935_0000000000000079_ps.txt +++ b/Resolutions/SonicLostWorld_Resolution/79183302695ea935_0000000000000079_ps.txt @@ -1,14 +1,40 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 79183302695ea935 const float resXScale = ($width/$gameWidth); const float resYScale = ($height/$gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4520000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem136; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/SonicLostWorld_Resolution/92e5b6dffd1d9b9b_0000000000000079_ps.txt b/Resolutions/SonicLostWorld_Resolution/92e5b6dffd1d9b9b_0000000000000079_ps.txt index 58b1920b..da0843f4 100644 --- a/Resolutions/SonicLostWorld_Resolution/92e5b6dffd1d9b9b_0000000000000079_ps.txt +++ b/Resolutions/SonicLostWorld_Resolution/92e5b6dffd1d9b9b_0000000000000079_ps.txt @@ -1,14 +1,40 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader 92e5b6dffd1d9b9b const float resXScale = ($width/$gameWidth); const float resYScale = ($height/$gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[30]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x18fda000 res 160x90x1 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 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[30]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem136; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/SonicLostWorld_Resolution/a455fc196032912c_0000000000000079_ps.txt b/Resolutions/SonicLostWorld_Resolution/a455fc196032912c_0000000000000079_ps.txt index bad2db3b..aa98714c 100644 --- a/Resolutions/SonicLostWorld_Resolution/a455fc196032912c_0000000000000079_ps.txt +++ b/Resolutions/SonicLostWorld_Resolution/a455fc196032912c_0000000000000079_ps.txt @@ -1,14 +1,40 @@ #version 420 #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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#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 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. + // shader a455fc196032912c const float resXScale = ($width/$gameWidth); const float resYScale = ($height/$gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e48000 res 64x64x1 dim 1 tm: 4 format 0806 compSel: 3 0 1 2 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem136; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/SonicLostWorld_Resolution/rules.txt b/Resolutions/SonicLostWorld_Resolution/rules.txt index 184da0cc..80749bba 100644 --- a/Resolutions/SonicLostWorld_Resolution/rules.txt +++ b/Resolutions/SonicLostWorld_Resolution/rules.txt @@ -3,7 +3,7 @@ titleIds = 0005000010135700,000500001012B100,0005000010128F00 name = Resolution path = "Sonic Lost World/Graphics/Resolution" description = Changes the resolution of the game. -version = 3 +version = 4 [Preset] name = 1280x720 (Default)