diff --git a/Enhancements/SuperMario3DWorld_Contrasty/be99d80628d31127_00000000000003c9_ps.txt b/Enhancements/SuperMario3DWorld_Contrasty/be99d80628d31127_00000000000003c9_ps.txt index 6c3c1a08..2b34655c 100644 --- a/Enhancements/SuperMario3DWorld_Contrasty/be99d80628d31127_00000000000003c9_ps.txt +++ b/Enhancements/SuperMario3DWorld_Contrasty/be99d80628d31127_00000000000003c9_ps.txt @@ -1,10 +1,36 @@ #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 be99d80628d31127 //AA PS // Used for: Another vertical blur +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[4]; +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[4]; uniform vec2 uf_fragCoordScale; +#endif const float hazeFactor = 0.1; @@ -93,9 +119,9 @@ vec3 contrasty(vec3 colour){ return fColour; } -uniform ivec4 uf_remappedPS[4]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5800800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4341000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +// uf_remappedPS[4] was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; //uniform vec2 uf_fragCoordScale; diff --git a/Enhancements/SuperMario3DWorld_Contrasty/rules.txt b/Enhancements/SuperMario3DWorld_Contrasty/rules.txt index 8c8c907f..6a511254 100644 --- a/Enhancements/SuperMario3DWorld_Contrasty/rules.txt +++ b/Enhancements/SuperMario3DWorld_Contrasty/rules.txt @@ -3,7 +3,7 @@ titleIds = 0005000010145D00,0005000010145C00,0005000010106100 name = Contrasty path = "Super Mario 3D World/Enhancements/Contrasty" description = This pack tweaks the colors and contrast to whatever preset you set it as. You can also make your own preset by editing the Default preset in the Contrasty folder from the game's graphic packs. Doesn't work if you also upscale or downscale the resolution. -version = 3 +version = 4 [Preset] name = Default diff --git a/Resolutions/SuperMario3DWorld_Resolution/1f83c0d47b1c4c34_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/1f83c0d47b1c4c34_0000000000000000_vs.txt index c1971947..9ade38a5 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/1f83c0d47b1c4c34_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/1f83c0d47b1c4c34_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : 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 1f83c0d47b1c4c34 // Used for: Background Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#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 attrDataSem1; +// 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 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -72,7 +97,7 @@ PS1f = R2f.x; // 2 R2f.w = PV1f.x; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem3 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // 0 diff --git a/Resolutions/SuperMario3DWorld_Resolution/280351fcf8e5949f_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/280351fcf8e5949f_0000000000000000_vs.txt index 9e39197b..0c667332 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/280351fcf8e5949f_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/280351fcf8e5949f_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #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 280351fcf8e5949f // Used for: Another vertical blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#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 attrDataSem1; +// 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 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -71,7 +96,7 @@ R2f.y = backupReg0f + -(PS0f); R2f.z = backupReg0f + PS0f; R2f.w = backupReg0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // 0 diff --git a/Resolutions/SuperMario3DWorld_Resolution/470eee1bb25ab50d_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/470eee1bb25ab50d_0000000000000000_vs.txt index 9f012afb..40cd4447 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/470eee1bb25ab50d_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/470eee1bb25ab50d_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #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 gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,14 +8,38 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#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 470eee1bb25ab50d // low res reflection const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +}; +#else +uniform ivec4 uf_remappedVS[1]; +#endif +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/SuperMario3DWorld_Resolution/4c426260188ace42_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/4c426260188ace42_0000000000000000_vs.txt index 83ac0b2c..3792348d 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/4c426260188ace42_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/4c426260188ace42_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #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 gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,13 +8,37 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#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 4c426260188ace42 //switch palace reflection vertical const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -layout(location = 0) in uvec4 attrDataSem0; +}; +#else +uniform ivec4 uf_remappedVS[5]; +#endif +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/SuperMario3DWorld_Resolution/5661793d88425685_0000000007fffff9_ps.txt b/Resolutions/SuperMario3DWorld_Resolution/5661793d88425685_0000000007fffff9_ps.txt index 2bd0a3ca..772329d1 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/5661793d88425685_0000000007fffff9_ps.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/5661793d88425685_0000000007fffff9_ps.txt @@ -1,12 +1,38 @@ #version 420 #extension GL_ARB_texture_gather : 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 5661793d88425685 // Used for: First glitter bloom pass const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[7]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4f48800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[7]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; @@ -14,7 +40,7 @@ layout(location = 2) out vec4 passPixelColor2; layout(location = 3) out vec4 passPixelColor3; layout(location = 4) out vec4 passPixelColor4; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/SuperMario3DWorld_Resolution/6d9067fd20086bc0_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/6d9067fd20086bc0_0000000000000000_vs.txt index 4f1fad66..6f37e0c4 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/6d9067fd20086bc0_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/6d9067fd20086bc0_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #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 6d9067fd20086bc0 // Used for: Vertical blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#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 attrDataSem1; +// 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 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -77,7 +102,7 @@ PS1f = R4f.x; R3f.x = PV1f.z; R4f.y = R2f.y; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.z); // export diff --git a/Resolutions/SuperMario3DWorld_Resolution/842a19b509f8b91a_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/842a19b509f8b91a_0000000000000000_vs.txt index 81cdee3b..c395c9f0 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/842a19b509f8b91a_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/842a19b509f8b91a_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : 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 842a19b509f8b91a // Used for: General Blur vertical const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#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 attrDataSem1; +// 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 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -92,7 +117,7 @@ PS1f = R2f.z; // 4 R4f.xzw = vec3(R2f.x,PS1f,R2f.y); // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); // export diff --git a/Resolutions/SuperMario3DWorld_Resolution/8d68a0e3561ff525_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/8d68a0e3561ff525_0000000000000000_vs.txt index 17a68cce..d630fced 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/8d68a0e3561ff525_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/8d68a0e3561ff525_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : 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 8d68a0e3561ff525 // Used for: Horizontal Gameplay Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#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 attrDataSem1; +// 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 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -90,7 +115,7 @@ R2f.y = backupReg0f + -(R126f.y); R2f.z = backupReg0f + R126f.y; R2f.w = backupReg0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem1 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); // export diff --git a/Resolutions/SuperMario3DWorld_Resolution/b727c08e3b534992_0000000007fffffd_ps.txt b/Resolutions/SuperMario3DWorld_Resolution/b727c08e3b534992_0000000007fffffd_ps.txt index 01879f11..baeb73fe 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/b727c08e3b534992_0000000007fffffd_ps.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/b727c08e3b534992_0000000007fffffd_ps.txt @@ -1,12 +1,38 @@ #version 420 #extension GL_ARB_texture_gather : 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 b727c08e3b534992 // Used for: Second glitter bloom pass const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[10]; -layout(binding = 1) uniform sampler2DArray textureUnitPS1;// Tex1 addr 0xf50ed800 res 320x180x6 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x6) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[10]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2DArray textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; @@ -14,7 +40,7 @@ layout(location = 2) out vec4 passPixelColor2; layout(location = 3) out vec4 passPixelColor3; layout(location = 4) out vec4 passPixelColor4; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/SuperMario3DWorld_Resolution/be99d80628d31127_00000000000003c9_ps.txt b/Resolutions/SuperMario3DWorld_Resolution/be99d80628d31127_00000000000003c9_ps.txt index 0f5f7a25..a787813e 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/be99d80628d31127_00000000000003c9_ps.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/be99d80628d31127_00000000000003c9_ps.txt @@ -1,17 +1,43 @@ #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 be99d80628d31127 //AA PS // Used for: Another vertical blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[4]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5800800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4341000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[4]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; 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/SuperMario3DWorld_Resolution/c27612e2f7126ebf_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/c27612e2f7126ebf_0000000000000000_vs.txt index a8301553..290670c2 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/c27612e2f7126ebf_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/c27612e2f7126ebf_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #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 gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,13 +8,37 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#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 c27612e2f7126ebf //switch palace low res reflection 256x240 / 240x240 hz const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -layout(location = 0) in uvec4 attrDataSem0; +}; +#else +uniform ivec4 uf_remappedVS[5]; +#endif +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/SuperMario3DWorld_Resolution/c4eaec09897d525e_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/c4eaec09897d525e_0000000000000000_vs.txt index f3f9061e..524d1e98 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/c4eaec09897d525e_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/c4eaec09897d525e_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #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 gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,14 +8,38 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#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 c4eaec09897d525e //reflection const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +}; +#else +uniform ivec4 uf_remappedVS[1]; +#endif +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/SuperMario3DWorld_Resolution/d9c81460d6984bb2_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/d9c81460d6984bb2_0000000000000000_vs.txt index 2682e18e..67c199e6 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/d9c81460d6984bb2_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/d9c81460d6984bb2_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #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 gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,13 +8,37 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#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 d9c81460d6984bb2 //switch palace reflection hz const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -layout(location = 0) in uvec4 attrDataSem0; +}; +#else +uniform ivec4 uf_remappedVS[5]; +#endif +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/SuperMario3DWorld_Resolution/e4e4a60266119f75_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/e4e4a60266119f75_0000000000000000_vs.txt index d7d03d58..0be82714 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/e4e4a60266119f75_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/e4e4a60266119f75_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #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 gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,15 +8,39 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#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 e4e4a60266119f75 //reflection const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +}; +#else +uniform ivec4 uf_remappedVS[1]; +#endif +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/SuperMario3DWorld_Resolution/fa47a4b5f1304f51_0000000000000000_vs.txt b/Resolutions/SuperMario3DWorld_Resolution/fa47a4b5f1304f51_0000000000000000_vs.txt index 4084b0e4..c6f892bd 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/fa47a4b5f1304f51_0000000000000000_vs.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/fa47a4b5f1304f51_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #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 gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,13 +8,37 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#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 fa47a4b5f1304f51 // low res reflection const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -layout(location = 0) in uvec4 attrDataSem0; +}; +#else +uniform ivec4 uf_remappedVS[5]; +#endif +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/SuperMario3DWorld_Resolution/rules.txt b/Resolutions/SuperMario3DWorld_Resolution/rules.txt index 2cf44e6a..65d34d60 100644 --- a/Resolutions/SuperMario3DWorld_Resolution/rules.txt +++ b/Resolutions/SuperMario3DWorld_Resolution/rules.txt @@ -3,7 +3,7 @@ titleIds = 0005000010145D00,0005000010145C00,0005000010106100 name = Resolution path = "Super Mario 3D World/Graphics/Resolution" description = Changes the resolution of the game. -version = 3 +version = 4 [Preset] name = 1280x720 (Default)