#version 310 es
precision highp float;
precision highp int;

void radians_bff231() {
  float res = 0.01745329238474369049f;
}
void main() {
  radians_bff231();
}
#version 310 es

void radians_bff231() {
  float res = 0.01745329238474369049f;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
  radians_bff231();
}
#version 310 es


struct VertexOutput {
  vec4 pos;
};

void radians_bff231() {
  float res = 0.01745329238474369049f;
}
VertexOutput vertex_main_inner() {
  VertexOutput tint_symbol = VertexOutput(vec4(0.0f));
  tint_symbol.pos = vec4(0.0f);
  radians_bff231();
  return tint_symbol;
}
void main() {
  gl_Position = vertex_main_inner().pos;
  gl_Position[1u] = -(gl_Position.y);
  gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
  gl_PointSize = 1.0f;
}
