Use the right pitch when rendering to a texture