mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-22 09:39:17 +01:00
Port SMM's Border Fix and XCX's Anti-Aliasing pack to v4
Both had some weird stuff going on which the Vulkan converter couldn't successfully compile. Also, the presets in the anti-aliasing might be nice, but they are not even used in the shader 🤔.
This commit is contained in:
parent
077f4f8f27
commit
0ab933a267
@ -1,5 +1,21 @@
|
|||||||
#version 420
|
#version 420
|
||||||
#extension GL_ARB_texture_gather : enable
|
#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 gl_VertexID gl_VertexIndex
|
||||||
|
#define gl_InstanceID gl_InstanceIndex
|
||||||
|
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
|
||||||
|
#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
|
||||||
|
#endif
|
||||||
|
// This shaders was auto-converted from OpenGL to Cemu so expect weird code and possible errors.
|
||||||
|
|
||||||
|
|
||||||
// shader 59df1c7e1806366c - Anti-aliasing Shader - Dumped 1.14
|
// shader 59df1c7e1806366c - Anti-aliasing Shader - Dumped 1.14
|
||||||
|
|
||||||
@ -9,8 +25,8 @@
|
|||||||
|
|
||||||
#if (preset == 0) // Native AA Disabled
|
#if (preset == 0) // Native AA Disabled
|
||||||
|
|
||||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1
|
||||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
|
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1
|
||||||
layout(location = 0) in vec4 passParameterSem0;
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
layout(location = 1) in vec4 passParameterSem1;
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
layout(location = 0) out vec4 passPixelColor0;
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
@ -32,13 +48,21 @@ passPixelColor0 = texture(textureUnitPS1, passParameterSem1.xy); // textureunitp
|
|||||||
|
|
||||||
#if (preset == 1) // Native AA Enabled
|
#if (preset == 1) // Native AA Enabled
|
||||||
|
|
||||||
|
#ifdef VULKAN
|
||||||
|
layout(set = 1, binding = 6) uniform ufBlock
|
||||||
|
{
|
||||||
uniform ivec4 uf_remappedPS[2];
|
uniform ivec4 uf_remappedPS[2];
|
||||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
uniform vec4 uf_fragCoordScale;
|
||||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
|
};
|
||||||
|
#else
|
||||||
|
uniform ivec4 uf_remappedPS[2];
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
#endif
|
||||||
|
TEXTURE_LAYOUT(0, 1, 2) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1
|
||||||
|
TEXTURE_LAYOUT(1, 1, 3) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1
|
||||||
layout(location = 0) in vec4 passParameterSem0;
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
layout(location = 1) in vec4 passParameterSem1;
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
layout(location = 0) out vec4 passPixelColor0;
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
uniform vec2 uf_fragCoordScale;
|
|
||||||
|
|
||||||
ivec2 resDim = textureSize(textureUnitPS0,0); // Retrieve texture dimensions
|
ivec2 resDim = textureSize(textureUnitPS0,0); // Retrieve texture dimensions
|
||||||
float resRatio = ( (float(resDim.x)/1280.0) + moreaa ) - lessaa; // retrieve resolution ratio, and calculate the total
|
float resRatio = ( (float(resDim.x)/1280.0) + moreaa ) - lessaa; // retrieve resolution ratio, and calculate the total
|
||||||
@ -1131,12 +1155,13 @@ FxaaFloat4 FxaaPixelShader(
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//#version 100
|
//#version 100
|
||||||
|
|
||||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
TEXTURE_LAYOUT(0, 1, 4) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1
|
||||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
|
TEXTURE_LAYOUT(1, 1, 5) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1
|
||||||
layout(location = 0) in vec4 passParameterSem0;
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
layout(location = 1) in vec4 passParameterSem1;
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
layout(location = 0) out vec4 passPixelColor0;
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
uniform vec2 uf_fragCoordScale;
|
|
||||||
|
|
||||||
|
|
||||||
ivec2 resolution = textureSize(textureUnitPS0,0); // Retrieve Texture Dimensions
|
ivec2 resolution = textureSize(textureUnitPS0,0); // Retrieve Texture Dimensions
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00
|
|||||||
name = Anti-Aliasing Pack
|
name = Anti-Aliasing Pack
|
||||||
path = "Xenoblade Chronicles X/Enhancements/Anti-Aliasing"
|
path = "Xenoblade Chronicles X/Enhancements/Anti-Aliasing"
|
||||||
description = Enables or Disables Native Anti-Aliasing. Also includes an alternative FXAA implementation. Check the "Anti-Aliasing/rules.txt" file in your Botw AA graphicPack folder for info about the individual settings.
|
description = Enables or Disables Native Anti-Aliasing. Also includes an alternative FXAA implementation. Check the "Anti-Aliasing/rules.txt" file in your Botw AA graphicPack folder for info about the individual settings.
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
[Preset]
|
[Preset]
|
||||||
name = Nvidias FXAA
|
name = Nvidias FXAA
|
||||||
|
@ -1,12 +1,36 @@
|
|||||||
#version 420
|
#version 420
|
||||||
#extension GL_ARB_texture_gather : enable
|
#extension GL_ARB_texture_gather : enable
|
||||||
#extension GL_ARB_separate_shader_objects : 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 so expect weird code and possible errors.
|
||||||
|
|
||||||
// shader 62ef961567454ba5
|
// shader 62ef961567454ba5
|
||||||
// Used for: Removes the border at the top.
|
// Used for: Removes the border at the top.
|
||||||
|
|
||||||
|
#ifdef VULKAN
|
||||||
|
layout(set = 0, binding = 0) uniform ufBlock
|
||||||
|
{
|
||||||
uniform ivec4 uf_uniformRegisterVS[256];
|
uniform ivec4 uf_uniformRegisterVS[256];
|
||||||
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
uniform ivec4 uf_uniformRegisterVS[256];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
#endif
|
||||||
out gl_PerVertex
|
out gl_PerVertex
|
||||||
{
|
{
|
||||||
vec4 gl_Position;
|
vec4 gl_Position;
|
||||||
@ -51,6 +75,9 @@ R0i.xyz = ivec3(uf_uniformRegisterVS[ARi.x+0].x,uf_uniformRegisterVS[ARi.x+0].y,
|
|||||||
R0i.w = uf_uniformRegisterVS[ARi.x+0].w;
|
R0i.w = uf_uniformRegisterVS[ARi.x+0].w;
|
||||||
// export
|
// export
|
||||||
vec4 finalPos = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w));
|
vec4 finalPos = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w));
|
||||||
finalPos.xy = finalPos.xy /* * uf_windowSpaceToClipSpaceTransform */- vec2(1.0,1.0);gl_Position = finalPos;// export
|
finalPos.xy = finalPos.xy /* * uf_windowSpaceToClipSpaceTransform */- vec2(1.0,1.0);
|
||||||
|
|
||||||
|
gl_Position = SET_POSITION(finalPos);
|
||||||
|
|
||||||
// skipped export to semanticId 255
|
// skipped export to semanticId 255
|
||||||
}
|
}
|
||||||
|
@ -3,4 +3,4 @@ titleIds = 000500001018DB00,000500001018DC00,000500001018DD00
|
|||||||
name = Border Fix
|
name = Border Fix
|
||||||
path = "Super Mario Maker/Workarounds/Border Fix"
|
path = "Super Mario Maker/Workarounds/Border Fix"
|
||||||
description = Removes the border from the top of the screen.
|
description = Removes the border from the top of the screen.
|
||||||
version = 3
|
version = 4
|
Loading…
Reference in New Issue
Block a user