Skip to content

Commit c5c7464

Browse files
authored
Adds AA enable/disable option
inspired by dr luigi
1 parent df95647 commit c5c7464

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

src/SuperMario3DWorld/Graphics/be99d80628d31127_00000000000003c9_ps.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
#endif
1919
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
2020

21-
// shader be99d80628d31127 //AA PS
22-
// Used for: Another vertical blur
23-
const float resXScale = float($width)/float($gameWidth);
24-
const float resYScale = float($height)/float($gameHeight);
25-
2621
#ifdef VULKAN
2722
layout(set = 1, binding = 2) uniform ufBlock
2823
{
@@ -33,6 +28,14 @@ uniform vec4 uf_fragCoordScale;
3328
uniform ivec4 uf_remappedPS[4];
3429
uniform vec2 uf_fragCoordScale;
3530
#endif
31+
32+
// shader be99d80628d31127 //AA PS
33+
// Used for: Another vertical blur
34+
const float resXScale = float($width)/float($gameWidth);
35+
const float resYScale = float($height)/float($gameHeight);
36+
#define AAENABLE $AAEnable
37+
38+
#if (AAENABLE == 1)
3639
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
3740
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
3841
layout(location = 0) in vec4 passParameterSem2;
@@ -216,3 +219,4 @@ activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
216219
// export
217220
passPixelColor0 = vec4(R4f.x, R4f.y, R4f.z, R4f.w);
218221
}
222+
#endif

src/SuperMario3DWorld/Graphics/rules.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $gameWidth = 1280
1313
$gameHeight = 720
1414
$shadowRes = 1
1515
$anisoLevel = 1
16+
$AAEnable:int = 1
1617

1718
# Performance
1819

@@ -147,6 +148,16 @@ category = Anisotropic Filtering
147148
name = 32x (Overkill)
148149
$anisoLevel = 32
149150

151+
[Preset]
152+
category = Anti-Aliasing
153+
name = Enable
154+
$AAEnable:int = 1
155+
156+
[Preset]
157+
category = Anti-Aliasing
158+
name = Disable
159+
$AAEnable:int = 0
160+
150161
#ansio
151162

152163
[TextureRedefine]

0 commit comments

Comments
 (0)