#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : 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
// Used for: Removes the border at the top.

#ifdef VULKAN
layout(set = 0, binding = 0) uniform ufBlock
{
uniform ivec4 uf_uniformRegisterVS[256];
uniform vec2 uf_windowSpaceToClipSpaceTransform;
};
#else
uniform ivec4 uf_uniformRegisterVS[256];
uniform vec2 uf_windowSpaceToClipSpaceTransform;
#endif
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 = SET_POSITION(finalPos);

// skipped export to semanticId 255
}
