mono/MonoGame — pull request #751 by tomspilman (2012-09-09 21:14:03+00:00)
Title: Fixed VertexPosition2ColorTexture for Win8

This fixes a bug exposed by pull request...

https://github.com/mono/MonoGame/pull/748

VertexPosition2ColorTexture is used by SpriteBatch to remove the Z coordinate from the vertex format and save 4 bytes per-vertex. (Note: this may or may not be a win performance wise)

It had a bad VertexDeclaration...

new VertexElement(8, VertexElementFormat.Byte4, VertexElementUsage.Color, 0),

... Byte4 is an unnormalized format which lead to color overflow in the shader and failed rendering on DX. in GL we are assuming all VertexElementUsage.Color types are normalized... this may or may not be a bug as well.

Tested on Windows 8 and Windows GL. Should have no harmful effect on any other platform.