Reduce texture serration in shader

Hello community, this is a picture of an arrow pattern, theoretically it can be any black and white pattern, I in shader by judging the value of rgba to change the original color of the pattern, and add a nice gradient color, but I do this, when the camera is viewed from a distance, the jagged feeling is serious, how do I adjust to reduce the jagged feeling

If I comment out the code in the shader section, the native material renders very silky

If you need to use alpha testing, antialias: true in the WebGLRenderer options will help, otherwise you can use the mask value as alpha and alpha blending, which will give you the best result thanks to mipmapping.

Thank you. I really didn’t think of it myself. It opened up new ideas for me