From 718f317c4ccfff0d84b04e0d86a45192b610a3f8 Mon Sep 17 00:00:00 2001 From: intra0 Date: Sun, 15 Dec 2024 13:16:32 -0600 Subject: [PATCH] Add an AA enable/disable option inspired by dr luigi --- .../c14019840473ff86_00000000000003c9_ps.txt | 18 +++++++++++------- src/TwilightPrincessHD/Graphics/rules.txt | 11 +++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/TwilightPrincessHD/Graphics/c14019840473ff86_00000000000003c9_ps.txt b/src/TwilightPrincessHD/Graphics/c14019840473ff86_00000000000003c9_ps.txt index 8b6ac98b..906e0b9e 100644 --- a/src/TwilightPrincessHD/Graphics/c14019840473ff86_00000000000003c9_ps.txt +++ b/src/TwilightPrincessHD/Graphics/c14019840473ff86_00000000000003c9_ps.txt @@ -18,13 +18,6 @@ #endif // This shader was automatically converted to be cross-compatible with Vulkan and OpenGL. -// shader c14019840473ff86 -//scale boxblur fx - -TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; -TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; -layout(location = 0) in vec4 passParameterSem0; -layout(location = 0) out vec4 passPixelColor0; #ifdef VULKAN layout(set = 1, binding = 2) uniform ufBlock { @@ -33,6 +26,16 @@ uniform vec4 uf_fragCoordScale; #else uniform vec2 uf_fragCoordScale; #endif + +#define AAENABLE $AAEnable + +#if (AAENABLE == 1) +// shader c14019840473ff86 +//scale boxblur fx +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 0) out vec4 passPixelColor0; int clampFI32(int v) { if( v == 0x7FFFFFFF ) @@ -157,3 +160,4 @@ R0f.w = PV0f.x * 0.25; // export passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); } +#endif diff --git a/src/TwilightPrincessHD/Graphics/rules.txt b/src/TwilightPrincessHD/Graphics/rules.txt index b27df701..7946fdfa 100644 --- a/src/TwilightPrincessHD/Graphics/rules.txt +++ b/src/TwilightPrincessHD/Graphics/rules.txt @@ -20,6 +20,7 @@ $UIAspectX = 1.0 $UIAspectY = 1.0 $UItransp = 1.0 $anisoLevel = 1 +$AAEnable:int = 1 # Performance @@ -1089,6 +1090,16 @@ category = Anisotropic Filtering name = 32x (Overkill) $anisoLevel = 32 +[Preset] +category = Anti-Aliasing +name = Enable +$AAEnable:int = 1 + +[Preset] +category = Anti-Aliasing +name = Disable +$AAEnable:int = 0 + [TextureRedefine] formats = 0x31,0x32,0x33,0x34,0x35,0x431,0x432,0x433,0x434,0x435