I should add that all images were downsized to 5 MP to match the Moto G.
This is all old technology by now, and your milage will vary, but my general observations are as follows:
The Moto G has a pretty decent imaging processor. It's lens is rubbish, with lots of purple fringing and chromatic aberration, but it seemed to be consistently mediocre. Motorola seemed to attempt to make up for a lot of it's shortcomings by pumping up the saturation.
The Moto X has much better glass, but it's white balance shifted quite a bit, and seemed to favor the cooler spectrum of colors. It also seemed to underexpose images slightly, and was a bit on the low side when it came to saturation. At least for my taste. I couldn't help but feel that the hardware had much more potential than what the software offered.
The Galaxy S4 has excellent glass (lens), but it's camera software seemed to be very inconsistent - At least the T-Mobile variant. It handled white balancing the best, but seemed to overexpose images slightly, with an inconsistent saturation level.
All three phones seemed to have sloppy camera software, with hardware ranging from decent to excellent.