mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2025-01-09 19:27:36 -03:00
[SMM] Add border workaround
This commit is contained in:
parent
bd41f842db
commit
9ac7253eaf
2 changed files with 62 additions and 0 deletions
|
@ -0,0 +1,56 @@
|
|||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_packing : enable
|
||||
// shader 62ef961567454ba5
|
||||
// Used for: Removes the border at the top.
|
||||
|
||||
uniform ivec4 uf_uniformRegisterVS[256];
|
||||
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
};
|
||||
int clampFI32(int v)
|
||||
{
|
||||
if( v == 0x7FFFFFFF )
|
||||
return floatBitsToInt(1.0);
|
||||
else if( v == 0xFFFFFFFF )
|
||||
return floatBitsToInt(0.0);
|
||||
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
|
||||
}
|
||||
float mul_nonIEEE(float a, float b){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));}
|
||||
void main()
|
||||
{
|
||||
ivec4 R0i = ivec4(0);
|
||||
ivec4 R127i = ivec4(0);
|
||||
uvec4 attrDecoder;
|
||||
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
|
||||
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
|
||||
int PS0i = 0, PS1i = 0;
|
||||
ivec4 tempi = ivec4(0);
|
||||
float tempResultf;
|
||||
int tempResulti;
|
||||
ivec4 ARi = ivec4(0);
|
||||
bool predResult = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||
// 0
|
||||
R127i.x = floatBitsToInt(float(R0i.x));
|
||||
PS0i = R127i.x;
|
||||
// 1
|
||||
tempResultf = intBitsToFloat(PS0i);
|
||||
tempResultf = floor(tempResultf);
|
||||
tempResultf = clamp(tempResultf, -256.0, 255.0);
|
||||
ARi.x = int(tempResultf);
|
||||
PV1i.x = floatBitsToInt(tempResultf);
|
||||
// 2
|
||||
R0i.xyz = ivec3(uf_uniformRegisterVS[ARi.x+0].x,uf_uniformRegisterVS[ARi.x+0].y,uf_uniformRegisterVS[ARi.x+0].z);
|
||||
R0i.w = uf_uniformRegisterVS[ARi.x+0].w;
|
||||
// export
|
||||
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
|
||||
// skipped export to semanticId 255
|
||||
}
|
6
Workarounds/SuperMarioMaker_BorderFix/rules.txt
Normal file
6
Workarounds/SuperMarioMaker_BorderFix/rules.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Definition]
|
||||
titleIds = 000500001018DB00,000500001018DC00,000500001018DD00
|
||||
name = Border Fix
|
||||
path = "Super Mario Maker/Workarounds/Border Fix"
|
||||
description = Removes the border from the top of the screen.
|
||||
version = 3
|
Loading…
Reference in a new issue