From 65d4511fa92413a11b0092cb57b2108235c6e27d Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Wed, 1 Jan 2020 20:40:08 +0100 Subject: [PATCH] Update Mario Kart 8 packs for Vulkan No unverified shaders. Should all just work :tm: --- .../e90feef2bca6cb2e_00000000000003c9_ps.txt | 32 +++++++++++++++-- Enhancements/MarioKart8_Bloom/rules.txt | 2 +- .../998a9f67e353657b_0000000000001e51_ps.txt | 34 +++++++++++++++--- Enhancements/MarioKart8_Contrasty/rules.txt | 2 +- .../0039902b839f2863_00000000000003c9_ps.txt | 30 ++++++++++++++-- .../005826125bfe150a_0000000000000079_ps.txt | 28 ++++++++++++++- .../03c0659aacda420a_00000000000003c9_ps.txt | 30 ++++++++++++++-- .../2940f7a0fb8ea817_0000000000000079_ps.txt | 28 ++++++++++++++- .../440c49859973a955_00000000000003c9_ps.txt | 30 ++++++++++++++-- .../50612bab4e50d820_0000000000001e49_ps.txt | 32 +++++++++++++++-- .../96440241cc1bf8a4_000000000000007d_ps.txt | 28 ++++++++++++++- .../a6981858d5437cf7_00000000000003c9_ps.txt | 30 ++++++++++++++-- Mods/MarioKart8_NoHud/rules.txt | 2 +- .../2e78a0d0a0aa66bb_0000000000000000_vs.txt | 35 ++++++++++++++++--- .../74126253134563de_0000000000000000_vs.txt | 33 ++++++++++++++--- .../ad3014302e0e49bf_0000000000000000_vs.txt | 33 ++++++++++++++--- .../dd7a19be01b7b1aa_0000000000000000_vs.txt | 35 ++++++++++++++++--- Resolutions/MarioKart8_Resolution/rules.txt | 2 +- 18 files changed, 403 insertions(+), 43 deletions(-) diff --git a/Enhancements/MarioKart8_Bloom/e90feef2bca6cb2e_00000000000003c9_ps.txt b/Enhancements/MarioKart8_Bloom/e90feef2bca6cb2e_00000000000003c9_ps.txt index d5b2c0c7..d347c067 100644 --- a/Enhancements/MarioKart8_Bloom/e90feef2bca6cb2e_00000000000003c9_ps.txt +++ b/Enhancements/MarioKart8_Bloom/e90feef2bca6cb2e_00000000000003c9_ps.txt @@ -1,16 +1,42 @@ #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 shaders was auto-converted from OpenGL to Cemu. + // shader e90feef2bca6cb2e const float bloomFactor = $bloom; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[4]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 1280x720x1 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 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf50cf800 res 1280x720x1 dim 1 tm: 4 format 0806 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 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) 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/Enhancements/MarioKart8_Bloom/rules.txt b/Enhancements/MarioKart8_Bloom/rules.txt index e1d0e9a0..f1bdee44 100644 --- a/Enhancements/MarioKart8_Bloom/rules.txt +++ b/Enhancements/MarioKart8_Bloom/rules.txt @@ -3,7 +3,7 @@ titleIds = 000500001010ec00,000500001010ed00,000500001010eb00 name = Bloom Adjustment path = "Mario Kart 8/Enhancements/Bloom Adjustment" description = Allows you to adjust how strong the bloom is. Full amount is the default intensity of bloom. -version = 3 +version = 4 [Preset] name = Full Amount (Default) diff --git a/Enhancements/MarioKart8_Contrasty/998a9f67e353657b_0000000000001e51_ps.txt b/Enhancements/MarioKart8_Contrasty/998a9f67e353657b_0000000000001e51_ps.txt index 3956d266..52498be6 100644 --- a/Enhancements/MarioKart8_Contrasty/998a9f67e353657b_0000000000001e51_ps.txt +++ b/Enhancements/MarioKart8_Contrasty/998a9f67e353657b_0000000000001e51_ps.txt @@ -1,8 +1,34 @@ #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 shaders was auto-converted from OpenGL to Cemu. + +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +uniform ivec4 uf_remappedPS[1]; +}; +#else uniform vec2 uf_fragCoordScale; +uniform ivec4 uf_remappedPS[1]; +#endif const float hazeFactor = 0.1; @@ -93,10 +119,10 @@ vec3 contrasty(vec3 colour){ // shader 998a9f67e353657b -uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf494a800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler3D textureUnitPS1;// Tex1 addr 0x41a14000 res 8x8x8 dim 2 tm: 3 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x8) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4240800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 +// uf_remappedPS[1] was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler3D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 0) out vec4 passPixelColor0; diff --git a/Enhancements/MarioKart8_Contrasty/rules.txt b/Enhancements/MarioKart8_Contrasty/rules.txt index 7e20bf27..518d7625 100644 --- a/Enhancements/MarioKart8_Contrasty/rules.txt +++ b/Enhancements/MarioKart8_Contrasty/rules.txt @@ -3,7 +3,7 @@ titleIds = 000500001010ec00,000500001010ed00,000500001010eb00 name = Contrasty path = "Mario Kart 8/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. -version = 3 +version = 4 [Preset] name = Default diff --git a/Mods/MarioKart8_NoHud/0039902b839f2863_00000000000003c9_ps.txt b/Mods/MarioKart8_NoHud/0039902b839f2863_00000000000003c9_ps.txt index 3621674f..5dfed7d4 100644 --- a/Mods/MarioKart8_NoHud/0039902b839f2863_00000000000003c9_ps.txt +++ b/Mods/MarioKart8_NoHud/0039902b839f2863_00000000000003c9_ps.txt @@ -4,13 +4,39 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader 0039902b839f2863 // Used for: Removing coin from the HUD +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[3]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2D textureUnitPS1; +#endif +// uf_fragCoordScale 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 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 0) out vec4 passPixelColor0; diff --git a/Mods/MarioKart8_NoHud/005826125bfe150a_0000000000000079_ps.txt b/Mods/MarioKart8_NoHud/005826125bfe150a_0000000000000079_ps.txt index 07ffd5b8..060d992e 100644 --- a/Mods/MarioKart8_NoHud/005826125bfe150a_0000000000000079_ps.txt +++ b/Mods/MarioKart8_NoHud/005826125bfe150a_0000000000000079_ps.txt @@ -4,12 +4,38 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader 005826125bfe150a // Used for: Removing the lap and coin background +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[2]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[2]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2D textureUnitPS0; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; int clampFI32(int v) diff --git a/Mods/MarioKart8_NoHud/03c0659aacda420a_00000000000003c9_ps.txt b/Mods/MarioKart8_NoHud/03c0659aacda420a_00000000000003c9_ps.txt index 36c67bda..b5824ef9 100644 --- a/Mods/MarioKart8_NoHud/03c0659aacda420a_00000000000003c9_ps.txt +++ b/Mods/MarioKart8_NoHud/03c0659aacda420a_00000000000003c9_ps.txt @@ -4,13 +4,39 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader 03c0659aacda420a // Used for: Removing the position number from the HUD, black undertext +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[3]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2D textureUnitPS1; +#endif +// uf_fragCoordScale 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 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 0) out vec4 passPixelColor0; diff --git a/Mods/MarioKart8_NoHud/2940f7a0fb8ea817_0000000000000079_ps.txt b/Mods/MarioKart8_NoHud/2940f7a0fb8ea817_0000000000000079_ps.txt index 81e347bf..9f1f840b 100644 --- a/Mods/MarioKart8_NoHud/2940f7a0fb8ea817_0000000000000079_ps.txt +++ b/Mods/MarioKart8_NoHud/2940f7a0fb8ea817_0000000000000079_ps.txt @@ -4,12 +4,38 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader 2940f7a0fb8ea817 // Used for: Removing the track minimap in the HUD +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[2]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[2]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2D textureUnitPS0; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 0) out vec4 passPixelColor0; diff --git a/Mods/MarioKart8_NoHud/440c49859973a955_00000000000003c9_ps.txt b/Mods/MarioKart8_NoHud/440c49859973a955_00000000000003c9_ps.txt index d31ec7f0..ed06cf79 100644 --- a/Mods/MarioKart8_NoHud/440c49859973a955_00000000000003c9_ps.txt +++ b/Mods/MarioKart8_NoHud/440c49859973a955_00000000000003c9_ps.txt @@ -4,13 +4,39 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader 440c49859973a955 // Used for: Removing the position number from the HUD, colored text +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[5]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[5]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2D textureUnitPS1; +#endif +// uf_fragCoordScale 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 passParameterSem1; layout(location = 1) in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; diff --git a/Mods/MarioKart8_NoHud/50612bab4e50d820_0000000000001e49_ps.txt b/Mods/MarioKart8_NoHud/50612bab4e50d820_0000000000001e49_ps.txt index 10c5c5ab..517bcd17 100644 --- a/Mods/MarioKart8_NoHud/50612bab4e50d820_0000000000001e49_ps.txt +++ b/Mods/MarioKart8_NoHud/50612bab4e50d820_0000000000001e49_ps.txt @@ -4,14 +4,40 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader 50612bab4e50d820 // Used for: Removing the item icon from the HUD +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[5]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[5]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2D textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem2; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem0; diff --git a/Mods/MarioKart8_NoHud/96440241cc1bf8a4_000000000000007d_ps.txt b/Mods/MarioKart8_NoHud/96440241cc1bf8a4_000000000000007d_ps.txt index 8472719b..0d99e0fa 100644 --- a/Mods/MarioKart8_NoHud/96440241cc1bf8a4_000000000000007d_ps.txt +++ b/Mods/MarioKart8_NoHud/96440241cc1bf8a4_000000000000007d_ps.txt @@ -4,12 +4,38 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader 96440241cc1bf8a4 // Used for: Removing the lap text from the HUD +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[4]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[4]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2DArray textureUnitPS0; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2DArray textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 0) out vec4 passPixelColor0; diff --git a/Mods/MarioKart8_NoHud/a6981858d5437cf7_00000000000003c9_ps.txt b/Mods/MarioKart8_NoHud/a6981858d5437cf7_00000000000003c9_ps.txt index 59bfd4dd..5bbb2842 100644 --- a/Mods/MarioKart8_NoHud/a6981858d5437cf7_00000000000003c9_ps.txt +++ b/Mods/MarioKart8_NoHud/a6981858d5437cf7_00000000000003c9_ps.txt @@ -4,13 +4,39 @@ #ifdef VULKAN #else #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 shaders was auto-converted from OpenGL to Cemu. + // shader a6981858d5437cf7 // Used for: Removing dotted background behind coin in the HUD +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[3]; uniform vec2 uf_fragCoordScale; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2D textureUnitPS1; +#endif +// uf_fragCoordScale 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 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; diff --git a/Mods/MarioKart8_NoHud/rules.txt b/Mods/MarioKart8_NoHud/rules.txt index 0d641e5a..5259fc15 100644 --- a/Mods/MarioKart8_NoHud/rules.txt +++ b/Mods/MarioKart8_NoHud/rules.txt @@ -3,4 +3,4 @@ titleIds = 000500001010ec00,000500001010ed00,000500001010eb00 name = Removes all the HUD elements path = "Mario Kart 8/Mods/No HUD" description = Disables any HUD while racing. Breaks many of the menu's so don't use this if you just want to play the game. -version = 3 \ No newline at end of file +version = 4 \ No newline at end of file diff --git a/Resolutions/MarioKart8_Resolution/2e78a0d0a0aa66bb_0000000000000000_vs.txt b/Resolutions/MarioKart8_Resolution/2e78a0d0a0aa66bb_0000000000000000_vs.txt index 4faeadd7..8c6b3ff6 100644 --- a/Resolutions/MarioKart8_Resolution/2e78a0d0a0aa66bb_0000000000000000_vs.txt +++ b/Resolutions/MarioKart8_Resolution/2e78a0d0a0aa66bb_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #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 shaders was auto-converted from OpenGL to Cemu. + // shader 2e78a0d0a0aa66bb // Used for: Horizontal (Menu) Bloom Blur const float resScale = float($width)/float($gameWidth); +#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/MarioKart8_Resolution/74126253134563de_0000000000000000_vs.txt b/Resolutions/MarioKart8_Resolution/74126253134563de_0000000000000000_vs.txt index e42115e7..b8b29ded 100644 --- a/Resolutions/MarioKart8_Resolution/74126253134563de_0000000000000000_vs.txt +++ b/Resolutions/MarioKart8_Resolution/74126253134563de_0000000000000000_vs.txt @@ -1,14 +1,39 @@ #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 shaders was auto-converted from OpenGL to Cemu. + // shader 74126253134563de // Used for: Vertical Menu Background Blur const float resScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// 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; out gl_PerVertex { vec4 gl_Position; @@ -101,7 +126,7 @@ R1f.y = PV1f.y + -(R126f.x); R1f.z = PV1f.y + R126f.x; R1f.w = PV1f.y; // export -gl_Position = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +SET_POSITION(vec4(R0f.x, R0f.y, R0f.z, R0f.w)); // export passParameterSem0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); // 0 diff --git a/Resolutions/MarioKart8_Resolution/ad3014302e0e49bf_0000000000000000_vs.txt b/Resolutions/MarioKart8_Resolution/ad3014302e0e49bf_0000000000000000_vs.txt index 258b1fc8..57bc1b74 100644 --- a/Resolutions/MarioKart8_Resolution/ad3014302e0e49bf_0000000000000000_vs.txt +++ b/Resolutions/MarioKart8_Resolution/ad3014302e0e49bf_0000000000000000_vs.txt @@ -1,14 +1,39 @@ #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 shaders was auto-converted from OpenGL to Cemu. + // shader ad3014302e0e49bf // Used for: Stage Select & Menu Background Horizontal Blur const float resScale = float($width)/float($gameWidth); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// 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; out gl_PerVertex { vec4 gl_Position; @@ -104,7 +129,7 @@ R1f.y = PV1f.z + -(R126f.x); R1f.z = PV1f.z + R126f.x; R1f.w = PV1f.z; // export -gl_Position = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +SET_POSITION(vec4(R0f.x, R0f.y, R0f.z, R0f.w)); // export passParameterSem0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); // 0 diff --git a/Resolutions/MarioKart8_Resolution/dd7a19be01b7b1aa_0000000000000000_vs.txt b/Resolutions/MarioKart8_Resolution/dd7a19be01b7b1aa_0000000000000000_vs.txt index 68c93205..830a3496 100644 --- a/Resolutions/MarioKart8_Resolution/dd7a19be01b7b1aa_0000000000000000_vs.txt +++ b/Resolutions/MarioKart8_Resolution/dd7a19be01b7b1aa_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #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 shaders was auto-converted from OpenGL to Cemu. + // shader dd7a19be01b7b1aa // Used for: Vertical (Menu) Bloom Blur const float resScale = 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/MarioKart8_Resolution/rules.txt b/Resolutions/MarioKart8_Resolution/rules.txt index 74dfbd37..39ee235a 100644 --- a/Resolutions/MarioKart8_Resolution/rules.txt +++ b/Resolutions/MarioKart8_Resolution/rules.txt @@ -3,7 +3,7 @@ titleIds = 000500001010ec00,000500001010ed00,000500001010eb00 name = Resolution path = "Mario Kart 8/Graphics/Resolution" description = Changes the resolution of the game. -version = 3 +version = 4 [Preset] name = 1280x720 (Default)