public void CopyTexture(DepthTexture text)
 {
     Parallel.For(0, text.Width, x =>
     {
         for (int y = 0; y < text.Height; y++)
         {
             TextureArr[x, y].PixelCopy(text.GetPixel(x, y));
         }
     });
 }
 //Copies one texture to another with an offset. Over cropping gets warped to the other side of the image.
 public void CopyTextureOffset(DepthTexture text, int xOffset, int yOffset)
 {
     for (int x = 0; x < text.Width; x++)
     {
         for (int y = 0; y < text.Height; y++)
         {
             TextureArr[(x + xOffset) % (Width - 1),
                        (y + yOffset) % (Height - 1)] = text.GetPixel(x, y);
         }
     }
 }