The use case is essentially the same as Alpha Blending with Integer Texture for Object Picking
One of the answers is to discard fragments that fail the alpha