Ah got it.
yposition has to be added negative though.
private void CameraPerSpriteBatchOrthographic()
{
view = Matrix.Identity;
projection = Matrix.CreateOrthographic(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, -.5f, -1f);
}
public void DrawEffectAOrtho(float xpos, float ypos, float width, float height)
{
world = Matrix.CreateScale(new Vector3(width, height, 1f));
world.Translation = new Vector3(xpos, -ypos, 1f);
//SetWorldPositon(xpos, ypos, zpos);
worldviewprojection = world * view * projection;
TestEffectA.Parameters["gworldviewprojection"].SetValue(worldviewprojection);
JustOnce();
foreach (EffectPass pass in TestEffectA.CurrentTechnique.Passes)
{
pass.Apply();
GraphicsDevice.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, vertices, 0, 4, indices, 0, 2);
}
}
Now i just wanna get the matrixs on the gpu.
And be able to alter the vertices individually on the gpu as well in the vertex shader, which i have no idea how to do.
