The camera is a big deal for me. If it's below the S5's, then there is not much else I'm looking for that would really push me towards either side. I'd probably stick to what I know and choose the S5 in that case.
Well, the S5 camera is comparable to S4 camera. There are slightly more details captured because of limited field of view due to going 16:9 (inconvenient except you wanna view pictures only on your phone) but processing is inferior. Night shots are slightly better.
The G2 still has upper hand in many aspects due to OIS - for instance you'll be left with less blurry shots and more decent shots and night, which means really a lot since my S4 takes many blurry shots making night mode unusable unless you can completely steady your hand, and even then it's hard to completely get rid of blur.
If it comes to pure picture quality the G2 is the tinest bit behind the S4, but in hindsight those tiny differences are not worth losing OIS, which helps a great deal on the G2. Both phones have cameras of same league though in general.
I believe if the camera on G3 has improved, it might be the most all-around decent one. If not, and it turns out not to be much of an upgrade, still it'll likely be in the same league with the S5.
I played with the S5 though and personally I wouldn't buy that phone. Samsung sacrificed too much in name of water resistance, especially if it comes to size and general feel - even if the back cover looks better. Given a choice, I'd take the S4 over S5.