Constant webxr::glwindow::ANAGLYPH_VERTEX_SHADER

source ยท
const ANAGLYPH_VERTEX_SHADER: &str = "
  #version 330 core
  layout(location=0) in vec2 coord;
  uniform float wasted; // What fraction of the image is wasted?
  out vec2 left_coord;
  out vec2 right_coord;
  void main(void) {
    gl_Position = vec4(coord, 0.0, 1.0);
    vec2 coordn = coord * 0.5 + 0.5;
    left_coord = vec2(mix(wasted/2, 0.5, coordn.x), coordn.y);
    right_coord = vec2(mix(0.5, 1-wasted/2, coordn.x), coordn.y);
  }
";