stage3d/AGAL - how to use the kil opcode

HI, I’ve been trying to find some examples of how to use the kil opcode for hours but there is very little out there.

I am making a 2D game using stage3D (not using starling) and I want to use kil to prevent transparent pixels from being rendered.

My fragment shader currently has this AGAL code:

“tex oc, v0, fs0 <2d,clamp,”+TextureSmoothing.NONE+">"

How do I incorporate kil to discard any transparent pixels in the texture? And is there a way to specify the threshold?

Hoping there is some help out there!