mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-22 17:49:17 +01:00
85 lines
3.3 KiB
Plaintext
85 lines
3.3 KiB
Plaintext
#version 420
|
|
#extension GL_ARB_texture_gather : enable
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
#extension GL_ARB_shading_language_packing : enable
|
|
// shader 2258c1c082f929aa
|
|
// Used for: Stage Background Blur, Clay Texture Blur
|
|
const float resXScale = ($width/$gameWidth);
|
|
const float resYScale = ($height/$gameHeight);
|
|
|
|
uniform ivec4 uf_uniformRegisterVS[256];
|
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
|
layout(location = 0) in uvec4 attrDataSem0;
|
|
out gl_PerVertex
|
|
{
|
|
vec4 gl_Position;
|
|
float gl_PointSize;
|
|
};
|
|
layout(location = 2) out vec4 passParameterSem0;
|
|
layout(location = 1) out vec4 passParameterSem1;
|
|
layout(location = 0) out vec4 passParameterSem2;
|
|
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 R1i = ivec4(0);
|
|
ivec4 R2i = ivec4(0);
|
|
ivec4 R3i = 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);
|
|
attrDecoder.x = attrDataSem0.x;
|
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
|
attrDecoder.y = 0;
|
|
attrDecoder.z = 0;
|
|
attrDecoder.w = 0;
|
|
R1i = ivec4(int(attrDecoder.x), 0, 0, 1);
|
|
// 0
|
|
R1i.w = 0x3f800000;
|
|
R127i.z = floatBitsToInt(float(R1i.x));
|
|
PS0i = R127i.z;
|
|
// 1
|
|
tempResultf = intBitsToFloat(PS0i);
|
|
tempResultf = floor(tempResultf);
|
|
tempResultf = clamp(tempResultf, -256.0, 255.0);
|
|
ARi.x = int(tempResultf);
|
|
PV1i.x = floatBitsToInt(tempResultf);
|
|
// 2
|
|
R1i.xyz = ivec3(uf_uniformRegisterVS[ARi.x+0].x,uf_uniformRegisterVS[ARi.x+0].y,uf_uniformRegisterVS[ARi.x+0].z);
|
|
// 3
|
|
R0i.x = floatBitsToInt(intBitsToFloat(uf_uniformRegisterVS[4].x)/resXScale + intBitsToFloat(uf_uniformRegisterVS[ARi.x+7].x));
|
|
R0i.y = floatBitsToInt(intBitsToFloat(uf_uniformRegisterVS[4].y)/resYScale + intBitsToFloat(uf_uniformRegisterVS[ARi.x+7].y));
|
|
// 4
|
|
R2i.x = floatBitsToInt(intBitsToFloat(uf_uniformRegisterVS[5].x)/resXScale + intBitsToFloat(uf_uniformRegisterVS[ARi.x+7].x));
|
|
R2i.y = floatBitsToInt(intBitsToFloat(uf_uniformRegisterVS[5].y)/resYScale + intBitsToFloat(uf_uniformRegisterVS[ARi.x+7].y));
|
|
// 5
|
|
R3i.x = floatBitsToInt(intBitsToFloat(uf_uniformRegisterVS[6].x)/resXScale + intBitsToFloat(uf_uniformRegisterVS[ARi.x+7].x));
|
|
R3i.y = floatBitsToInt(intBitsToFloat(uf_uniformRegisterVS[6].y)/resYScale + intBitsToFloat(uf_uniformRegisterVS[ARi.x+7].y));
|
|
// export
|
|
gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
|
// export
|
|
passParameterSem0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.z));
|
|
// export
|
|
passParameterSem1 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.z));
|
|
// export
|
|
passParameterSem2 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.z));
|
|
}
|