Hello,
I feel bad about posting another question so soon, but again, after a whole lot of experimentation and an inability to find information on the topic, I find myself back here for help.
Let's say you have 2 identical RenderTextures, renderTexture and renderTexture[~b]. Both have the same transformations applied to them, let's say, for examples sake, 2.0f zoom factor. When you draw a sprite with renderTexture's texture onto renderTexture[~b] with a sprite of origin 0,0 and position 0,0, it will draw the sprite at transformed scale (since zooming is the only transformation applied).
In order to combat that, let's say you setScale the sprite to 2.0f. Logically this would seem to work, but when you offset the sprite it seems some precision is lost in the transformation. I will post some example code to illustrate the problem:
//Example code showing the transference of the texture
//Keep in mind that each RenderTexture has a view applied which
//has a zoom of 2.0f
//buffer variable is a bool
//handleTexture variable is a pointer to ~b's texture
renderSprite.setOrigin(0, 0);
renderSprite.setScale(2.0f, 2.0f);
//Offset by 32 pixels
renderSprite.setPosition(32.0f, 0);
renderSprite.setRotation(0.0);
renderSprite.setTexture(*handleTexture, true);
renderTexure[buffer].draw(renderSprite);
buffer = (buffer ? 0 : 1);
My gut tells me it may have to do with some floating point math truncation in the computation of the transformation, but I could just be doing something totally stupid and just need a fresh perspective to point it out. Thank you!