You are on page 1of 4

#version 320 es

#define CITRA_GLES
#if defined(GL_ANDROID_extension_pack_es31a)
#extension GL_ANDROID_extension_pack_es31a : enable
#endif // defined(GL_ANDROID_extension_pack_es31a)
#if defined(GL_EXT_clip_cull_distance)
#extension GL_EXT_clip_cull_distance : enable
#endif // defined(GL_EXT_clip_cull_distance)

#define mul_s(x, y) (x * y)
#define fma_s(x, y, z) fma(x, y, z)
#define dot_s(x, y) dot(x, y)
#define dot_3(x, y) dot(x, y)

#define rcp_s(x) (1.0 / x)


#define rsq_s(x) inversesqrt(x)

#define min_s(x, y) min(x, y)


#define max_s(x, y) max(x, y)
layout(points) in;
layout(triangle_strip, max_vertices=30) out;
layout(location=0) uniform vec4 clip_coef;

layout(binding=3, std140) uniform gs_config {


bool b[16];
uvec4 i[4];
vec4 f[96];
}gs_pica;
bool ExecGS();
layout(location=0) in vec4 vs_out_reg0[];
layout(location=1) in vec4 vs_out_reg1[];
layout(location=2) in vec4 vs_out_reg2[];
layout(location=3) in vec4 vs_out_reg3[];
layout(location=4) in vec4 vs_out_reg4[];
layout(location=5) in vec4 vs_out_reg5[];
vec4 gs_out_reg[3][5];
vec4 vtx_regs[5] = vec4[5](vec4(1),vec4(1),vec4(1),vec4(1),vec4(1));
layout(location=0) out vec4 primary_color;
layout(location=1) out vec4 texcoord0;
layout(location=2) out vec4 texcoord12;
layout(location=3) out vec4 normquat;
layout(location=4) out vec4 view;
vec4 GetQuaternion(int idx) {
return vec4(gs_out_reg[idx][1].x,gs_out_reg[idx][1].y,gs_out_reg[idx]
[1].z,gs_out_reg[idx][1].w);
}
bool IsOpposite(vec4 qa, vec4 qb) {
return (dot(qa, qb) < 0.0);
}
void EmitVtx(int idx, bool opposite) {
vec4 vtx_pos = vec4(gs_out_reg[idx][0].x,gs_out_reg[idx][0].y,gs_out_reg[idx]
[0].z,gs_out_reg[idx][0].w);
gl_Position = vtx_pos;
#if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
gl_ClipDistance[0] = -vtx_pos.z;
gl_ClipDistance[1] = dot(clip_coef, vtx_pos);
#endif
vec4 vtx_quat = GetQuaternion(idx);
normquat = mix(vtx_quat, -vtx_quat, bvec4(opposite));
vec4 vtx_color = vec4(gs_out_reg[idx][2].x,gs_out_reg[idx][2].y,gs_out_reg[idx]
[2].z, gs_out_reg[idx][2].w);
primary_color = clamp(vtx_color,vec4(0),vec4(1));
texcoord0 = vec4(gs_out_reg[idx][3].x,gs_out_reg[idx][3].y,1,1);
texcoord12 = vec4(1,1,1,1);
view = vec4(gs_out_reg[idx][4].x,gs_out_reg[idx][4].y,gs_out_reg[idx][4].z,1);
EmitVertex();
}
void EmitPrim(int idx0, int idx1, int idx2) {
EmitVtx(idx0, false);
EmitVtx(idx1, IsOpposite(GetQuaternion(idx0), GetQuaternion(idx1)));
EmitVtx(idx2, IsOpposite(GetQuaternion(idx0), GetQuaternion(idx2)));
EndPrimitive();
}

int vtx_idx = 0;
bool prim_emit = false;
bool winding = false;
void SetEmit(int i, bool p, bool w) {
vtx_idx = i;
prim_emit = p;
winding = w;
}
void Emit() {
gs_out_attr[vtx_idx] = vtx_regs;
if (prim_emit) {
if (winding) {
EmitPrim(1,0,2);
winding = false;
} else {
EmitPrim(0,1,2);
}
}
}
void main() {
ExecGS();
}
bvec2 bool_regs = bvec2(false);
ivec3 addr_regs = ivec3(0);
bool Gfn0();
vec4 tmp_reg0;
vec4 tmp_reg1;
vec4 tmp_reg2;
vec4 tmp_reg3;
vec4 tmp_reg4;
vec4 tmp_reg12;
vec4 tmp_reg13;
vec4 tmp_reg14;
vec4 tmp_reg15;
bool ExecGS() {tmp_reg0 = vec4(0, 0, 0, 1);
tmp_reg1 = vec4(0, 0, 0, 1);
tmp_reg2 = vec4(0, 0, 0, 1);
tmp_reg3 = vec4(0, 0, 0, 1);
tmp_reg4 = vec4(0, 0, 0, 1);
tmp_reg12 = vec4(0, 0, 0, 1);
tmp_reg13 = vec4(0, 0, 0, 1);
tmp_reg14 = vec4(0, 0, 0, 1);
tmp_reg15 = vec4(0, 0, 0, 1);
Gfn0();
return true;
}

bool Gfn0() {
uint jmp_to = 79u;
while (true) {
switch (jmp_to) {
case 79u:
tmp_reg0 = -gs_pica.f[5] + vs_out_reg0[0];
tmp_reg2 = vec4(dot_3(tmp_reg0.xyz, tmp_reg0.xyz));
bool_regs.x = gs_pica.f[11].x < tmp_reg2.x;
bool_regs.y = gs_pica.f[11].y > tmp_reg2.y;
if (bool_regs.x) {
jmp_to = 153u; break;
}
tmp_reg13 = mul_s(gs_pica.f[82].yyyy, vs_out_reg4[0]);
tmp_reg13 = gs_pica.f[9] + tmp_reg13;
tmp_reg13.xyz = (mul_s(gs_pica.f[83].yyyy, tmp_reg13.xyzz)).xyz;
tmp_reg13.w = (gs_pica.f[81].wwww + vs_out_reg4[0].wwww).w;
tmp_reg13.w = (mul_s(gs_pica.f[82].wwww, tmp_reg13.wwww)).w;
tmp_reg13.xyz = (mul_s(tmp_reg13.xyzz, tmp_reg13.wwww)).xyz;
tmp_reg12.w = (gs_pica.f[81].wwww + vs_out_reg3[0].wwww).w;
tmp_reg12.w = (mul_s(gs_pica.f[82].wwww, tmp_reg12.wwww)).w;
tmp_reg12.xyz = (mul_s(gs_pica.f[8], tmp_reg12.wwww)).xyz;
tmp_reg2 = gs_pica.f[4].wwww + vs_out_reg0[0].wwww;
tmp_reg3 = floor(tmp_reg2);
tmp_reg2 = tmp_reg2 + -tmp_reg3;
tmp_reg2 = -gs_pica.f[83].yyyy + tmp_reg2;
tmp_reg2 = mul_s(gs_pica.f[83].wwww, tmp_reg2);
tmp_reg14 = gs_pica.f[95];
tmp_reg15 = gs_pica.f[94];
tmp_reg3.z = (mul_s(tmp_reg2.xxxx, tmp_reg2.xxxx)).z;
tmp_reg3.x = (fma_s(tmp_reg3.zzzz, tmp_reg14.xyyy, tmp_reg14.zwww)).x;
tmp_reg3.x = (fma_s(tmp_reg3.zzzz, tmp_reg3.xxxx, tmp_reg15.xyyy)).x;
tmp_reg3.x = (fma_s(tmp_reg3.zzzz, tmp_reg3.xxxx, tmp_reg15.zwww)).x;
tmp_reg14 = gs_pica.f[93];
tmp_reg3.x = (fma_s(tmp_reg3.zzzz, tmp_reg3.xxxx, tmp_reg14.xyyy)).x;
tmp_reg3.x = (fma_s(tmp_reg3.zzzz, tmp_reg3.xxxx, tmp_reg14.zwww)).x;
tmp_reg3.x = (mul_s(tmp_reg3.xxxx, vs_out_reg1[0].wwww)).x;
tmp_reg13.xyz = (fma_s(tmp_reg3.xxxx, gs_pica.f[4].xyzz, tmp_reg13.xyzz)).xyz;
tmp_reg0.xyz = (vs_out_reg0[0].xyzz).xyz;
tmp_reg0.w = (gs_pica.f[81].yyyy).w;
tmp_reg4.x = dot_s(gs_pica.f[12], tmp_reg0);
tmp_reg4.y = dot_s(gs_pica.f[13], tmp_reg0);
tmp_reg4.z = dot_s(gs_pica.f[14], tmp_reg0);
tmp_reg4.w = (gs_pica.f[81].yyyy).w;
tmp_reg0.xyz = (vs_out_reg0[0].xyzz + -tmp_reg12.xyzz).xyz;
vtx_regs[0].x = dot_s(gs_pica.f[0], tmp_reg0);
vtx_regs[0].y = dot_s(gs_pica.f[1], tmp_reg0);
vtx_regs[0].z = dot_s(gs_pica.f[2], tmp_reg0);
vtx_regs[0].w = dot_s(gs_pica.f[3], tmp_reg0);
vtx_regs[1] = gs_pica.f[10];
vtx_regs[3].xy = (vs_out_reg2[0].zyyy).xy;
vtx_regs[2] = vs_out_reg1[0];
vtx_regs[4] = -tmp_reg4;
SetEmit(0, false, false);
Emit();
tmp_reg0.xyz = (tmp_reg0.xyzz + tmp_reg13.xyzz).xyz;
vtx_regs[0].x = dot_s(gs_pica.f[0], tmp_reg0);
vtx_regs[0].y = dot_s(gs_pica.f[1], tmp_reg0);
vtx_regs[0].z = dot_s(gs_pica.f[2], tmp_reg0);
vtx_regs[0].w = dot_s(gs_pica.f[3], tmp_reg0);
vtx_regs[1] = gs_pica.f[10];
vtx_regs[3].xy = (vs_out_reg2[0].xyyy).xy;
vtx_regs[2] = vs_out_reg5[0];
vtx_regs[4] = -tmp_reg4;
SetEmit(1, false, false);
Emit();
tmp_reg1.xyz = (vs_out_reg0[0].xyzz + tmp_reg12.xyzz).xyz;
tmp_reg1.w = (gs_pica.f[81].yyyy).w;
vtx_regs[0].x = dot_s(gs_pica.f[0], tmp_reg1);
vtx_regs[0].y = dot_s(gs_pica.f[1], tmp_reg1);
vtx_regs[0].z = dot_s(gs_pica.f[2], tmp_reg1);
vtx_regs[0].w = dot_s(gs_pica.f[3], tmp_reg1);
vtx_regs[3].xy = (vs_out_reg2[0].zwww).xy;
SetEmit(2, true, false);
Emit();
tmp_reg1.xyz = (tmp_reg1.xyzz + tmp_reg13.xyzz).xyz;
vtx_regs[0].x = dot_s(gs_pica.f[0], tmp_reg1);
vtx_regs[0].y = dot_s(gs_pica.f[1], tmp_reg1);
vtx_regs[0].z = dot_s(gs_pica.f[2], tmp_reg1);
vtx_regs[0].w = dot_s(gs_pica.f[3], tmp_reg1);
vtx_regs[3].xy = (vs_out_reg2[0].xwww).xy;
SetEmit(0, true, false);
Emit();
case 153u:
return true;
default: return false;
}
}
return false;
}

ERROR: 0:81: 'gs_out_attr' : undeclared identifier


ERROR: 0:81: 'expression' : left of '[' is not of type array, matrix, or vector
ERROR: 0:81: 'assign' : cannot convert from 'array of 4-component vector of float'
to 'float'
ERROR: 3 compilation errors. No code generated.

You might also like