anchor.diff:            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 * 2 * 6)
  +          TexCoordses = Array.zeroCreate (Constants.Render.SpriteBatchSize * 4)
             Colors = Array.zeroCreate (Constants.Render.SpriteBatchSize * 4)
             Vao = vao
             State = State.defaultState }
  
positive.code:         // compute vertex positions
          let center = position + pivot
          let position0 = (position - center).Rotate rotation + center
          let texCoords0 = texCoords.BottomLeft * flipper
          let position1Unrotated = v2 (position.X + size.X) position.Y
          let position1 = (position1Unrotated - center).Rotate rotation + center
          let texCoords1 = texCoords.BottomRight * flipper
          let position2Unrotated = v2 (position.X + size.X) (position.Y + size.Y)
          let position2 = (position2Unrotated - center).Rotate rotation + center
          let texCoords2 = texCoords.TopRight * flipper
          let position3Unrotated = v2 position.X (position.Y + size.Y)
          let position3 = (position3Unrotated - center).Rotate rotation + center
          let texCoords3 = texCoords.TopLeft * flipper
  
          // populate vertices
          PopulateVertex 0 position0 texCoords0 color env
          PopulateVertex 1 position1 texCoords1 color env
          PopulateVertex 2 position2 texCoords2 color env
          PopulateVertex 3 position3 texCoords3 color env
          PopulateVertex 4 position0 texCoords0 color env
          PopulateVertex 5 position2 texCoords2 color env
  
          // advance sprite index
          env.SpriteIndex <- inc env.SpriteIndex
  
negative.code:              "#define VERTS 6"
               "uniform mat4 viewProjection;"
               "uniform vec2 positions[" + 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);"
               "  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"
  
  