partly transparent textures have strange graphical glitches

Godot Version

Godot 3.5.2

Question

I have recently added trees and bushes to my game, i have tried using shader materials and spatial materials yet the problem persists. Its kind of hard to explain but basically any texture that i add that has some transparency will suddenly have these really weird visual glitches where it looks like i can see them infront and behind of eachother. I’ve been on this for two days now, ive entirely remade models and textures and tried using premade assets and rewritten my shader atleast 20 times but i cant figure out anything.


Transparency can’t be sorted if the polygons are within the same mesh, seems like you can use discard; in your fragment shader to avoid using real transparency

dude, thank you so much i could not figure it out for the life of me but that was the fix now its working. Thank you so much100 times over