Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Captain Toad] new AA enable/disable option #669

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions Enhancements/CaptainToad_Shadows/rules.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 420
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
#ifdef VULKAN
Expand All @@ -11,16 +11,13 @@
#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 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 37a4ec1a7dbc7391 //AA fix
const float resXScale = float($width)/float($gameWidth);
const float resYScale = float($height)/float($gameHeight);
#ifdef VULKAN
layout(set = 1, binding = 2) uniform ufBlock
{
Expand All @@ -31,6 +28,13 @@ uniform vec4 uf_fragCoordScale;
uniform ivec4 uf_remappedPS[4];
uniform vec2 uf_fragCoordScale;
#endif

// shader 37a4ec1a7dbc7391 //AA fix
const float resXScale = float($width)/float($gameWidth);
const float resYScale = float($height)/float($gameHeight);
#define AAENABLE $AAEnable

#if (AAENABLE == 1)
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
layout(location = 0) in vec4 passParameterSem2;
Expand Down Expand Up @@ -209,3 +213,4 @@ activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
// export
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
}
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 420
#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
#ifdef VULKAN
Expand All @@ -11,7 +11,7 @@
#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 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)
Expand All @@ -20,8 +20,8 @@

// shader 5c1761d13feccdff
//Bloom fix heat haze
const float resXScale = (float($width)/float($gameWidth));
const float resYScale = (float($height)/float($gameHeight));
const float resXScale = (float($width)/float($gameWidth));
const float resYScale = (float($height)/float($gameHeight));

#ifdef VULKAN
layout(set = 0, binding = 0) uniform ufBlock
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 420
#version 430
#extension GL_ARB_texture_gather : enable
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
Expand All @@ -10,7 +10,7 @@
#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 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)
Expand Down Expand Up @@ -124,4 +124,4 @@ passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
passParameterSem1 = vec4(R3f.x, R3f.y, R3f.z, R3f.w);
// export
passParameterSem2 = vec4(R4f.x, R4f.y, R4f.z, R4f.w);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 420
#version 430
#extension GL_ARB_texture_gather : enable
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
Expand All @@ -10,7 +10,7 @@
#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 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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 420
#version 430
#extension GL_ARB_texture_gather : enable
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
Expand All @@ -10,7 +10,7 @@
#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 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)
Expand Down Expand Up @@ -122,4 +122,4 @@ passParameterSem1 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
passParameterSem2 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
// export
passParameterSem0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 420
#version 430
#extension GL_ARB_texture_gather : enable
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
Expand All @@ -10,7 +10,7 @@
#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 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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 420
#version 430
#extension GL_ARB_texture_gather : enable
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
Expand All @@ -10,7 +10,7 @@
#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 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)
Expand Down Expand Up @@ -285,4 +285,4 @@ passPixelColor0 = vec4(R5f.x, R5f.y, R5f.z, R5f.w);
passPixelColor1 = vec4(R6f.x, R6f.y, R6f.z, R6f.w);
passPixelColor2 = vec4(R7f.x, R7f.y, R7f.z, R7f.w);
passPixelColor3 = vec4(R8f.x, R8f.y, R8f.z, R8f.w);
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[KinopioAspectUW]
moduleMatches = 0x43781F76, 0xC64B0A12, 0xD80AD9B4
#rodata constants
0x100A0EE0 = .float $width/$height
0x100BE2EC = .float $width/$height
0x100D79B4 = .float $width/$height
_aspectAddr = 0x100A0EE0

#Aspect Calculation
0x02368158 = lis r31, _aspectAddr@ha
0x0236815c = lfs f13, _aspectAddr@l(r31)

[KinopioAspectUWv16]
moduleMatches = 0x9E0461E7, 0x1B377483, 0x0576A725
#rodata constants
[CaptainToad_Resolution_v16]
moduleMatches = 0x1B377483, 0x9E0461E7, 0x0576A725 ; v16(EU), v16(NA), v16(JP)
;rodata constants
0x0100A2D38 = .float $width/$height
0x0100C0164 = .float $width/$height
0x0100D982C = .float $width/$height
_aspectAddr = 0x0100A2D38

#Aspect Calculation
;Aspect Calculation
0x02373530 = lis r31, _aspectAddr@ha
0x02373534 = lfs f13, _aspectAddr@l(r31)

[CaptainToad_Resolution_v0]
moduleMatches = 0xC64B0A12, 0x43781F76, 0xD80AD9B4 ; v1(EU), v1(NA), v1(JP)
;rodata constants
0x100A0EE0 = .float $width/$height
0x100BE2EC = .float $width/$height
0x100D79B4 = .float $width/$height
_aspectAddr = 0x100A0EE0

;Aspect Calculation
0x02368158 = lis r31, _aspectAddr@ha
0x0236815C = lfs f13, _aspectAddr@l(r31)
Loading