Just the grit size, not the hardness. Rub both on some soft steel or aluminum. The glass is harder and will scratch the metal. Walnut shells are softer and won't scratch most metals, doesn't matter how big the particles.
Bigger walnut shell particles will be more aggressive than smaller, however...like a bigger hammer. So what any media does is a combination of both hardness and grit size.
Here's a blurb that might help
https://indigoblastingandpainting.co...sive-blasting/