How it behaves is all software, but the quality of the images are really all about the sensor and the lens. Motorola is still using many of the same basic camera hardware components that they've been using since the Droid X. I guess they figure it's still "good enough," which I suppose is the case for many people, but they're falling way behind everyone else on a feature that's increasingly important to many.
Doesn't the S3 use the same hardware as the iPhone 4S?