Suppose you are using a render texture like this:
// In create
this.rt = this.add.renderTexture(0, 0,
this.game.config.width, this.game.config.height);
// in update
this.rt.clear();
this.rt.beginDraw();
var camera = this.cameras.main;
// Array of game objects
array.forEach((object) =>
{
this.rt.batchDraw(object, object.x - camera.scrollX, object.y - camera.scrollY);
});
this.rt.endDraw();
How would I approach making it account for camera scroll or scale?