I was trying to use basic effect to view a plain 2D texture.
world = Matrix.CreateTranslation(0f, 0.0f, 0.0f);
view = Matrix.CreateLookAt(new Vector3(1f, 1f, 0), new Vector3(0, 0, 0), Vector3.Up);
projection = Matrix.CreateOrthographic(1f, 1f, 0.1f, 1000f);
effect.World = world;
effect.View = view;
effect.Projection = projection;
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, effect);
spriteBatch.Draw(player,new Vector2(0,0),Color.White );
spriteBatch.End();
T
he code for basic effect is used mostly on 3D i think.
But i saw this site, which you can use basic effect in spritebatch so I thought I could use 2D in here
But still I am getting a blank screen.
Does anyone know how to load up a texture 2D using view, world and projection matrix? Is it even posible to do it?