tin(position) vec4<f32> {
        var pos = array<vec2<f32>, 3>(
          vec2(0.0, 0.5),
          vec2(-0.5, -0.5),
          vec2(0.5, -0.5));
        return vec4<f32>(pos[VertexIndex % 3], 0.5, 1.0);
      }

      @fragment
      fn fragmentMain() -> @location(0) vec4<f32> {
        return vec4(1.0, 0.0, 0.0, 1.0);
      }`,
  });

  const pipeline = device.createRenderPipeline({
    layout: "auto",
    vertex: {
      module: redTriangleShader,
      entryPoint: "vertexMain",
    }