anchor.diff:               "#define VERTS 6"
                "uniform mat4 viewProjection;"
                "uniform vec2 positions[" + string Constants.Render.SpriteBatchSize + " * VERTS];"
  -             "uniform vec2 texCoordses[" + string Constants.Render.SpriteBatchSize + " * VERTS];"
  +             "uniform vec4 texCoordses[" + string Constants.Render.SpriteBatchSize + "];"
                "uniform vec4 colors[" + string Constants.Render.SpriteBatchSize + "];"
                "out vec2 texCoords;"
                "out vec4 color;"
                "void main()"
                "{"
                "  int spriteId = gl_VertexID / VERTS;"
  +             "  int vertexId = gl_VertexID % VERTS;"
                "  vec2 position = positions[gl_VertexID];"
                "  gl_Position = viewProjection * vec4(position.x, position.y, 0, 1);"
  -             "  texCoords = texCoordses[gl_VertexID];"
  +             "  vec4 texCoords4 = texCoordses[spriteId];"
  +             "  switch (vertexId)"
  +             "  {"
  +             "      case 0: case 4: texCoords = vec2(texCoords4.x, texCoords4.y); break;"
  +             "      case 1:         texCoords = vec2(texCoords4.x + texCoords4.z, texCoords4.y); break;"
  +             "      case 2: case 5: texCoords = vec2(texCoords4.x + texCoords4.z, texCoords4.y + texCoords4.w); break;"
  +             "      case 3:         texCoords = vec2(texCoords4.x, texCoords4.y + texCoords4.w); break;"
  +             "  }"
                "  color = colors[spriteId];"
                "}"] |> String.join "\n"
   
  
positive.code: 
              // setup shader
              OpenGL.Gl.UseProgram env.Shader
              OpenGL.Gl.UniformMatrix4f (env.ViewProjectionUniform, 1, false, if env.State.Absolute then env.ViewProjectionAbsolute else env.ViewProjectionRelative)
              OpenGL.Gl.Uniform2 (env.PositionsUniform, env.Positions)
              OpenGL.Gl.Uniform2 (env.TexCoordsesUniform, env.TexCoordses)
              OpenGL.Gl.Uniform4 (env.ColorsUniform, env.Colors)
              OpenGL.Gl.Uniform1i (env.TexUniform, 1, 0)
              OpenGL.Gl.ActiveTexture OpenGL.TextureUnit.Texture0
              OpenGL.Gl.BindTexture (OpenGL.TextureTarget.Texture2d, env.State.Texture)
              OpenGL.Gl.BlendEquation env.State.BlendingEquation
              OpenGL.Gl.BlendFunc (env.State.BlendingFactorSrc, env.State.BlendingFactorDst)
              OpenGL.Hl.Assert ()
  
  
negative.code:           ViewProjectionUniform = viewProjectionUniform; PositionsUniform = positionsUniform; TexCoordsesUniform = texCoordsesUniform
            ColorsUniform = colorsUniform; TexUniform = texUniform; Shader = shader
            Positions = Array.zeroCreate (Constants.Render.SpriteBatchSize * 2 * 6)
            TexCoordses = Array.zeroCreate (Constants.Render.SpriteBatchSize * 4)
            Colors = Array.zeroCreate (Constants.Render.SpriteBatchSize * 4)
            Vao = vao
            State = State.defaultState }
  