Update MA_TextureUtils.cs

Bugfix: 2 pixel Y offset when combining textures.
This commit is contained in:
max 2020-05-16 19:29:01 +02:00
parent 8ff2db7e87
commit a3c002cb17

View File

@ -199,7 +199,7 @@ namespace MA_Texture
if(flipY)
{
//Y is 'flipped' because textures are made from left to right, bottom to top. We want to draw from left to right and top to bottom.
for (int y = combineTexture.height; y > 0; y--)
for (int y = combineTexture.height - 1; y >= 0; y--)
{
texture.SetPixel(x + offsetX, y + (texture.height - offsetY - combineTexture.height), combineTexture.GetPixel(x, y));
}