You are on page 1of 3

#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[];
layout(location=6) in vec4 vs_out_reg6[];
layout(location=7) in vec4 vs_out_reg7[];
vec4 gs_out_reg[3][6];
vec4 vtx_regs[6] = vec4[6](vec4(1),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][3].x,gs_out_reg[idx][3].y,gs_out_reg[idx]
[3].z, gs_out_reg[idx][3].w);
primary_color = clamp(vtx_color,vec4(0),vec4(1));
texcoord0 = vec4(gs_out_reg[idx][4].x,gs_out_reg[idx][4].y,1,1);
texcoord12 = vec4(gs_out_reg[idx][5].x,gs_out_reg[idx][5].y,1,1);
view = vec4(gs_out_reg[idx][2].x,gs_out_reg[idx][2].y,gs_out_reg[idx][2].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;
bool ExecGS() {tmp_reg0 = vec4(0, 0, 0, 1);
Gfn0();
return true;
}

bool Gfn0() {
tmp_reg0 = vs_out_reg0[0];
tmp_reg0 = tmp_reg0 + vs_out_reg6[0];
vtx_regs[0] = tmp_reg0;
vtx_regs[1] = vs_out_reg1[0];
vtx_regs[2] = vs_out_reg2[0];
vtx_regs[3] = vs_out_reg3[0];
tmp_reg0 = vs_out_reg4[0];
tmp_reg0.xy = (tmp_reg0.xyyy + vs_out_reg5[0].xyyy).xy;
tmp_reg0.xy = (tmp_reg0.xyyy + vs_out_reg5[0].zwww).xy;
vtx_regs[4] = tmp_reg0;
vtx_regs[5] = tmp_reg0;
SetEmit(0, false, false);
Emit();
tmp_reg0 = vs_out_reg0[0];
tmp_reg0 = tmp_reg0 + -vs_out_reg7[0];
vtx_regs[0] = tmp_reg0;
vtx_regs[1] = vs_out_reg1[0];
vtx_regs[2] = vs_out_reg2[0];
vtx_regs[3] = vs_out_reg3[0];
tmp_reg0 = vs_out_reg4[0];
tmp_reg0.xy = (tmp_reg0.xyyy + vs_out_reg5[0].xyyy).xy;
vtx_regs[4] = tmp_reg0;
vtx_regs[5] = tmp_reg0;
SetEmit(1, false, false);
Emit();
tmp_reg0 = vs_out_reg0[0];
tmp_reg0 = tmp_reg0 + vs_out_reg7[0];
vtx_regs[0] = tmp_reg0;
vtx_regs[1] = vs_out_reg1[0];
vtx_regs[2] = vs_out_reg2[0];
vtx_regs[3] = vs_out_reg3[0];
tmp_reg0 = vs_out_reg4[0];
tmp_reg0.xy = (tmp_reg0.xyyy + vs_out_reg5[0].zwww).xy;
vtx_regs[4] = tmp_reg0;
vtx_regs[5] = tmp_reg0;
SetEmit(2, true, false);
Emit();
tmp_reg0 = vs_out_reg0[0];
tmp_reg0 = tmp_reg0 + -vs_out_reg6[0];
vtx_regs[0] = tmp_reg0;
vtx_regs[1] = vs_out_reg1[0];
vtx_regs[2] = vs_out_reg2[0];
vtx_regs[3] = vs_out_reg3[0];
vtx_regs[4] = vs_out_reg4[0];
vtx_regs[5] = vs_out_reg4[0];
SetEmit(0, true, true);
Emit();
return true;
}

1:75: L0002: Undeclared variable 'gs_out_attr'#

You might also like