fix meshsprite normal
parent
7f986c546a
commit
c9a4e35816
|
@ -91,19 +91,19 @@ namespace Kav
|
||||||
VertexPositionNormalTexture[] result = new VertexPositionNormalTexture[4];
|
VertexPositionNormalTexture[] result = new VertexPositionNormalTexture[4];
|
||||||
|
|
||||||
result[0].Position = new Vector3(-texture.Width / 2, texture.Height / 2, 0) / PixelScale;
|
result[0].Position = new Vector3(-texture.Width / 2, texture.Height / 2, 0) / PixelScale;
|
||||||
result[0].Normal = new Vector3(0, 0, -1);
|
result[0].Normal = new Vector3(0, 0, 1);
|
||||||
result[0].TextureCoordinate = new Vector2(0, 0);
|
result[0].TextureCoordinate = new Vector2(0, 0);
|
||||||
|
|
||||||
result[1].Position = new Vector3(texture.Width / 2, texture.Height / 2, 0) / PixelScale;
|
result[1].Position = new Vector3(texture.Width / 2, texture.Height / 2, 0) / PixelScale;
|
||||||
result[1].Normal = new Vector3(0, 0, -1);
|
result[1].Normal = new Vector3(0, 0, 1);
|
||||||
result[1].TextureCoordinate = new Vector2(1, 0);
|
result[1].TextureCoordinate = new Vector2(1, 0);
|
||||||
|
|
||||||
result[2].Position = new Vector3(-texture.Width / 2, -texture.Height / 2, 0) / PixelScale;
|
result[2].Position = new Vector3(-texture.Width / 2, -texture.Height / 2, 0) / PixelScale;
|
||||||
result[2].Normal = new Vector3(0, 0, -1);
|
result[2].Normal = new Vector3(0, 0, 1);
|
||||||
result[2].TextureCoordinate = new Vector2(0, 1);
|
result[2].TextureCoordinate = new Vector2(0, 1);
|
||||||
|
|
||||||
result[3].Position = new Vector3(texture.Width / 2, -texture.Height / 2, 0) / PixelScale;
|
result[3].Position = new Vector3(texture.Width / 2, -texture.Height / 2, 0) / PixelScale;
|
||||||
result[3].Normal = new Vector3(0, 0, -1);
|
result[3].Normal = new Vector3(0, 0, 1);
|
||||||
result[3].TextureCoordinate = new Vector2(1, 1);
|
result[3].TextureCoordinate = new Vector2(1, 1);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue